Open2300 - Bug Report 2006x 03x 09x 183117

BUG: Wunderground reporting / wu2300

Something on wunderground's server has changed, it is not accepting data from wu2300 any more. (my last good data submitted with the 1.10 version of wu2300 was at around 4PM CST, March 8, 2006.) The URL that wu2300 builds works when pasted into a web browser or with wget from the command line. Ethereal reveals that wu2300 is sending a GET request like this:

GET http://weatherstation.wunderground.com/weatherstation/updateweatherstation.php?ID=KOKNORMA6&PASSWORD=*******&dateutc=2006-03-09+18%3A15%3A18&tempf=48.02&dewptf=37.53&humidity=67&windspeedmph=10.51&winddir=337.5&rainin=0.00&dailyrainin=0.18&baromin=29.430&softwaretype=open2300%20v1.10&action=updateraw

wget sends a GET request without the http://weatherstation.wunderground.com part, i.e.

GET /weatherstation/updateweatherstation.php?ID=KOKNORMA6&PASSWORD=*******&dateutc=2006-03-09+18%3A15%3A18&tempf=48.02&dewptf=37.53&humidity=67&windspeedmph=10.51&winddir=337.5&rainin=0.00&dailyrainin=0.18&baromin=29.430&softwaretype=open2300%20v1.10&action=updateraw

wget also sends some more http headers like User-Agent, Host, and Accept.

I removed the http://weatherstation.wunderground.com from urlline in wu2300.c, and added the other http headers to the http_request_url function in linux2300.c. Now the ethereal dump of the conversation is very similar to wget and the online data is updating again. Here's the code snippets:

linux2300.c
        //sprintf(buffer, "GET %s\nHTTP/1.0\n\n", urlline);
        sprintf(buffer, "GET %s HTTP/1.0\r\nUser-Agent: open2300/1.10-2\r\nAccept: */*\r\nHost: weatherstation.wunderground.com\r\nConnection: Keep-Alive\r\n\r\n", urlline);


wu2300.c
        //sprintf(urlline, "http://%s%s?ID=%s&PASSWORD=%s",
                        // WEATHER_UNDERGROUND_BASEURL,WEATHER_UNDERGROUND_PATH,
        sprintf(urlline, "%s?ID=%s&PASSWORD=%s",
                        WEATHER_UNDERGROUND_PATH,
                        config.weather_underground_id,config.weather_underground_password);

Test case

Environment

Open2300 version: 1.10
Shared libraries:  
Server OS: Fedora Core 4

-- DougKennedy - 09 Mar 2006

Follow up

Fix record

Comment

Underground Weather is still silently rejecting unfixed open2300 upload records. Fix works, needs to be incorporated into a release!

1 June: Doug Kennedy posted this fix on 9 March 2006, so he saw a problem at that time. My own encounter with the problem didn't take place until April 27th, and as of May 31 there were still reports on the Yahoo mailing list from people for whom this was just starting to be a problem. It looks as though Weather Underground is staggering the release of this change - perhaps by implementing it as part of an upgrade - or possibly it's a side-effect of an otherwise unrelated site fix. Whatever, the Open2300 fix is straightforward and works just fine. I changed the status to 'Resolved' as we have a solution from Doug Kennedy (way to go!), it just needs to be incorporated into the source.

-- PeterTattersall - 01 Jun 2006

I will see if I can get some time to integrate some of the many fixes I have received the past year.

I am thinking about maybe putting the project on SVN and give some more people access to the sources. People that have submitted well working patches already.

-- KennethLavrsen - 03 Jun 2006

Fix is now implemented in my 1.11 sources.

Getting close to release.

-- KennethLavrsen - 19 Jul 2006
Topic revision: r5 - 19 Jul 2006, KennethLavrsen
Copyright © 1999-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
This website only use harmless session cookies. See Cookie Policy for details. By using this website you accept the use of these cookies.