Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slightly more extensive weather request/response logging #81

Closed
wants to merge 1 commit into from
Closed

Slightly more extensive weather request/response logging #81

wants to merge 1 commit into from

Conversation

savonarola
Copy link

No description provided.

@schachmat
Copy link
Owner

Heyho @savonarola,

can you explain why you would need it that verbose?

@savonarola
Copy link
Author

Hello!

I have tried to setup wego and obtained an api key, but kept getting only "Unable to get weather data: http status 403" message.

So I had to add some logging to see the full message:

2016/03/21 00:53:12 Weather response: "HTTP/1.1 403 API key does not have access to the resource.\r\nContent-Length: 1233\r\nAccess-Control-Allow-Headers: content-type\r\nAccess-Control-Allow-Origin: *\r\nAge: 0\r\nCache-Control: public, max-age=120\r\nConnection: keep-alive\r\nContent-Type: text/html\r\nDate: Sun, 20 Mar 2016 21:53:12 GMT\r\nExpires: Sun, 20 Mar 2016 21:55:11 GMT\r\nVia: WebCelerate\r\nX-Cache: MISS\r\nX-Node: zfdl_api_01\r\nX-Powered-By: ASP.NET\r\nX-Webcelerate: WebCelerate - www.ukfast.co.uk/web-acceleration.html\r\n\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Strict//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd\">\r\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\"/>\r\n<title>403 - Forbidden: Access is denied.</title>\r\n<style type=\"text/css\">\r\n<!--\r\nbody{margin:0;font-size:.7em;font-family:Verdana, Arial, Helvetica, sans-serif;background:#EEEEEE;}\r\nfieldset{padding:0 15px 10px 15px;} \r\nh1{font-size:2.4em;margin:0;color:#FFF;}\r\nh2{font-size:1.7em;margin:0;color:#CC0000;} \r\nh3{font-size:1.2em;margin:10px 0 0 0;color:#000000;} \r\n#header{width:96%;margin:0 0 0 0;padding:6px 2% 6px 2%;font-family:\"trebuchet MS\", Verdana, sans-serif;color:#FFF;\r\nbackground-color:#555555;}\r\n#content{margin:0 0 0 2%;position:relative;}\r\n.content-container{background:#FFF;width:96%;margin-top:8px;padding:10px;position:relative;}\r\n-->\r\n</style>\r\n</head>\r\n<body>\r\n<div id=\"header\"><h1>Server Error</h1></div>\r\n<div id=\"content\">\r\n <div class=\"content-container\"><fieldset>\r\n  <h2>403 - Forbidden: Access is denied.</h2>\r\n  <h3>You do not have permission to view this directory or page using the credentials that you supplied.</h3>\r\n </fieldset></div>\r\n</div>\r\n</body>\r\n</html>\r\n"

to understand what was wrong.

@schachmat
Copy link
Owner

That did probably not help much? It still just says 403. Did you manage to solve the problem nevertheless?

Sometimes the worldweatheronline service has some downtime, so I would rather like a second backend (openweathermap was requested some time ago) if you want to have a try at that.

@cVeqT2vkiSX5kJVJxcVmz7rKHKbu9M9FNixoPNC
Copy link
Contributor

Maybe the change in Policy and recent DDoS are the reason for the 403

To use our Weather API new users will get Premium Trial key for free testing for 60 days and user may upgrade by purchasing a weather subscription at anytime.
source

@schachmat
Copy link
Owner

Thanks for the hint @camelinc, I've opened #82 to track progress.

@savonarola When did you register your API key?

@savonarola
Copy link
Author

@schachmat the key was obtained on 2016/03/20

@schachmat
Copy link
Owner

And could you fix the problem, does it work now? If not, I assume it is related to the changes, worldweatheronline is doing.

@schachmat
Copy link
Owner

Closing, since the verbosity of debug output in this PR does not justify the added code complexity. I added the Enhancement tag, so other people can find it, if they really need that much detail.

Further discussion on the backend changes should continue in #82.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants