Closed Bug 1145742 Opened 5 years ago Closed 2 years ago

[P2P Sharing] Send the correct HTTP response codes in HttpServerService

Categories

(Firefox OS Graveyard :: Gaia, defect, P2)

defect

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: drs, Unassigned)

References

Details

(Whiteboard: [spark])

We currently send the response code 200 to every request, even if we're rejecting it. We should do a full audit of `HttpServerService`, make it return the correct response codes in every place, and make all `HttpClientService` code handle these.
Sorry for lack of documentation on fxos-web-server, but you can see how HTTPResponse.send() works here:

https://github.com/justindarc/fxos-web-server/blob/master/src/http-response.js#L33

Also, HTTPResponse.sendFile() has the same API:

https://github.com/justindarc/fxos-web-server/blob/master/src/http-response.js#L33


tl;dr -- 1st param == content, 2nd param == status code
copy/paste fail in Comment 1 -- the *correct* link for HTTPResponse.sendFile() is https://github.com/justindarc/fxos-web-server/blob/master/src/http-response.js#L66
Whiteboard: [lightsaber] → [ignite]
Whiteboard: [ignite] → [spark]
Assignee: drs → nobody
Firefox OS is not being worked on
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.