duckduckgo/zeroclickinfo-spice — pull request #369 by jagtalon (2014-01-09 02:47:36+00:00)
Title: Forecast: 'weather' without location doesn't work in Canada.

I think we shouldn't be checking the relevancy of the query string if we know for sure that the user wanted the weather at her current location. It wasn't working for some users in Canada because it was only accepting zip codes that were composed of numbers--an assumption that I made that led to this bug. Now to get it fixed, we should have a way of telling the JS exactly this--don't check the relevancy if the user wants the weather at her current location and nothing else.

The way I did it is that I passed a variable in the return statement from the back-end which adds an additional path in the URL request. The JS checks for this path (currently called 'current') and, if it exists, it skips relevancy.