comparison src/http/modules/ngx_http_uwsgi_module.c @ 7348:f6e7831a17d4

Uwsgi: added a check on maximum uwsgi request size. Requested by Chris Caputo.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 03 Sep 2018 19:17:06 +0300
parents b9b3518fa93b
children 8b68d50090e4
comparison
equal deleted inserted replaced
7347:b9b3518fa93b 7348:f6e7831a17d4
958 "uwsgi request is too little: %uz", len); 958 "uwsgi request is too little: %uz", len);
959 return NGX_ERROR; 959 return NGX_ERROR;
960 } 960 }
961 #endif 961 #endif
962 962
963 if (len > 65535) {
964 ngx_log_error(NGX_LOG_ALERT, r->connection->log, 0,
965 "uwsgi request is too big: %uz", len);
966 return NGX_ERROR;
967 }
968
963 b = ngx_create_temp_buf(r->pool, len + 4); 969 b = ngx_create_temp_buf(r->pool, len + 4);
964 if (b == NULL) { 970 if (b == NULL) {
965 return NGX_ERROR; 971 return NGX_ERROR;
966 } 972 }
967 973