Uwsgi: added a check on maximum uwsgi request size.
Requested by Chris Caputo.
This commit is contained in:
parent
8106d0e8c0
commit
6a2e5ed387
1 changed files with 6 additions and 0 deletions
|
@ -960,6 +960,12 @@ ngx_http_uwsgi_create_request(ngx_http_request_t *r)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (len > 65535) {
|
||||||
|
ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
|
||||||
|
"uwsgi request is too big: %uz", len);
|
||||||
|
return NGX_ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
b = ngx_create_temp_buf(r->pool, len + 4);
|
b = ngx_create_temp_buf(r->pool, len + 4);
|
||||||
if (b == NULL) {
|
if (b == NULL) {
|
||||||
return NGX_ERROR;
|
return NGX_ERROR;
|
||||||
|
|
Loading…
Reference in a new issue