Disabling file resuming with X-Accel / Removing headers

Adrián Navarro adrian at navarro.at
Tue Mar 6 22:56:32 UTC 2012


Hello,

I have a config using fastcgi and different locations

FastCGI is set as internal:
	location ~ \.php$ {
		internal;
		
		fastcgi_pass 127.0.0.1:9000;
		
		fastcgi_send_timeout 120;
		fastcgi_read_timeout 120;

		fastcgi_index index.php;
		include fastcgi_params;
	}

Services (just two) are rewritten.
	location /get {
		rewrite ^ /get.php last;
	}

I am using nginx's X-Accel headers, and I want to disable file
resuming. That implies:
- suppresing output header "Accept-Ranges: bytes"
- suppresing input header "Range"

I am now trying to do the first. Apparently, headers_more won't work
when put in the location /get, or for location /get.php.
(more_clear_headers 'Accept-Bytes';).

There is no luck using Lua either, in many different ways. I even
tried putting Lua before the fcgi, and it does allow adding headers,
but not replacing or resetting them. As if this header was set a lot
later in the process (I think so, because it's added when X-Accel is
set internally, therefore after fcgi is done processing).

Anyone have any pointers? I'm running out of ideas now.

Thank you a lot for your time

Adrián



More information about the nginx mailing list