> do you have any way of sniffing traffic to the access point?
Excellent suggestion IMO.
If you don't know what goes over the wire you will have a hard time fixing it.
404 makes sense if you have omitted Host -
If you try:
telnet weather.yahooapis.com 80
GET /forecastrss?w=44418
then you also get a 404.
if you try:
telnet weather.yahooapis.com 80
GET /forecastrss?w=44418 HTTP/1.1
<newline>
then you get a 400:
client sent HTTP/1.1 request without hostname (see RFC2616 section 14.23).
but if you try:
telnet weather.yahooapis.com 80
GET /forecastrss?w=44418 HTTP/1.1
Host: weather.yahooapis.com
then you get the weather.
Oh and HTTP mandates CRLF for line and request termination, but many servers will accept a simple LF.
Ideally use:
open weather.yahooapis.com 80 \n
GET /forecastrss?w=44418 HTTP/1.1\r\n
Host: weather.yahooapis.com \r\n
\r\n
but of course \r and \n must be the actual characters, not the escape sequence. And the final <CRLF> must be present.
Or just skip the \r if you can't be bothered.
hth,
/m
Yeah, it looks like a nice piece of kit, which is why I'm so interested in it. Having read the manual, it seems it's not a very sophiaticated client, so I'd either try TCP mode or setting up an async wifi network so you can sniff it.
it's right there in your email,
and the server response:
HTTP/1.0 400 Bad Request
/m
On 21 Sep 2011, at 21:32, trandi wrote:
> GET /forecastrss?w=44418 HTTP/1.1\r\n
Also there's a \r\n after the open command, which shouldn't be necessary - right?
Though I understand you say that it works for the other server.
Sending the same request over telnet results in a 200 OK.
What does the actual code look like? What are you writing this in?
/m
ah sorry, I thought it was the 1.0 messing things up.
The Host header is not part of HTTP 1.0, is it?