Mercurial > hg > nginx-quic
annotate conf/fastcgi.conf @ 8113:097f578a4a8f
HTTP/2: fixed segfault on DATA frames after 400 errors.
If 400 errors were redirected to an upstream server using the error_page
directive, DATA frames from the client might cause segmentation fault
due to null pointer dereference. The bug had appeared in 6989:2c4dbcd6f2e4
(1.13.0).
Fix is to skip such frames in ngx_http_v2_state_read_data() (similarly
to 7561:9f1f9d6e056a). With the fix, behaviour of 400 errors in HTTP/2
is now similar to one in HTTP/1.x, that is, nginx doesn't try to read the
request body.
Note that proxying 400 errors, as well as other early stage errors, to
upstream servers might not be a good idea anyway. These errors imply
that reading and processing of the request (and the request headers)
wasn't complete, and proxying of such incomplete request might lead to
various errors.
Reported by Chenglong Zhang.
author | Maxim Dounin <mdounin@mdounin.ru> |
---|---|
date | Wed, 23 Sep 2020 19:50:49 +0300 |
parents | 62869a9b2e7d |
children |
rev | line source |
---|---|
537 | 1 |
3383 | 2 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; |
537 | 3 fastcgi_param QUERY_STRING $query_string; |
4 fastcgi_param REQUEST_METHOD $request_method; | |
5 fastcgi_param CONTENT_TYPE $content_type; | |
6 fastcgi_param CONTENT_LENGTH $content_length; | |
7 | |
8 fastcgi_param SCRIPT_NAME $fastcgi_script_name; | |
9 fastcgi_param REQUEST_URI $request_uri; | |
10 fastcgi_param DOCUMENT_URI $document_uri; | |
11 fastcgi_param DOCUMENT_ROOT $document_root; | |
12 fastcgi_param SERVER_PROTOCOL $server_protocol; | |
6168
62869a9b2e7d
Added the REQUEST_SCHEME parameter.
Maxim Dounin <mdounin@mdounin.ru>
parents:
4379
diff
changeset
|
13 fastcgi_param REQUEST_SCHEME $scheme; |
4379
4e2551a83291
Added the HTTPS fastcgi_param to fastcgi.conf.
Valentin Bartenev <vbart@nginx.com>
parents:
3383
diff
changeset
|
14 fastcgi_param HTTPS $https if_not_empty; |
537 | 15 |
16 fastcgi_param GATEWAY_INTERFACE CGI/1.1; | |
1330 | 17 fastcgi_param SERVER_SOFTWARE nginx/$nginx_version; |
537 | 18 |
19 fastcgi_param REMOTE_ADDR $remote_addr; | |
20 fastcgi_param REMOTE_PORT $remote_port; | |
21 fastcgi_param SERVER_ADDR $server_addr; | |
22 fastcgi_param SERVER_PORT $server_port; | |
23 fastcgi_param SERVER_NAME $server_name; | |
24 | |
25 # PHP only, required if PHP was built with --enable-force-cgi-redirect | |
26 fastcgi_param REDIRECT_STATUS 200; |