Welcome! Log In Create A New Profile

Advanced

Nginx always returns 206 with HTTP header 'Range: bytes=0-'

August 07, 2010 05:52AM
When requesting a static file with HTTP header "Range: bytes=0-", nginx always return 206 Partial Content. Is it a bug?

This issue can be reproduced like this:

curl -v -o /dev/null -H "Range: bytes=0-" 'http://wiki.nginx.org/local/propaganda/postgresql.gif'

* About to connect() to wiki.nginx.org port 80
* Trying 69.168.53.49... connected
* Connected to wiki.nginx.org (69.168.53.49) port 80
> GET /local/propaganda/postgresql.gif HTTP/1.1
> User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
> Host: wiki.nginx.org
> Accept: */*
> Range: bytes=0-
>
< HTTP/1.1 206 Partial Content
< Server: nginx/0.8.47
< Date: Sat, 07 Aug 2010 09:35:58 GMT
< Content-Type: image/gif
< Content-Length: 196
< Last-Modified: Tue, 06 Nov 2007 20:42:04 GMT
< Connection: keep-alive
< Expires: Mon, 06 Sep 2010 09:35:58 GMT
< Cache-Control: max-age=2592000
< Content-Range: bytes 0-195/196
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 196 100 196 0 0 1329 0 --:--:-- --:--:-- --:--:-- 0Connection #0 to host wiki.nginx.org left intact

Thanks,
- Huan
Subject Author Posted

Nginx always returns 206 with HTTP header 'Range: bytes=0-'

huandu August 07, 2010 05:52AM

Re: Nginx always returns 206 with HTTP header 'Range: bytes=0-'

Igor Sysoev August 07, 2010 06:46AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

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