Local search intermediary doesn't respect format=json argument

RESOLVED FIXED in M2

Status

Pancake
Front-end
RESOLVED FIXED
6 years ago
6 years ago

People

(Reporter: gordonb, Assigned: gordonb)

Tracking

unspecified
x86
Mac OS X

Details

(Assignee)

Description

6 years ago
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.
(Assignee)

Comment 1

6 years ago
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
(Assignee)

Comment 2

6 years ago
Also strange: the JSON property names for this API are TitleCase. This seems at odds with the formats used in other APIs.
(Assignee)

Comment 3

6 years ago
Problems with format argument resolved in https://bitbucket.org/mozillapancake/pancake/changeset/cbc9690f6165.

Looking into JSON keys.
(Assignee)

Comment 4

6 years ago
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.
(Assignee)

Updated

6 years ago
Status: NEW → RESOLVED
Last Resolved: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.