Invalid HTTP_IF_NONE_MATCH request header
Valentin V. Bartenev
vbart at nginx.com
Thu Jun 15 22:50:30 UTC 2017
On Thursday 15 June 2017 17:45:49 Etienne Robillard wrote:
> I can confirm that my python script is working from the command line.
> The server (wsgiref) sends a ETag on the initial request with the 200 OK
> status code. Additional requests will have the request header
> If-None-Match set with the correct ETag value and a 304 Not Modified
> response is returned.
> The problem appears to be caused by a missing ETag header in the initial
> request when running under FastCGI and nginx only. Furthermore, I'm not
> sure if the "etag on" configuration option is really doing something.
> What do you think?
A quote from the documentation:
| etag on | off;
| Enables or disables automatic generation of the “ETag” response
| header field for static resources.
Your script isn't a static resource, so the directive does nothing for
location with fastcgi configuration.
Moreover, you don't need to explicitly specify any "fastcgi_param" for
request headers (i.e. HTTP_*) since they are passed automatically (if the
header presents in request).
See the "Parameters Passed to a FastCGI Server" paragraph here:
wbr, Valentin V. Bartenev
More information about the nginx