Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Some cosmetic changes

  • Loading branch information...
commit 01bb9ecbc00385a2776cf7d1e2f00ebc59301236 1 parent 0aeba64
@vkholodkov authored
Showing with 15 additions and 15 deletions.
  1. +2 −2 Changelog
  2. +13 −13 ngx_http_upload_module.c
View
4 Changelog
@@ -2,8 +2,8 @@
Version 2.0.3
* upload_store directive was not able to receive more than one argument.
As a result no hashed dirs for file uploads were possible.
- * upload_store_access directive did not work completely.
- Thanks to Brian Moran.
+ * upload_store_access directive did not work at all. Permissions were
+ defaulted to user:rw. Thanks to Brian Moran.
* In case of any errors at the last chunk of request body only 500 Internal Server Error
was generated intead of 400 Bad Request and 503 Service Unavailable.
* Fixed copyrights for temporary file name generation code
View
26 ngx_http_upload_module.c
@@ -51,7 +51,7 @@ typedef struct {
ngx_regex_t *regex;
ngx_int_t ncaptures;
#else
- ngx_str_t name;
+ ngx_str_t text;
#endif
} ngx_http_upload_field_filter_t;
@@ -72,23 +72,23 @@ typedef struct {
* Upload module context
*/
typedef struct ngx_http_upload_ctx_s {
- ngx_str_t boundary;
- u_char *boundary_start;
- u_char *boundary_pos;
+ ngx_str_t boundary;
+ u_char *boundary_start;
+ u_char *boundary_pos;
upload_state_t state;
- u_char *header_accumulator;
- u_char *header_accumulator_end;
- u_char *header_accumulator_pos;
+ u_char *header_accumulator;
+ u_char *header_accumulator_end;
+ u_char *header_accumulator_pos;
ngx_str_t field_name;
ngx_str_t file_name;
ngx_str_t content_type;
- u_char *output_buffer;
- u_char *output_buffer_end;
- u_char *output_buffer_pos;
+ u_char *output_buffer;
+ u_char *output_buffer_end;
+ u_char *output_buffer_pos;
ngx_pool_t *pool;
@@ -588,7 +588,7 @@ static ngx_int_t ngx_http_upload_start_handler(ngx_http_upload_ctx_t *u) { /* {{
if(rc == 0)
pass_field = 1;
#else
- if(ngx_strncmp(f[i].name.data, u->field_name.data, u->field_name.len) == 0)
+ if(ngx_strncmp(f[i].text.data, u->field_name.data, u->field_name.len) == 0)
pass_field = 1;
#endif
}
@@ -993,8 +993,8 @@ ngx_http_upload_pass_form_field(ngx_conf_t *cf, ngx_command_t *cmd, void *conf)
f->ncaptures = n;
#else
- f->name.len = value[1].len;
- f->name.data = value[1].data;
+ f->text.len = value[1].len;
+ f->text.data = value[1].data;
#endif
return NGX_CONF_OK;
Please sign in to comment.
Something went wrong with that request. Please try again.