Skip to content

Commit

Permalink
Tag for version 2.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
vkholodkov committed Aug 28, 2008
2 parents 95ede19 + 28f0773 commit 61b5241
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 12 deletions.
1 change: 1 addition & 0 deletions Changelog
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
Version 2.0.6
* Fixed bug: zero variables in aggregate field name caused allocation
of random amount of memory
* Fixed bug: Prevent generation of a field in case of empty field name

Version 2.0.5
* Fixed bug: prevent leaking of file descriptors on a timeout (unconfirmed problem).
Expand Down
24 changes: 12 additions & 12 deletions ngx_http_upload_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ static void ngx_upload_cleanup_handler(void *data);
* upload_ctx -- upload context which is being initialized
*
*/
void upload_init_ctx(ngx_http_upload_ctx_t *upload_ctx);
static void upload_init_ctx(ngx_http_upload_ctx_t *upload_ctx);

/*
* upload_shutdown_ctx
Expand All @@ -233,7 +233,7 @@ void upload_init_ctx(ngx_http_upload_ctx_t *upload_ctx);
* upload_ctx -- upload context which is being shut down
*
*/
void upload_shutdown_ctx(ngx_http_upload_ctx_t *upload_ctx);
static void upload_shutdown_ctx(ngx_http_upload_ctx_t *upload_ctx);

/*
* upload_start
Expand All @@ -249,7 +249,7 @@ void upload_shutdown_ctx(ngx_http_upload_ctx_t *upload_ctx);
* NGX_ERROR if error has occured
*
*/
ngx_int_t upload_start(ngx_http_upload_ctx_t *upload_ctx, ngx_http_upload_loc_conf_t *ulcf);
static ngx_int_t upload_start(ngx_http_upload_ctx_t *upload_ctx, ngx_http_upload_loc_conf_t *ulcf);

/*
* upload_parse_content_type
Expand All @@ -265,7 +265,7 @@ ngx_int_t upload_start(ngx_http_upload_ctx_t *upload_ctx, ngx_http_upload_loc_co
* NGX_OK on success
* NGX_ERROR if error has occured
*/
ngx_int_t upload_parse_content_type(ngx_http_upload_ctx_t *upload_ctx, ngx_str_t *content_type);
static ngx_int_t upload_parse_content_type(ngx_http_upload_ctx_t *upload_ctx, ngx_str_t *content_type);

/*
* upload_process_buf
Expand All @@ -282,7 +282,7 @@ ngx_int_t upload_parse_content_type(ngx_http_upload_ctx_t *upload_ctx, ngx_str_t
* NGX_UPLOAD_SCRIPTERROR nginx script engine failed
* NGX_UPLOAD_TOOLARGE field body is too large
*/
ngx_int_t upload_process_buf(ngx_http_upload_ctx_t *upload_ctx, u_char *start, u_char *end);
static ngx_int_t upload_process_buf(ngx_http_upload_ctx_t *upload_ctx, u_char *start, u_char *end);

static ngx_command_t ngx_http_upload_commands[] = { /* {{{ */

Expand Down Expand Up @@ -790,7 +790,7 @@ static ngx_int_t ngx_http_upload_start_handler(ngx_http_upload_ctx_t *u) { /* {{
}
}

if(pass_field) {
if(pass_field && u->field_name.len > 0) {
/*
* Here we do a small hack: the content of a normal field
* is not known until ngx_http_upload_flush_output_buffer
Expand Down Expand Up @@ -2043,7 +2043,7 @@ static void upload_flush_output_buffer(ngx_http_upload_ctx_t *upload_ctx) { /* {
}
} /* }}} */

void upload_init_ctx(ngx_http_upload_ctx_t *upload_ctx) { /* {{{ */
static void upload_init_ctx(ngx_http_upload_ctx_t *upload_ctx) { /* {{{ */
upload_ctx->boundary.data = upload_ctx->boundary_start = upload_ctx->boundary_pos = 0;

upload_ctx->state = upload_state_boundary_seek;
Expand All @@ -2065,7 +2065,7 @@ void upload_init_ctx(ngx_http_upload_ctx_t *upload_ctx) { /* {{{ */
upload_ctx->flush_output_buffer_f = ngx_http_upload_flush_output_buffer;
} /* }}} */

void upload_shutdown_ctx(ngx_http_upload_ctx_t *upload_ctx) { /* {{{ */
static void upload_shutdown_ctx(ngx_http_upload_ctx_t *upload_ctx) { /* {{{ */
if(upload_ctx != 0) {
// Abort file if we still processing it
if(upload_ctx->state == upload_state_data) {
Expand All @@ -2077,7 +2077,7 @@ void upload_shutdown_ctx(ngx_http_upload_ctx_t *upload_ctx) { /* {{{ */
}
} /* }}} */

ngx_int_t upload_start(ngx_http_upload_ctx_t *upload_ctx, ngx_http_upload_loc_conf_t *ulcf) { /* {{{ */
static ngx_int_t upload_start(ngx_http_upload_ctx_t *upload_ctx, ngx_http_upload_loc_conf_t *ulcf) { /* {{{ */
if(upload_ctx == NULL)
return NGX_ERROR;

Expand All @@ -2104,7 +2104,7 @@ ngx_int_t upload_start(ngx_http_upload_ctx_t *upload_ctx, ngx_http_upload_loc_co
return NGX_OK;
} /* }}} */

ngx_int_t upload_parse_content_type(ngx_http_upload_ctx_t *upload_ctx, ngx_str_t *content_type) { /* {{{ */
static ngx_int_t upload_parse_content_type(ngx_http_upload_ctx_t *upload_ctx, ngx_str_t *content_type) { /* {{{ */
// Find colon in content type string, which terminates mime type
u_char *mime_type_end_ptr = (u_char*) ngx_strchr(content_type->data, ';');
u_char *boundary_start_ptr, *boundary_end_ptr;
Expand Down Expand Up @@ -2168,7 +2168,7 @@ ngx_int_t upload_parse_content_type(ngx_http_upload_ctx_t *upload_ctx, ngx_str_t
return NGX_OK;
} /* }}} */

void upload_putc(ngx_http_upload_ctx_t *upload_ctx, u_char c) { /* {{{ */
static void upload_putc(ngx_http_upload_ctx_t *upload_ctx, u_char c) { /* {{{ */
if(!upload_ctx->discard_data) {
*upload_ctx->output_buffer_pos = c;

Expand All @@ -2179,7 +2179,7 @@ void upload_putc(ngx_http_upload_ctx_t *upload_ctx, u_char c) { /* {{{ */
}
} /* }}} */

ngx_int_t upload_process_buf(ngx_http_upload_ctx_t *upload_ctx, u_char *start, u_char *end) { /* {{{ */
static ngx_int_t upload_process_buf(ngx_http_upload_ctx_t *upload_ctx, u_char *start, u_char *end) { /* {{{ */

u_char *p;
ngx_int_t rc;
Expand Down

0 comments on commit 61b5241

Please sign in to comment.