Javascript file upload plugin with progress bar support. Works in all major browsers, including IE7+, Chrome, Firefox, Safari, and Opera. No dependencies - use it with or without jQuery.
995
stars
267
forks
source link
Accept header is encoded causing 406 Not Acceptable #98
I have set the option responseType to json.
When uploading a file to my service, I get a 406 Not Acceptable error due to encoding of the "Accept" header.
header["Accept"]: application%2Fjson%2C%20text%2Fjavascript%2C%20%2F%3B%20q%3D0.01
it should be
header["Accept"]: application/json, text/javascript, /; q=0.01
This issue is similar to issue #93
This is the problematic code snippet:
As a dirty workaround I just have inserted an if statement that excludes the "Accept" header from encoding.