summaryrefslogtreecommitdiff
path: root/networking
diff options
context:
space:
mode:
authorDenis Vlasenko2008-06-22 16:28:02 +0000
committerDenis Vlasenko2008-06-22 16:28:02 +0000
commit50b5cac59f5140a980824cdeb03b477ca588be6e (patch)
tree7144acb234dacf6320c580d9a2bbc9f8b0b3926b /networking
parent2a210e5df2a4d4951ede95cde04af1c9507212f7 (diff)
downloadbusybox-50b5cac59f5140a980824cdeb03b477ca588be6e.zip
busybox-50b5cac59f5140a980824cdeb03b477ca588be6e.tar.gz
wget: accept code 204.
Diffstat (limited to 'networking')
-rw-r--r--networking/wget.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 7198197..b458115 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -598,6 +598,31 @@ int wget_main(int argc ATTRIBUTE_UNUSED, char **argv)
/* eat all remaining headers */;
goto read_response;
case 200:
+/*
+Response 204 doesn't say "null file", it says "metadata
+has changed but data didn't":
+
+"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."
+
+However, in real world it was observed that some web servers
+(e.g. Boa/0.94.14rc21) simply use code 204 when file size is zero.
+*/
+ case 204:
break;
case 300: /* redirection */
case 301: