304 output not compatible with XMLHTTPRequest spec
Reported by Brian Johnson | May 8th, 2009 @ 08:21 PM
This is the relevant section:
The XML response entity body is either a Document representing the response entity body or null. The XML response entity body is the return value of the following algorithm:
-
If the response entity body is "null" terminate these steps and return null.
-
If a Content-Type is present and it does not contain a MIME type (ignoring any parameters) that is text/xml, application/xml or ends in +xml terminate these steps and return null. (Do not terminate these steps if there is no Content-Type header at all.)
The problem is that rack_process.rb deletes the content type and sets the output to [] which returns an empty response body. Because it removes the content-type header, XMLHTTPRequest will interpret the response as text/xml. An empty string is not valid XML and will produce a "no element found" error in Firefox. It seems that the finsh/to_a method should set the content type to something like text/plain or return a response body of "null" for 304 status responses.
Comments and changes to this ticket
-
josh August 3rd, 2009 @ 03:20 PM
- State changed from new to invalid
-
Brian Johnson August 10th, 2009 @ 07:22 PM
is this invalid because it's already been fixed somewhere or invalid because you don't think it's the correct behavior?
Please Sign in or create a free account to add a new ticket.
With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป