Re: XMLHttpRequest and multipart responses
"Christoph Dorn" <[email protected]> 25 Feb 2007 13:02:40 -0800
| Newsgroups | gmane.comp.mozilla.devel.xml |
|---|---|
| Organization | http://groups.google.com |
| Message-ID | <[email protected]> |
> It supports multipart/x-mixed-replace. multipart/mixed doesn't really make much > sense in an XMLHttpRequest context -- it would require that the parts be exposed > to the caller all at once, which the API doesn't really allow. I agree that the multipart/mixed response does not make much sense in the XMLHttpRequest context but was not sure if it is handled the same as when the browser displays a multipart/mixed response with a text/ xml section directly. I have a custom handler for the text/firephp section (via a Firefox extension) which eats the data so that when the browser displays the multipart/mixed response it only shows the text/ xml section and properly renders the XML structure. When looking at the source of the page the full multipart message is visible though. If the XMLHttpRequest object loaded the response data at the same point as the text/xml renderer then it should in theory work but I guess it looks at the response at a lower level. The multipart/x-mixed-replace response type does not work for my purposes as I would need to send the debug information first and then send the actual response as only the last multipart section survives. Looks like I will have to obtain the debug information for a request via a different mechanism than a multipart response. I was trying to avoid a second request to the server to fetch it but I guess its the only way. Thanks! -Christoph