Bug 9211 - wget treats 201 as a failure
Summary: wget treats 201 as a failure
Status: RESOLVED FIXED
Alias: None
Product: Busybox
Classification: Unclassified
Component: Other (show other bugs)
Version: 1.24.x
Hardware: All Linux
: P5 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-29 22:49 UTC by James
Modified: 2016-08-31 11:30 UTC (History)
1 user (show)

See Also:
Host:
Target:
Build:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description James 2016-08-29 22:49:46 UTC
Unlink GNU wget, busybox's implementation treats 201 as an error. Logically any 2xx class response would be a success though.

Using alpine:

# docker run alpine wget
BusyBox v1.24.2 (2016-06-23 08:49:16 GMT) multi-call binary.

Usage: wget [-csq] [-O FILE] [-Y on/off] [-P DIR] [-U AGENT] [-T SEC] URL...

Retrieve files via HTTP or FTP

	-s	Spider mode - only check file existence
	-c	Continue retrieval of aborted transfer
	-q	Quiet
	-P DIR	Save to DIR (default .)
	-T SEC	Network read timeout is SEC seconds
	-O FILE	Save to FILE ('-' for stdout)
	-U STR	Use STR for User-Agent header
	-Y	Use proxy ('on' or 'off')
# docker run alpine wget -O - http://192.168.1.202/201.php
Connecting to 192.168.1.202 (192.168.1.202:80)
wget: server returned error: HTTP/1.1 201 Created

Ubuntu 16.04
# wget -q -O - 192.168.1.202/201.php ; echo $?
0
Comment 1 James 2016-08-29 22:50:31 UTC
Some other poor soul on the internet that ran into this. https://dev.openwrt.org/ticket/16885
Comment 2 Denys Vlasenko 2016-08-31 11:30:54 UTC
Fixed in git. Thanks