Changeset 2810
- Timestamp:
- 05/29/08 16:25:53 (7 months ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
openwsman/branches/openwsman-1.5.x/src/server/shttpd.c
r2079 r2810 837 837 838 838 /* Allocate POST buffer */ 839 if ( (c->query = malloc(c->cclength + 1)) == NULL) {839 if ( c->cclength + 1 > c->cclength && (c->query = malloc(c->cclength + 1)) == NULL) { 840 840 senderr(c, 413, "Too Large", "", "huge POST"); 841 841 return; openwsman/branches/openwsman-1.5.x/src/server/wsmand-listener.c
r2079 r2810 207 207 error("NULL request body. len = %d", length); 208 208 } 209 #if 0 209 #if 0 210 210 if(strcmp(wsman_msg->charset, "UTF-8")) { 211 211 iconv_t cd = iconv_open("UTF-8", wsman_msg->charset); … … 229 229 // u_buf_construct(wsman_msg->request, mbbuf, length - outbuf_len, length - outbuf_len); 230 230 debug("***coverted = %d***", length - outbuf_len); 231 232 } 233 #endif 231 232 } 233 #endif 234 234 u_buf_construct(wsman_msg->request, body, length, length); 235 235 debug("Posted request: %s, wsman_msg len = %d", u_buf_ptr(wsman_msg->request), … … 320 320 u_free(encoding); 321 321 // add response body to output buffer 322 CONTINUE:322 CONTINUE: 323 323 k = arg->buflen - n; 324 324 if (k <= shttp_msg->length - shttp_msg->ind) { … … 345 345 u_free(shttp_msg->response); 346 346 u_free(shttp_msg); 347 347 348 348 arg->last = 1; 349 349 arg->state = NULL; … … 396 396 goto DONE; 397 397 } 398 398 399 399 if(strncmp(shttpd_get_header(arg, "CIMExport"), "MethodRequest", strlen("MethodRequest")) || 400 400 strncmp(shttpd_get_header(arg, "CIMExportMethod"), "ExportIndication", strlen("ExportIndication"))) { … … 495 495 n += snprintf(arg->buf + n, arg->buflen - n, "\r\n"); 496 496 // add response body to output buffer 497 CONTINUE:497 CONTINUE: 498 498 k = arg->buflen - n; 499 499 if (k <= shttp_msg->length - shttp_msg->ind) { … … 520 520 u_free(shttp_msg->response); 521 521 u_free(shttp_msg); 522 522 523 523 arg->last = 1; 524 524 arg->state = NULL;