SchedulesDirect / JSON-Service

Code related to download, slice-and-dice and generation of JSON into database.
36 stars 5 forks source link

BUG: endpoints aren't returning content-type=application/json #49

Closed Slugger closed 9 years ago

Slugger commented 9 years ago

The content-type for the /programs endpoint is set to application/json even though the response isn't valid json (each line of the response is json but the response as a whole is not valid json). The content type should probably be set to text/plain.

rkulagowski commented 9 years ago

API 20141201 should now return proper JSON in all responses. Please confirm.

Slugger commented 9 years ago

So to validate, I disabled the "ignore header flag" I added to my client to work around this bug in the past. The /schedules endpoint immediately fails. It's returning content-type: text/plain when it shouldn't so I don't process the schedules, so I never get to asking for /programs.

I've updated the title of this bug. Basically all endpoints are now supposed to return content-type: application/json and as of this moment, /schedules does not (but /schedules/md5 does).

rkulagowski commented 9 years ago

This should now be fixed and will send the correct content type.

Slugger commented 9 years ago

Confirmed.