Welcome! Log In Create A New Profile

Advanced

Re: no content length on 204s; hangs wget

Maxim Dounin
April 08, 2013 02:56PM
Hello!

On Mon, Apr 08, 2013 at 02:39:07PM -0400, Jeff Kaufman wrote:

> I've written a content handler for nginx that does:
>
> return NGX_HTTP_NO_CONTENT;
>
> This produces output like:
>
> $ curl -D- 'http://localhost:8050/no_content_test'
> HTTP/1.1 204 No Content
> Server: nginx/1.2.7
> Connection: keep-alive
> Date: Mon, 08 Apr 2013 18:28:02 GMT
>
> Testing this in curl it's fine, but wget waits for a content header,
> timing out after 60s. I tried doing the opposite of
> ngx_http_clear_content_length to set a content length, but it doesn't
> get sent.
>
> Is there a way to add a Content-Length on a 204 response or is this a wget bug?

Adding a Content-Length will be inconsistent with RFC2616,
http://tools.ietf.org/html/rfc2616#section-10.2.5:

The 204 response MUST NOT include a message-body, and thus is always
terminated by the first empty line after the header fields.

So it looks like a wget bug.

--
Maxim Dounin
http://nginx.org/en/donation.html

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

no content length on 204s; hangs wget

Jeff Kaufman 2348 April 08, 2013 02:40PM

Re: no content length on 204s; hangs wget

Maxim Dounin 1516 April 08, 2013 02:56PM



Sorry, you do not have permission to post/reply in this forum.

Online Users

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