Skip to content

Commit

Permalink
Revert "Generation of boundary for output body"
Browse files Browse the repository at this point in the history
This reverts commit 06a8705.
  • Loading branch information
Valery Kholodkov committed Mar 4, 2010
1 parent 06a8705 commit d7c761d
Showing 1 changed file with 4 additions and 19 deletions.
23 changes: 4 additions & 19 deletions ngx_http_upload_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -2819,7 +2819,6 @@ static ngx_int_t upload_parse_request_headers(ngx_http_upload_ctx_t *upload_ctx,
u_char *boundary_start_ptr, *boundary_end_ptr;
ngx_http_upload_header_t *h;
ngx_int_t rc;
ngx_atomic_uint_t boundary;

// Check whether Content-Type header is missing
if(headers_in->content_type == NULL) {
Expand Down Expand Up @@ -2877,25 +2876,11 @@ static ngx_int_t upload_parse_request_headers(ngx_http_upload_ctx_t *upload_ctx,

upload_ctx->content_type = *content_type;

boundary = ngx_next_temp_number(0);
content_type->data = (u_char*)MULTIPART_FORM_DATA_STRING "; boundary=BLAH";
content_type->len = sizeof(MULTIPART_FORM_DATA_STRING "; boundary=BLAH") - 1;

content_type->data =
ngx_pnalloc(upload_ctx->request->pool,
sizeof(MULTIPART_FORM_DATA_STRING "; boundary=") - 1
+ NGX_ATOMIC_T_LEN);

if (content_type->data == NULL) {
return NGX_ERROR;
}

content_type->len =
ngx_sprintf(content_type->data,
MULTIPART_FORM_DATA_STRING "; boundary=%0muA",
boundary)
- content_type->data;

boundary_start_ptr = content_type->data + sizeof(MULTIPART_FORM_DATA_STRING "; boundary=") - 1;
boundary_end_ptr = content_type->data + content_type->len;
boundary_start_ptr = (u_char*)"BLAH";
boundary_end_ptr = boundary_start_ptr + 4;
}
else{
// Find colon in content type string, which terminates mime type
Expand Down

0 comments on commit d7c761d

Please sign in to comment.