mirror of
https://git.busybox.net/busybox.git
synced 2024-12-22 04:53:23 +08:00
wget: accept code 204.
This commit is contained in:
parent
2a210e5df2
commit
50b5cac59f
@ -598,6 +598,31 @@ int wget_main(int argc ATTRIBUTE_UNUSED, char **argv)
|
|||||||
/* eat all remaining headers */;
|
/* eat all remaining headers */;
|
||||||
goto read_response;
|
goto read_response;
|
||||||
case 200:
|
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;
|
break;
|
||||||
case 300: /* redirection */
|
case 300: /* redirection */
|
||||||
case 301:
|
case 301:
|
||||||
|
Loading…
Reference in New Issue
Block a user