comparison src/http/ngx_http_request.c @ 7881:52338ddf9e2f

Disabled spaces in URIs (ticket #196). From now on, requests with spaces in URIs are immediately rejected rather than allowed. Spaces were allowed in 31e9677b15a1 (0.8.41) to handle bad clients. It is believed that now this behaviour causes more harm than good.
author Maxim Dounin <mdounin@mdounin.ru>
date Mon, 28 Jun 2021 18:01:13 +0300
parents bea0f9e5c309
children b87b7092cedb
comparison
equal deleted inserted replaced
7880:dfd8dfb436e5 7881:52338ddf9e2f
1262 } 1262 }
1263 1263
1264 r->unparsed_uri.len = r->uri_end - r->uri_start; 1264 r->unparsed_uri.len = r->uri_end - r->uri_start;
1265 r->unparsed_uri.data = r->uri_start; 1265 r->unparsed_uri.data = r->uri_start;
1266 1266
1267 r->valid_unparsed_uri = (r->space_in_uri || r->empty_path_in_uri) ? 0 : 1; 1267 r->valid_unparsed_uri = r->empty_path_in_uri ? 0 : 1;
1268 1268
1269 if (r->uri_ext) { 1269 if (r->uri_ext) {
1270 if (r->args_start) { 1270 if (r->args_start) {
1271 r->exten.len = r->args_start - 1 - r->uri_ext; 1271 r->exten.len = r->args_start - 1 - r->uri_ext;
1272 } else { 1272 } else {