gonuldas / gwtupload

Automatically exported from code.google.com/p/gwtupload
Other
0 stars 0 forks source link

UploadServlet should set the content-type to application/xml when returning XML data #183

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Use the multiuploader widget to upload a file to the upload servlet
2. Inspect the get request to servlet.gupld and confirm that the response 
content is in XML format, but the response header indicates text/html

What is the expected output? What do you see instead?
When the servlet is returning XML, it should set the content-type response 
header to application/xml

What version of the product are you using? On what operating system?
0.6.7-SNAPSHOT on GAE

Please provide any additional information below.
This small implementation error causes complete failure of uploads with 
incorrect error messages.  In order to exploit Google App Engine's full 
potential, we have enabled their "Page Speed" optimization filters.  One of the 
non-default optimizations that have been enabled is the "Remove Quotes" 
rewriter 
(https://developers.google.com/speed/pagespeed/module/filter-quote-remove).  
This filter removes unnecessary quotes from HTML attributes. This works fine 
for HTML, but breaks the validation of XML responses (<?xml version="1.0" 
encoding="UTF-8"?> is valid, but <?xml version=1.0 encoding=UTF-8?> is not).  
The rewriter filter does not modify XML content, so it would not break 
GWTUpload if the servlet would correctly set the content-type of its responses.

Original issue reported on code.google.com by stefaan....@gmail.com on 16 Sep 2013 at 9:43

GoogleCodeExporter commented 8 years ago
IIRC, I had problems at the beginning, the thing is that it was so some time 
ago, but in IE we had problems not being able to read the content if it was 
text/plain or text/xml, because the way to read the server response is reading 
the body of the iframe target of the hidden form-panel.

Could you test whether this change breaks IE?

Original comment by manuel.carrasco.m on 24 Oct 2013 at 2:41

GoogleCodeExporter commented 8 years ago

Original comment by manuel.carrasco.m on 27 Apr 2014 at 9:03