Welcome! Log In Create A New Profile

Advanced

Re: Invalid HTTP_IF_NONE_MATCH request header

Valentin V. Bartenev
June 15, 2017 06:52PM
On Thursday 15 June 2017 17:45:49 Etienne Robillard wrote:
> Hi,
>
> 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.

http://nginx.org/en/docs/http/ngx_http_core_module.html#etag

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:
http://nginx.org/en/docs/http/ngx_http_fastcgi_module.html#parameters

wbr, Valentin V. Bartenev

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Invalid HTTP_IF_NONE_MATCH request header

Etienne Robillard June 15, 2017 01:48PM

Re: Invalid HTTP_IF_NONE_MATCH request header

Etienne Robillard June 15, 2017 05:46PM

Re: Invalid HTTP_IF_NONE_MATCH request header

Valentin V. Bartenev June 15, 2017 06:52PM

Re: Invalid HTTP_IF_NONE_MATCH request header

Francis Daly June 15, 2017 06:10PM

Re: Invalid HTTP_IF_NONE_MATCH request header

Etienne Robillard June 15, 2017 06:30PM

Re: Invalid HTTP_IF_NONE_MATCH request header

Francis Daly June 15, 2017 07:04PM

Re: Invalid HTTP_IF_NONE_MATCH request header

Etienne Robillard June 15, 2017 07:40PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 150
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready