ohmage / server

The ohmage server application.
37 stars 25 forks source link

fixes #839 #840

Closed stevenolen closed 10 years ago

stevenolen commented 10 years ago

correctly set content type to application/json when json is returned

stevenolen commented 10 years ago

@joshuaselsky just want to confirm with you that this wont produce any odd side effects before we merge in. it appears the only odd side effect is the existing return :+1:

jshslsky commented 10 years ago

The one other place I would check here is Response History in the Android client.

stevenolen commented 10 years ago

This line/line area appear to me to imply that the phone code assumes the response will be json, and then around line 381 any issues with the return not being json/readable/network failure are caught and handled:

https://github.com/ohmage/android-lib/blob/master/src/org/ohmage/responsesync/ResponseSyncService.java#L263

jshslsky commented 10 years ago

In OhmageApi.java, the Content-Type of the response seems to be mostly ignored except for special cases such as campaign read where XML is returned. Still worth a test if you can!

stevenolen commented 10 years ago

oh i see, I should have looked there of course! yup, I'm going to deploy this to mtest and see what happens!

stevenolen commented 10 years ago

works! (and by works, I mean, doesn't break anything!)