2889: Cannot update diff using IE8

Vou****@gmai***** (Google Code) (Is this you? Claim this profile.)
david
david
Aug. 12, 2013
2926
What version are you running?
    1.7.4

What's the URL of the page containing the problem?
    /reviewboard/r/<review num>/

What steps will reproduce the problem?
1. Create review, upload diff
2. Try to update diff

Expected result: Diff is updated

Actual result:
"Download file" dialog appears. Looks like, IE offers to download a JSON response. Diff file is not updated in review.

What operating system are you using? What browser?
Windows 7, IE8. Not reproducible with Google Chrome browser and IE9/10.
#1 0003****@zte.c***** (Google Code) (Is this you? Claim this profile.)
my issue is same.
how do you resolve it?
thanks
#3 kevin.*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Me too, after upgrading to 1.7.6, we also encounter this issue sometimes. is there any way to work around it?
#4 khan****@gmai***** (Google Code) (Is this you? Claim this profile.)
Not only this happens to update diff, it happens to upload file too.

Can we have an update on when will this bug be fixed?

Thanks
chipx86
#5 chipx86
No idea. We dropped support for IE8 in 1.7.x, but I'd be completely open to taking patches.

Older versions of IE behave in some strange ways at times when it comes to certain AJAX calls with file uploads.
#6 raja****@gmai***** (Google Code) (Is this you? Claim this profile.)
It looks like IE8 attempts to download the file when the mimetype is application/json and that is what the server is sending. There are many posts in StackOverflow around this and the answer seems to be send "text/plain" instead of "application/json" if its IE8 and everything is good. 

The other option is to include a "X-Content-Type-Options: nosniff" which instructs not to sniff the mimetype and serve the file as is. (Reference: http://security.stackexchange.com/questions/7506/using-file-extension-and-mime-type-as-output-by-file-i-b-combination-to-dete/7531#7531, Item 4 in the Defenses section in that post). Since IE is the only one to allow X-Content-Type-Options, can we include this in the WebApiResponse. I already see a block in WebApiResponse to convert mimetype to 'text/plain' if its not an ajax and there are uploads, but since this is an AJAX call, it wouldnt pass through this block ?
david
#7 david
  • +PendingReview
  • +david
david
#8 david
Fixed in djblets master (b784ab8). Thanks!
  • -PendingReview
    +Fixed
#9 shir*****@126**** (Google Code) (Is this you? Claim this profile.)
I have the same issue, reviewboard 1.7.25, IE 8,
How can i resolve it now?

what the means with:
Fixed in djblets master (b784ab8).

#10 shir*****@126**** (Google Code) (Is this you? Claim this profile.)
I have upgrade to Djblets 0.7.29, but the error is not resolved.
Thank your help again