aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2008-06-22 16:28:02 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2008-06-22 16:28:02 +0000
commit50b5cac59f5140a980824cdeb03b477ca588be6e (patch)
tree7144acb234dacf6320c580d9a2bbc9f8b0b3926b
parent2a210e5df2a4d4951ede95cde04af1c9507212f7 (diff)
downloadbusybox-w32-50b5cac59f5140a980824cdeb03b477ca588be6e.tar.gz
busybox-w32-50b5cac59f5140a980824cdeb03b477ca588be6e.tar.bz2
busybox-w32-50b5cac59f5140a980824cdeb03b477ca588be6e.zip
wget: accept code 204.
-rw-r--r--networking/wget.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/networking/wget.c b/networking/wget.c
index 7198197dd..b45811533 100644
--- a/networking/wget.c
+++ b/networking/wget.c
@@ -598,6 +598,31 @@ int wget_main(int argc ATTRIBUTE_UNUSED, char **argv)
598 /* eat all remaining headers */; 598 /* eat all remaining headers */;
599 goto read_response; 599 goto read_response;
600 case 200: 600 case 200:
601/*
602Response 204 doesn't say "null file", it says "metadata
603has changed but data didn't":
604
605"10.2.5 204 No Content
606The server has fulfilled the request but does not need to return
607an entity-body, and might want to return updated metainformation.
608The response MAY include new or updated metainformation in the form
609of entity-headers, which if present SHOULD be associated with
610the requested variant.
611
612If the client is a user agent, it SHOULD NOT change its document
613view from that which caused the request to be sent. This response
614is primarily intended to allow input for actions to take place
615without causing a change to the user agent's active document view,
616although any new or updated metainformation SHOULD be applied
617to the document currently in the user agent's active view.
618
619The 204 response MUST NOT include a message-body, and thus
620is always terminated by the first empty line after the header fields."
621
622However, in real world it was observed that some web servers
623(e.g. Boa/0.94.14rc21) simply use code 204 when file size is zero.
624*/
625 case 204:
601 break; 626 break;
602 case 300: /* redirection */ 627 case 300: /* redirection */
603 case 301: 628 case 301: