Zeus config returns responses with Content-Type text/html, not application/json

RESOLVED FIXED

Status

RESOLVED FIXED
8 years ago
7 years ago

People

(Reporter: rnewman, Unassigned)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [qa+])

(Reporter)

Description

8 years ago
$content_type = "text/html; charset=UTF-8";
  ...
     http.sendResponse("401 Node reassignment", $content_type, '"server request: node reassignment"', "");

The PHP and Python servers use application/json:

  Components.utils.import("resource://services-sync/main.js");
  let url = Weave.Service.storageURL + "meta/global";
  JSON.stringify(new (Weave.Resource)(url).get().headers);

  > "{\"content-type\":\"application/json\",\"strict-transport-security\":\"max-age=86400\",\"date\":\"Fri, 07 Oct 2011 22:19:45 GMT\",\"connection\":\"Keep-Alive\",\"x-weave-timestamp\":\"1318025985.88\",\"content-length\":\"258\"}"

If we ever end up validating responses prior to parsing, this will end badly.

Comment 1

7 years ago
Changed the "sync database health check" in { dev, test, stage, phx, scl2 } to return application/json rather than text/html.
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Reporter)

Comment 2

7 years ago
I have amended my patch for Bug 692714 to not mention the discrepancy.

Thanks, atoll!
Whiteboard: [qa+]
You need to log in before you can comment on or make changes to this bug.