diff options
-rw-r--r-- | networking/wget.c | 25 |
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 | /* | ||
602 | Response 204 doesn't say "null file", it says "metadata | ||
603 | has changed but data didn't": | ||
604 | |||
605 | "10.2.5 204 No Content | ||
606 | The server has fulfilled the request but does not need to return | ||
607 | an entity-body, and might want to return updated metainformation. | ||
608 | The response MAY include new or updated metainformation in the form | ||
609 | of entity-headers, which if present SHOULD be associated with | ||
610 | the requested variant. | ||
611 | |||
612 | If the client is a user agent, it SHOULD NOT change its document | ||
613 | view from that which caused the request to be sent. This response | ||
614 | is primarily intended to allow input for actions to take place | ||
615 | without causing a change to the user agent's active document view, | ||
616 | although any new or updated metainformation SHOULD be applied | ||
617 | to the document currently in the user agent's active view. | ||
618 | |||
619 | The 204 response MUST NOT include a message-body, and thus | ||
620 | is always terminated by the first empty line after the header fields." | ||
621 | |||
622 | However, 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: |