Does Nginx supports If-Range ?

Nelson Marcos nelsonmarcos at gmail.com
Tue Jul 4 14:29:45 UTC 2017


Thanks Zhang and Maxim!

I'm checking how to fix that on my backend.

Kind,
NM

2017-07-04 9:21 GMT-03:00 Maxim Dounin <mdounin at mdounin.ru>:

> Hello!
>
> On Mon, Jul 03, 2017 at 05:09:28PM -0300, Nelson Marcos wrote:
>
> > I don't know if it is an expected behaviour or a bug:
> >
> >
> > Scenario 1(OK): If I perform a request *with the header Range*,  Nginx
> > serves the *partial content(HTTP 206)*.
> >
> > Scenario 2 (NOT OK): If I perform a request *with the header Range AND
> the
> > header "If-Range" *with the Etag, Nginx serves the *entire file*(200).
> Why
> > not serve the partial content if its cached version matches the If-Range
> > header?
> >
> > In both scenarios the file is already cached.
> >
> > Here is my conf: https://pastebin.com/gQQ0GSg6
> >
> > Here are my requests and my files: https://pastebin.com/rxLwYaSK
>
> The "ETag" header in the response is invalid, as well as
> "If-Range" in the request.  Quoting from the second link:
>
> : Etag: 345a2dd5c8f22e9ffaf250151ea820df
> : If-Range: 345a2dd5c8f22e9ffaf250151ea820df
>
> In both cases entity tag should be in double quotes, see
> https://tools.ietf.org/html/rfc2616#section-14.19.
>
> Fixing your backend to return correct ETag will make things work.
> Alternatively, you can use Last-Modified date in the If-Range
> request header instead.
>
> --
> Maxim Dounin
> http://nginx.org/
> _______________________________________________
> nginx mailing list
> nginx at nginx.org
> http://mailman.nginx.org/mailman/listinfo/nginx
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.nginx.org/pipermail/nginx/attachments/20170704/0bf4266d/attachment.html>


More information about the nginx mailing list