comparison src/c/request.c @ 1347:b106ca8200b1

postBody type
author Adam Chlipala <adam@chlipala.net>
date Sat, 18 Dec 2010 10:56:31 -0500
parents a1aa62b472cf
children 87156c44824f
comparison
equal deleted inserted replaced
1346:faad7d01b200 1347:b106ca8200b1
190 190
191 boundary = clen_s + 28; 191 boundary = clen_s + 28;
192 boundary[0] = '-'; 192 boundary[0] = '-';
193 boundary[1] = '-'; 193 boundary[1] = '-';
194 boundary_len = strlen(boundary); 194 boundary_len = strlen(boundary);
195 } else if (clen_s && strcasecmp(clen_s, "application/x-www-form-urlencoded")) {
196 uw_Basis_postBody pb = {clen_s, body};
197 uw_postBody(ctx, pb);
195 } 198 }
196 } else if (strcmp(method, "GET")) { 199 } else if (strcmp(method, "GET")) {
197 log_error(logger_data, "Not ready for non-GET/POST command: %s\n", method); 200 log_error(logger_data, "Not ready for non-GET/POST command: %s\n", method);
198 return FAILED; 201 return FAILED;
199 } 202 }
323 log_error(logger_data, "%s\n", uw_error_message(ctx)); 326 log_error(logger_data, "%s\n", uw_error_message(ctx));
324 return FAILED; 327 return FAILED;
325 } 328 }
326 } 329 }
327 } 330 }
328 else { 331 else if (!uw_hasPostBody(ctx)) {
329 inputs = is_post ? body : query_string; 332 inputs = is_post ? body : query_string;
330 333
331 if (inputs) { 334 if (inputs) {
332 char *name, *value; 335 char *name, *value;
333 336