weather doesn't follow redirects
bahamat opened this issue · 3 comments
Weather fails for me.
$ ./weather
Decoding the response from http://geocode.jessfraz.com/forecast failed: invalid character '<' looking for beginning of value
So I tcpdump
d to see what it was doing and reproduce it manually.
$ curl -D - -X POST -d '{"lat":XX.XXXX,"lng":-XX.XXXX,"units":"auto","exclude":["hourly","minutely"]}' http://geocode.jessfraz.com/forecast
HTTP/1.1 301 Moved Permanently
Date: Thu, 08 Jan 2015 23:36:33 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=d4f28a5de551b9cc2c12fe45765a8efcb1420760193; expires=Fri, 08-Jan-16 23:36:33 GMT; path=/; domain=.jessfraz.com; HttpOnly
Location: https://geocode.jessfraz.com/forecast
Server: cloudflare-nginx
CF-RAY: 1a5c37cafff00da9-SJC
<html>
<head><title>301 Moved Permanently</title><script type="text/javascript">
...
Following redirects...
curl -L -X POST -d '{"lat":XX.XXXX,"lng":XX.XXXX,"units":"auto","exclude":["hourly","minutely"]}' http://geocode.jessfraz.com/forecast
{"error":true,"message":"Latitude and longitude were not properly sent."}
which is another issue itself.
also I dont think I ever updated the binaries to use the https updates I
added
On Thu, Jan 8, 2015 at 3:45 PM, Brian Bennett notifications@github.com
wrote:
Weather fails for me.
$ ./weather
Decoding the response from http://geocode.jessfraz.com/forecast failed: invalid character '<' looking for beginning of valueSo I tcpdumpd to see what it was doing and reproduce it manually.
$ curl -D - -X POST -d '{"lat":XX.XXXX,"lng":-XX.XXXX,"units":"auto","exclude":["hourly","minutely"]}' http://geocode.jessfraz.com/forecast
<title>301 Moved Permanently</title><script type="text/javascript"> ...
HTTP/1.1 http://geocode.jessfraz.com/forecastHTTP/1.1 301 Moved Permanently
Date: Thu, 08 Jan 2015 23:36:33 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=d4f28a5de551b9cc2c12fe45765a8efcb1420760193; expires=Fri, 08-Jan-16 23:36:33 GMT; path=/; domain=.jessfraz.com; HttpOnly
Location: https://geocode.jessfraz.com/forecast
Server: cloudflare-nginx
CF-RAY: 1a5c37cafff00da9-SJCFollowing redirects...
curl -L -X POST -d '{"lat":XX.XXXX,"lng":XX.XXXX,"units":"auto","exclude":["hourly","minutely"]}' http://geocode.jessfraz.com/forecast
{"error":true,"message":"Latitude and longitude were not properly sent."}which is another issue itself.
—
Reply to this email directly or view it on GitHub
#5.
Jessie Frazelle
4096R / D4C4 DD60 0D66 F65A 8EFC 511E 18F3 685C 0022 BFF3
pgp.mit.edu http://pgp.mit.edu/pks/lookup?op=get&search=0x18F3685C0022BFF3
if you build from source I think its fine
On Thu, Jan 8, 2015 at 3:56 PM, Jessica Frazelle me@jessfraz.com wrote:
also I dont think I ever updated the binaries to use the https updates I
addedOn Thu, Jan 8, 2015 at 3:45 PM, Brian Bennett notifications@github.com
wrote:Weather fails for me.
$ ./weather
Decoding the response from http://geocode.jessfraz.com/forecast failed: invalid character '<' looking for beginning of valueSo I tcpdumpd to see what it was doing and reproduce it manually.
$ curl -D - -X POST -d '{"lat":XX.XXXX,"lng":-XX.XXXX,"units":"auto","exclude":["hourly","minutely"]}' http://geocode.jessfraz.com/forecast
<title>301 Moved Permanently</title><script type="text/javascript"> ...
HTTP/1.1 http://geocode.jessfraz.com/forecastHTTP/1.1 301 Moved Permanently
Date: Thu, 08 Jan 2015 23:36:33 GMT
Content-Type: text/html
Transfer-Encoding: chunked
Connection: keep-alive
Set-Cookie: __cfduid=d4f28a5de551b9cc2c12fe45765a8efcb1420760193; expires=Fri, 08-Jan-16 23:36:33 GMT; path=/; domain=.jessfraz.com; HttpOnly
Location: https://geocode.jessfraz.com/forecast
Server: cloudflare-nginx
CF-RAY: 1a5c37cafff00da9-SJCFollowing redirects...
curl -L -X POST -d '{"lat":XX.XXXX,"lng":XX.XXXX,"units":"auto","exclude":["hourly","minutely"]}' http://geocode.jessfraz.com/forecast
{"error":true,"message":"Latitude and longitude were not properly sent."}which is another issue itself.
—
Reply to this email directly or view it on GitHub
#5.Jessie Frazelle
4096R / D4C4 DD60 0D66 F65A 8EFC 511E 18F3 685C 0022 BFF3
pgp.mit.edu
http://pgp.mit.edu/pks/lookup?op=get&search=0x18F3685C0022BFF3
Jessie Frazelle
4096R / D4C4 DD60 0D66 F65A 8EFC 511E 18F3 685C 0022 BFF3
pgp.mit.edu http://pgp.mit.edu/pks/lookup?op=get&search=0x18F3685C0022BFF3
I updated the binaries