theodi / uk-postcodes

MIT License
41 stars 17 forks source link

JSONP not working as expected #12

Closed pezholio closed 10 years ago

pezholio commented 10 years ago

Suspect this is down to caching. Investigate doing this at the middleware level?

pezholio commented 10 years ago

Here's A Thing:

https://github.com/robertodecurnex/rack-jsonp-middleware

amyjie commented 10 years ago

I'm going to run a local version and see if I can find where it's sending back the wrong answer. If I do I'll fork it and let you know.

deplorableword commented 10 years ago

Can confirm this is broken, the first request for a postcode sends it as proper JSON, otherwise as a application/octet-stream.

No idea how often the cache is cleared, so you might need to try a bunch of postcodes before you see the bug in action.

pezholio commented 10 years ago

All fixed now! :smiley_cat: