2

I am trying to access the http server in an iPad app called "WiFi photo" from the command line using wget. It works with curl, and through firefox, but I am getting error 505 in wget.

How can I fix this error?

Output of commands I have tried

Error given by wget

mac:getphotos billy$ wget 10.0.2.34:15555
--2011-10-19 10:53:05--  http://10.0.2.34:15555/
Connecting to 10.0.2.34:15555... connected.
HTTP request sent, awaiting response... 505 HTTP Version not supported
2011-10-19 10:53:05 ERROR 505: HTTP Version not supported.

mac:getphotos billy$

Response headers from successful request in Firefox

Response Headers

Content-Length  2136
Date    Wed, 19 Oct 2011 07:58:33 GMT
Accept-Ranges   bytes
Content-Type    text/html;charset=UTF-8

Request Headers

Host    10.0.2.34:15555
User-Agent  Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:6.0.2) Gecko/20100101 Firefox/6.0.2
Accept  text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language en-gb,en;q=0.7,am;q=0.3
Accept-Encoding gzip, deflate
Accept-Charset  ISO-8859-1,utf-8;q=0.7,*;q=0.7
Connection  keep-alive
Cache-Control   max-age=0
2
  • Can you also post the headers for wget? And why not just use curl? Commented Oct 19, 2011 at 8:02
  • I want to use wget recursive with page requisites Commented Oct 19, 2011 at 8:21

1 Answer 1

1

wget only supports HTTP/1.0. See the documentation, Does Wget understand HTTP/1.?:

Wget is an HTTP/1.0 client. But, since the HTTP/1.1 protocol was designed to fully support HTTP/1.0 clients, Wget interoperates with most HTTP/1.1 servers.

It appears that the HTTP server is refusing to communicate when Wget sends an HTTP 1.0 request (which I'm pretty sure violates the spec). Consider filing a bug with the developer of the app. Otherwise you'll need to use something else like curl that supports HTTP/1.1.

Sign up to request clarification or add additional context in comments.

1 Comment

Since v1.13 in 2011 wget supports HTTP/1.1 (via) and has switched to it as default somewhere on the way to 2022 when this comment was written.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.