diff options
author | Christian Grothoff <christian@grothoff.org> | 2012-01-27 10:01:51 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2012-01-27 10:01:51 +0000 |
commit | 29ad274096d4a8e2c4812c57db415c9b885767df (patch) | |
tree | f7ae4c2c03b8fc5854ae13137b9d32947d6db62f | |
parent | 25e0d426214de820a2590f5895622ac0583a3c42 (diff) | |
download | libmicrohttpd-29ad274096d4a8e2c4812c57db415c9b885767df.tar.gz libmicrohttpd-29ad274096d4a8e2c4812c57db415c9b885767df.zip |
-fixing #2120
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | src/daemon/postprocessor.c | 8 |
2 files changed, 11 insertions, 1 deletions
@@ -1,3 +1,7 @@ | |||
1 | Fri Jan 27 11:00:43 CET 2012 | ||
2 | Fixed postprocessor failure for applications that enclosed boundary | ||
3 | in quotes (#2120). -woof | ||
4 | |||
1 | Tue Jan 24 16:07:53 CET 2012 | 5 | Tue Jan 24 16:07:53 CET 2012 |
2 | Added configure check for sin_len in 'struct sockaddr' and adding | 6 | Added configure check for sin_len in 'struct sockaddr' and adding |
3 | code to initialize this field if it exists now. -CG | 7 | code to initialize this field if it exists now. -CG |
diff --git a/src/daemon/postprocessor.c b/src/daemon/postprocessor.c index 4c906439..966630d8 100644 --- a/src/daemon/postprocessor.c +++ b/src/daemon/postprocessor.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of libmicrohttpd | 2 | This file is part of libmicrohttpd |
3 | (C) 2007, 2009 Daniel Pittman and Christian Grothoff | 3 | (C) 2007, 2009, 2010, 2011, 2012 Daniel Pittman and Christian Grothoff |
4 | 4 | ||
5 | This library is free software; you can redistribute it and/or | 5 | This library is free software; you can redistribute it and/or |
6 | modify it under the terms of the GNU Lesser General Public | 6 | modify it under the terms of the GNU Lesser General Public |
@@ -280,6 +280,12 @@ MHD_create_post_processor (struct MHD_Connection *connection, | |||
280 | blen = strlen (boundary); | 280 | blen = strlen (boundary); |
281 | if ((blen == 0) || (blen * 2 + 2 > buffer_size)) | 281 | if ((blen == 0) || (blen * 2 + 2 > buffer_size)) |
282 | return NULL; /* (will be) out of memory or invalid boundary */ | 282 | return NULL; /* (will be) out of memory or invalid boundary */ |
283 | if ( (boundary[0] == '"') && (boundary[blen - 1] == '"') ) | ||
284 | { | ||
285 | /* remove enclosing quotes */ | ||
286 | ++boundary; | ||
287 | blen -= 2; | ||
288 | } | ||
283 | } | 289 | } |
284 | else | 290 | else |
285 | blen = 0; | 291 | blen = 0; |