Maxim Dounin
November 11, 2010 07:14PM
Hello!

On Thu, Nov 11, 2010 at 03:16:11PM -0600, Ryan Malayter wrote:

> On Wed, Nov 10, 2010 at 7:32 AM, Maxim Dounin <mdounin@mdounin.ru> wrote:
> > "Some download clients" probably have to be fixed, as 200 is
> > allowed response for range requests.
> >
> >> Is there a workaround for this problem?
> >
> > You may pass Range requests to backends with something like
> >
> >    proxy_set_header Range $http_range;
> >    proxy_set_header If-Range $http_if_range;
> >
> > and don't cache responses to these requests at all:
> >
> >    proxy_no_cache $http_range $http_if_range;
> >
>
> Should nginx honor "Range" requests for files that are in cache
> locally? 0.7.67 doesn't seem to do so in my testing. In fact, it

It does so as long as response in cache has Content-Length header.

> always seems to send 200 with the entire file, even for static files
> that are hosted on the local file system.

Most likely you tested it wrong.

> Is Range support unimplemented?

It is, and works ok here.

GET / HTTP/1.1
Host: localhost
Range: bytes=0-10

HTTP/1.1 206 Partial Content
Server: nginx/0.8.53
Date: Fri, 12 Nov 2010 00:04:34 GMT
Content-Type: text/html
Content-Length: 11
Connection: keep-alive
Last-Modified: Sat, 30 Aug 2008 11:12:56 GMT
Content-Range: bytes 0-10/1445

<!DOCTYPE h

Maxim Dounin

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

Partial Requests (206) on Reverse Proxy Cache

niwo November 10, 2010 08:03AM

Re: Partial Requests (206) on Reverse Proxy Cache

Maxim Dounin November 10, 2010 08:36AM

Re: Partial Requests (206) on Reverse Proxy Cache

Ryan Malayter November 11, 2010 04:20PM

Re: Partial Requests (206) on Reverse Proxy Cache

Maxim Dounin November 11, 2010 07:14PM

Re: Partial Requests (206) on Reverse Proxy Cache

Ryan Malayter November 12, 2010 09:24AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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