mirror of
https://github.com/nginx/nginx.git
synced 2025-06-12 21:52:41 +08:00
nginx-0.0.3-2004-03-30-19:59:50 import
This commit is contained in:
parent
6881bfb990
commit
6707ba9072
@ -28,7 +28,7 @@ static ngx_inline uint32_t ngx_atomic_inc(ngx_atomic_t *value)
|
|||||||
NGX_SMP_LOCK
|
NGX_SMP_LOCK
|
||||||
" xaddl %0, %1; "
|
" xaddl %0, %1; "
|
||||||
|
|
||||||
: "=q" (old) : "m" (*value));
|
: "+q" (old) : "m" (*value));
|
||||||
|
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ static ngx_inline uint32_t ngx_atomic_dec(ngx_atomic_t *value)
|
|||||||
NGX_SMP_LOCK
|
NGX_SMP_LOCK
|
||||||
" xaddl %0, %1; "
|
" xaddl %0, %1; "
|
||||||
|
|
||||||
: "=q" (old) : "m" (*value));
|
: "+q" (old) : "m" (*value));
|
||||||
|
|
||||||
return old;
|
return old;
|
||||||
}
|
}
|
||||||
|
@ -38,7 +38,7 @@ static char *client_header_errors[] = {
|
|||||||
"client %s sent invalid header, URL: %s",
|
"client %s sent invalid header, URL: %s",
|
||||||
"client %s sent too long header line, URL: %s",
|
"client %s sent too long header line, URL: %s",
|
||||||
"client %s sent HTTP/1.1 request without \"Host\" header, URL: %s",
|
"client %s sent HTTP/1.1 request without \"Host\" header, URL: %s",
|
||||||
"client %s sent invalid \"Content-Length\" header, URL: %s"
|
"client %s sent invalid \"Content-Length\" header, URL: %s",
|
||||||
"client %s sent POST method without \"Content-Length\" header, URL: %s"
|
"client %s sent POST method without \"Content-Length\" header, URL: %s"
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -37,6 +37,9 @@ ngx_int_t ngx_http_read_client_request_body(ngx_http_request_t *r)
|
|||||||
/* the whole request body was pre-read */
|
/* the whole request body was pre-read */
|
||||||
|
|
||||||
r->header_in->pos += r->headers_in.content_length_n;
|
r->header_in->pos += r->headers_in.content_length_n;
|
||||||
|
|
||||||
|
r->request_body->handler(r->request_body->data);
|
||||||
|
|
||||||
return NGX_OK;
|
return NGX_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -84,6 +87,11 @@ static void ngx_http_read_client_request_body_handler(ngx_event_t *rev)
|
|||||||
c = rev->data;
|
c = rev->data;
|
||||||
r = c->data;
|
r = c->data;
|
||||||
|
|
||||||
|
if (rev->timedout) {
|
||||||
|
ngx_http_finalize_request(r, NGX_HTTP_REQUEST_TIME_OUT);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
rc = ngx_http_do_read_client_request_body(r);
|
rc = ngx_http_do_read_client_request_body(r);
|
||||||
|
|
||||||
if (rc >= NGX_HTTP_SPECIAL_RESPONSE) {
|
if (rc >= NGX_HTTP_SPECIAL_RESPONSE) {
|
||||||
|
Loading…
Reference in New Issue
Block a user