diff options
Diffstat (limited to 'src/microhttpd/connection.c')
-rw-r--r-- | src/microhttpd/connection.c | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/src/microhttpd/connection.c b/src/microhttpd/connection.c index cd79d66d..772af9f5 100644 --- a/src/microhttpd/connection.c +++ b/src/microhttpd/connection.c | |||
@@ -149,21 +149,6 @@ MHD_get_connection_values (struct MHD_Connection *connection, | |||
149 | 149 | ||
150 | 150 | ||
151 | /** | 151 | /** |
152 | * Convert all occurences of '+' to ' '. | ||
153 | * | ||
154 | * @param arg string that is modified | ||
155 | */ | ||
156 | static void | ||
157 | escape_plus (char *arg) | ||
158 | { | ||
159 | char *p; | ||
160 | |||
161 | for (p=strchr (arg, '+'); NULL != p; p = strchr (p + 1, '+')) | ||
162 | *p = ' '; | ||
163 | } | ||
164 | |||
165 | |||
166 | /** | ||
167 | * This function can be used to add an entry to the HTTP headers of a | 152 | * This function can be used to add an entry to the HTTP headers of a |
168 | * connection (so that the #MHD_get_connection_values function will | 153 | * connection (so that the #MHD_get_connection_values function will |
169 | * return them -- and the `struct MHD_PostProcessor` will also see | 154 | * return them -- and the `struct MHD_PostProcessor` will also see |
@@ -1230,7 +1215,7 @@ parse_arguments (enum MHD_ValueKind kind, | |||
1230 | if (NULL == equals) | 1215 | if (NULL == equals) |
1231 | { | 1216 | { |
1232 | /* got 'foo', add key 'foo' with NULL for value */ | 1217 | /* got 'foo', add key 'foo' with NULL for value */ |
1233 | escape_plus (args); | 1218 | MHD_unescape_plus (args); |
1234 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, | 1219 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, |
1235 | connection, | 1220 | connection, |
1236 | args); | 1221 | args); |
@@ -1242,11 +1227,11 @@ parse_arguments (enum MHD_ValueKind kind, | |||
1242 | /* got 'foo=bar' */ | 1227 | /* got 'foo=bar' */ |
1243 | equals[0] = '\0'; | 1228 | equals[0] = '\0'; |
1244 | equals++; | 1229 | equals++; |
1245 | escape_plus (args); | 1230 | MHD_unescape_plus (args); |
1246 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, | 1231 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, |
1247 | connection, | 1232 | connection, |
1248 | args); | 1233 | args); |
1249 | escape_plus (equals); | 1234 | MHD_unescape_plus (equals); |
1250 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, | 1235 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, |
1251 | connection, | 1236 | connection, |
1252 | equals); | 1237 | equals); |
@@ -1259,7 +1244,7 @@ parse_arguments (enum MHD_ValueKind kind, | |||
1259 | (equals >= amper) ) | 1244 | (equals >= amper) ) |
1260 | { | 1245 | { |
1261 | /* got 'foo&bar' or 'foo&bar=val', add key 'foo' with NULL for value */ | 1246 | /* got 'foo&bar' or 'foo&bar=val', add key 'foo' with NULL for value */ |
1262 | escape_plus (args); | 1247 | MHD_unescape_plus (args); |
1263 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, | 1248 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, |
1264 | connection, | 1249 | connection, |
1265 | args); | 1250 | args); |
@@ -1278,11 +1263,11 @@ parse_arguments (enum MHD_ValueKind kind, | |||
1278 | so we got regular 'foo=value&bar...'-kind of argument */ | 1263 | so we got regular 'foo=value&bar...'-kind of argument */ |
1279 | equals[0] = '\0'; | 1264 | equals[0] = '\0'; |
1280 | equals++; | 1265 | equals++; |
1281 | escape_plus (args); | 1266 | MHD_unescape_plus (args); |
1282 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, | 1267 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, |
1283 | connection, | 1268 | connection, |
1284 | args); | 1269 | args); |
1285 | escape_plus (equals); | 1270 | MHD_unescape_plus (equals); |
1286 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, | 1271 | connection->daemon->unescape_callback (connection->daemon->unescape_callback_cls, |
1287 | connection, | 1272 | connection, |
1288 | equals); | 1273 | equals); |