difficulty adding headers

Maxim Dounin mdounin at mdounin.ru
Fri Jun 27 18:06:20 UTC 2014


On Fri, Jun 27, 2014 at 12:54:09PM -0400, ura wrote:

> thanks for responding here.
> the 206 code was advised by every tutorial i found online.
> i am using nginx 1.7.2, so cannot upgrade.

Ok, so your problem is likely due to "return 206" added.  Just 
remove it, as well as other garbage from your config you don't 
understand.  It's really good idea to read the documentation to 
make sure you understand what you are writing into your config 
instead of blindly following "tutorials online".

I very much doubt there is any tutorial which suggests to use 
"return 206" though, as it's always wrong.

> >You shouldn't try to add Accept-Ranges header manually. It will
> >be added automatically when nginx supports range requests to the
> >resource in question.
> how do i notify nginx to serve particular file extensions with the
> accept-ranges header?

Again: you shouldn't do anything.  If range requests are 
supported, the header will be added automatically.

> what would cause these headers to not be outputted in this case?

See above, mostly likely it's caused by "return 206" in your 

Maxim Dounin

More information about the nginx mailing list