Welcome! Log In Create A New Profile

Advanced

Re: Does Nginx supports If-Range ?

July 03, 2017 09:26PM
Hi!

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 theentire file(200). Why not
serve the partial content if its cached version matches the If-Range header?

Make sure that the ETag value in the header If-Range is same as the entity
ETag, don’t forget the double quotation marks. Maybe you need to support
the simple demo.




On 4 July 2017 at 04:10:01, Nelson Marcos (nelsonmarcos@gmail.com) wrote:

Hello everyone!

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 error happened on my server(Nginx 1.10.2) but I was also able to
reproduce it on my Macbook (nginx 1.12.0).

Thanks for any help :)

Kinds,
NM

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

Does Nginx supports If-Range ?

Nelson Marcos July 03, 2017 04:10PM

Re: Does Nginx supports If-Range ?

tokers July 03, 2017 09:26PM

Re: Does Nginx supports If-Range ?

Maxim Dounin July 04, 2017 08:22AM

Re: Does Nginx supports If-Range ?

Nelson Marcos July 04, 2017 10:30AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 296
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