Closed Bug 740458 Opened 12 years ago Closed 12 years ago

Local search intermediary doesn't respect format=json argument

Categories

(Pancake Graveyard :: Front-end, defect)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: gbrander, Assigned: gbrander)

Details

http://localhost:6543/search/bing?q=foo&format=json

vs

http://play.fxhome.mozillalabs.com:4321/search/bing?q=foo&format=json

What happens:

local: JSON string is returned with html property containing all markup, regardless of format argument.

play: JSON string is returned. JSON contents depends on format argument.
Looks like the problem is in /pancake-web/pancake/web/views/search.py.

Params are not passed through directly, but added by hand to a new params object that is then sent to the remote server.
Target Milestone: --- → M2
Also strange: the JSON property names for this API are TitleCase. This seems at odds with the formats used in other APIs.
Problems with format argument resolved in https://bitbucket.org/mozillapancake/pancake/changeset/cbc9690f6165.

Looking into JSON keys.
It looks like we're passing API results directly from bing/twitter to the response. I'm going to add views for these that format the JSON to match other APIs we use.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.