[BusyBox 0003344]: wget.c misinterpretes HTTP Error 204

bugs at busybox.net bugs at busybox.net
Sun Jun 22 16:28:25 UTC 2008


The following issue has been CLOSED 
====================================================================== 
http://busybox.net/bugs/view.php?id=3344 
====================================================================== 
Reported By:                arved
Assigned To:                BusyBox
====================================================================== 
Project:                    BusyBox
Issue ID:                   3344
Category:                   Networking Support
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             05-16-2008 04:59 PDT
Last Modified:              06-22-2008 09:28 PDT
====================================================================== 
Summary:                    wget.c misinterpretes HTTP Error 204
Description: 
204 NO CONTENT is the common result if an empty file is requested.

BusyBox treats it as an error.

Fix:
add a "case 204:" below "case 200:" at line 601 in wget.c
====================================================================== 

---------------------------------------------------------------------- 
 bernhardf - 05-16-08 05:16  
---------------------------------------------------------------------- 
What about the other, currently unhandled 20x codes, i.e.
201, 202, 203, 204, 205 ?

http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html 

---------------------------------------------------------------------- 
 vda - 05-18-08 08:22  
---------------------------------------------------------------------- 
Standard legalese is cryptic:

10.2.5 204 No Content

The server has fulfilled the request but does not need to return an
entity-body, and might want to return updated metainformation. The
response MAY include new or updated metainformation in the form of
entity-headers, which if present SHOULD be associated with the requested
variant.

If the client is a user agent, it SHOULD NOT change its document view from
that which caused the request to be sent. This response is primarily
intended to allow input for actions to take place without causing a change
to the user agent's active document view, although any new or updated
metainformation SHOULD be applied to the document currently in the user
agent's active view.

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


IOW: it doesn't say that 204 means "null file", it says "metadata has
changes but data didn't". I am confused.

So, is it true that real-world web servers send 204 for null files? Which
web servers (and which versions of those)? 

---------------------------------------------------------------------- 
 arved - 05-18-08 08:36  
---------------------------------------------------------------------- 
@vda:
I have had this problem with boa.
Standard wget does not return with an error, busybox does.

@bernhardf:
Yes i think wget should not return an error on any 20x code. But i did not
do any research if those you mention require special code handling. 

---------------------------------------------------------------------- 
 vda - 05-18-08 09:01  
---------------------------------------------------------------------- 
Which version of boa does this? 

---------------------------------------------------------------------- 
 bernhardf - 05-19-08 04:28  
---------------------------------------------------------------------- 
arved, please provide enough info for us to reproduce this 204 behaviour.

1) boa version
2) samplecode that can be use to reproduce the 204 locally.

thanks, 

---------------------------------------------------------------------- 
 arved - 05-19-08 05:36  
---------------------------------------------------------------------- 
telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
GET /foo HTTP/1.1

HTTP/1.1 204 NO CONTENT
Date: Mon, 19 May 2008 12:32:48 GMT
Server: Boa/0.94.14rc21
Accept-Ranges: bytes
Connection: Keep-Alive
Keep-Alive: timeout=10, max=1000 

---------------------------------------------------------------------- 
 vda - 06-22-08 09:28  
---------------------------------------------------------------------- 
Fixed in rev.22470. Thanks! 

Issue History 
Date Modified   Username       Field                    Change               
====================================================================== 
05-16-08 04:59  arved          New Issue                                    
05-16-08 04:59  arved          Status                   new => assigned     
05-16-08 04:59  arved          Assigned To               => BusyBox         
05-16-08 05:16  bernhardf      Note Added: 0007734                          
05-18-08 08:22  vda            Note Added: 0007774                          
05-18-08 08:36  arved          Note Added: 0007784                          
05-18-08 09:01  vda            Note Added: 0007794                          
05-19-08 04:28  bernhardf      Note Added: 0007804                          
05-19-08 05:36  arved          Note Added: 0007814                          
06-22-08 09:28  vda            Status                   assigned => closed  
06-22-08 09:28  vda            Note Added: 0008454                          
======================================================================




More information about the busybox-cvs mailing list