When using the following kind of code:
YAHOO.util.Connect.setForm(uploadform, true);
YAHOO.util.Connect.asyncRequest('POST', url, uploadElt);
If the server returns a response with an error code in the 4xx range with a
response body, this body will not be taken into account by IE (7 and 6 as
far as I could tell) and will not be set into the IFrame created
dynamically by YUI. Therefore the following statement in uploadFile in
connection.js:
obj.responseText =
io.contentWindow.document.body?io.contentWindow.document.body.innerHTML:nul
l;
Will set obj.responseText to null because IE seems to believe that the
response body should be discarded since it was an error (sigh).
Note that it doesn't change anything whether or not the content-type of the
response is text/html or text/plain
Note also that the code works fine if the response is using a status code
like 200.
Eventually I think it's a bug in IE but since it is triggered in YUI I
report it here.
george puckett
Connection
2.2.2
Public
|
Date: 2009-01-24 08:01 The YUI project has been migrated from Source Forge to YUILibrary.com. |
|
Date: 2008-09-05 19:27
|
|
Date: 2008-08-14 23:24
|
|
Date: 2008-06-12 08:44
|
|
Date: 2008-06-09 06:55
|
|
Date: 2008-04-30 23:37
|
| Field | Old Value | Date | By |
|---|---|---|---|
| allow_comments | 1 | 2009-01-24 08:01 | gpuckett |
| assigned_to | tsha | 2009-01-24 08:01 | gpuckett |
| status_id | Open | 2008-08-14 23:24 | tsha |
| close_date | - | 2008-08-14 23:24 | tsha |
| status_id | Pending | 2008-06-12 08:44 | seel20 |
| close_date | 2008-06-09 06:55 | 2008-06-12 08:44 | seel20 |
| close_date | - | 2008-06-09 06:55 | gpuckett |
| resolution_id | None | 2008-06-09 06:55 | gpuckett |
| status_id | Open | 2008-06-09 06:55 | gpuckett |
| summary | responseText set to null with IE on HTTP error response | 2008-06-06 21:51 | gpuckett |
| assigned_to | nobody | 2008-04-30 23:37 | gpuckett |