Changes between Initial Version and Version 1 of Ticket #15372


Ignore:
Timestamp:
May 17, 2012, 3:16:03 PM (8 years ago)
Author:
Adam Peller
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #15372

    • Property Priority changed from undecided to high
  • Ticket #15372 – Description

    initial v1  
    77Assuming nothing is running on port 801 (or use any invalid URL or even just turn off the network connection on your machine)
    88
    9 An exception occurs on the console (Chrome) but strangely it doesn't seem possible to catch that exception when the xhr is async.  dojo.xhr proceeds as if the connection were successful, calling the deferred callback for success.  Because xhr status is 0 and readyState is 4, there's really no way to differentiate this from a successful connection in _isDocumentOk.
     9An exception occurs on the console (Chrome) but strangely it doesn't seem possible to catch that exception when the xhr is async.  dojo.xhr proceeds as if the connection were successful, calling the deferred callback for success.  Because xhr status is 0 and readyState is 4, there's really no way to differentiate this from a successful connection in {{{_isDocumentOk}}}.
    1010
    1111One possible fix is to go back to checking protocol, since status:0 should only be valid for certain protocols like file:.  Unfortunately, this is a slippery slope, as there are a bunch of specialized protocols and situations where status:0 is ok, like appcache.  Not sure exactly why we stopped checking protocol, but that may be one reason.  It was also very verbose code.
    1212
    13 Another possible fix is to use ProgressEvents (XHR2?) at least where it is available.  It would be good to fix this on dojo.xhr, even if dojo.request solves the problem.  We're using the {{{/dojo/io/error}}} event, and xhr is obviously used a lot.
     13Another possible fix is to use !ProgressEvent (XHR2?) at least where it is available.  It would be good to fix this on dojo.xhr, even if dojo.request solves the problem.  We're using the {{{/dojo/io/error}}} event, and xhr is obviously used a lot.
    1414
    15 This is likely a regression from whenever we changed the _isDocumentOk code.
     15This is likely a regression from whenever we changed the {{{_isDocumentOk}}} code.