cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Announcements
Want to learn some quick and useful tips to make your day easier? Check out how Calvin uses Replay to get feedback from other teams at Dropbox here.

Dropbox API Support & Feedback

Find help with the Dropbox API from other developers.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: Content-Type charset on safari and firefox

Content-Type charset on safari and firefox

Ge Y.
New member | Level 2

Hi, I'm trying to make a call to API V2 via the browser. Here in the spec you wrote 

> - Set the Content-Type to "text/plain; charset=dropbox-cors-hack" instead of "application/json" or "application/octet-stream".

I tried doing this. It works on Chrome, but it somehow does not work on safari and Firefox. 

In both firefox and safari, the browser seems to overwrite the supplied charset, and uses `UTF-8` for the XHR instead. 

This truly made me sad T_T. Are you guys familiar with this situation?

Thanks!

4 Replies 4

Alexandra F.1
New member | Level 1

Hi Ge - thanks for reporting. I think this is a bug in Firefox. See this StackOverflow post: https://stackoverflow.com/questions/33902289/using-dropbox-v2-api-from-browser . We haven't had reports about this happening in Safari yet. Is it the exact same error? If not, can you share the code and output, so I can try to reproduce on my side?

Ge Y.
New member | Level 2

Hey Alex, 

 

I think it is exactly the same error in safari. Aka the charset gets re-written by the browser.

 

Ge

Alexandra F.1
New member | Level 1

Thanks for the report. I'll look into it.

Greg-DB
Dropbox Staff

I'm not seeing this in Safari. Can you share some code to reproduce the issue? Also, please let us know what version of Safari you're using.

Also, if you are seeing it in Safari, doe the answer at http://stackoverflow.com/a/34168434/1305693 help? 

Thanks in advance! 

Need more support?