Skip to content

Commit

Permalink
Support for X-Content-Range header
Browse files Browse the repository at this point in the history
  • Loading branch information
Valery Kholodkov committed Mar 11, 2010
1 parent b6b7842 commit 7dc90ce
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion ngx_http_upload_module.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
#define CONTENT_DISPOSITION_STRING "Content-Disposition:"
#define CONTENT_TYPE_STRING "Content-Type:"
#define CONTENT_RANGE_STRING "Content-Range:"
#define X_CONTENT_RANGE_STRING "X-Content-Range:"
#define SESSION_ID_STRING "Session-ID:"
#define FORM_DATA_STRING "form-data"
#define ATTACHMENT_STRING "attachment"
Expand Down Expand Up @@ -3047,7 +3048,9 @@ static ngx_int_t upload_parse_request_headers(ngx_http_upload_ctx_t *upload_ctx,

ngx_log_debug1(NGX_LOG_DEBUG_CORE, upload_ctx->log, 0,
"session id %V", &upload_ctx->session_id);
}else if(!strncasecmp(CONTENT_RANGE_STRING, (char*)header[i].key.data, sizeof(CONTENT_RANGE_STRING) - 1 - 1)) {
}else if(!strncasecmp(CONTENT_RANGE_STRING, (char*)header[i].key.data, sizeof(CONTENT_RANGE_STRING) - 1 - 1)
|| !strncasecmp(X_CONTENT_RANGE_STRING, (char*)header[i].key.data, sizeof(X_CONTENT_RANGE_STRING) - 1 - 1))
{
if(header[i].value.len == 0) {
ngx_log_debug0(NGX_LOG_DEBUG_CORE, upload_ctx->log, 0,
"empty Content-Range in part header");
Expand Down

0 comments on commit 7dc90ce

Please sign in to comment.