Welcome! Log In Create A New Profile

Advanced

NGINX send 206 but wget retries

Roger Fischer
August 02, 2019 07:06PM
Hello,

I am making a byte range request to NGINX using wget. NGINX responds with status code 206 (partial content), but instead of downloading the content, wget retries.

Request:

wget -S 'http://cache.example.com/video5.ts' --header="Range: bytes=0-1023"

Output from wget:

--2019-08-02 15:36:44-- http://cache.example.com/video5.ts
Resolving cache.example.com (cache.example.com)... 172.16.200.5
Connecting to cache.example.com (cache.example.com)|172.16.200.5|:80... connected.
HTTP request sent, awaiting response...
HTTP/1.1 206 Partial Content
Server: nginx/1.17.0a
Date: Fri, 02 Aug 2019 22:36:45 GMT
Content-Type: video/MP2T
Content-Length: 1024
Connection: keep-alive
X-Server-IP: 172.16.200.5
Access-Control-Allow-Origin: *
Access-Control-Allow-Headers: Range
Access-Control-Allow-Methods: GET
Timing-Allow-Origin: *
Access-Control-Max-Age: 86400
Access-Control-Expose-Headers: X-Server-IP,Location
Age: 86555
Content-Range: bytes 0-1023/135090032
Retrying.

Then wget sends the request again, with the same result.

The same wget request to the origin succeeds. The data is cached properly (wget without the range header succeeds).

Adding —debug to the wget provides not much more.

Registered socket 3 for persistent reuse.
Disabling further reuse of socket 3.
Closed fd 3
Retrying.

There is nothing in the NGINX error log.

I am speculating that NGINX closes the connection before the data is delivered. But why?

Thanks…

Roger


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

NGINX send 206 but wget retries

Roger Fischer August 02, 2019 07:06PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 184
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready