Wrong Content-Type for SERVICE_OFFLINE

Use this forum to discuss issues related to the SD-JSON service.
Post Reply
Posts: 1
Joined: Mon Sep 21, 2020 3:28 pm

Wrong Content-Type for SERVICE_OFFLINE

Post by adball »

I have noticed a problem with SERVICE_OFFLINE responses: The Content-Type is incorrect (text/html instead of application/json):

HTTP/1.1 200 OK
Date: Mon, 21 Sep 2020 22:23:33 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
Server: nginx/1.18.0 (Ubuntu)
Vary: Accept-Encoding
X-Frame-Options: SAMEORIGIN
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block

{"response":"SERVICE_OFFLINE","code":3000,"serverID":"20141201.web.1","message":"Server offline for maintenance.","datetime":"2020-09-21T22:23:33Z","token":"CAFEDEADBEEFCAFEDEADBEEFCAFEDEADBEEFCAFE"}
SD Staff
Posts: 947
Joined: Tue Aug 14, 2007 3:15 pm

Re: Wrong Content-Type for SERVICE_OFFLINE

Post by rkulagow »

The code has a global that should be setting application/json for all responses, including the Server Offline. What are you seeing for a standard request?
Post Reply