Ticket #5734 (closed defect: worksforme)
Intermittent xhrPost failure
| Reported by: | jeffg | Owned by: | jburke |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.2 |
| Component: | Core | Version: | 1.0 |
| Severity: | critical | Keywords: | |
| Cc: |
Description (last modified by alex) (diff)
I'm testing my code under a variety of browsers including Safari 3 (windows). The same xhrPost code seems to work reliably on all but Safari. I occasionally see the xhrPost get an error response and the status is zero. (tk has also seen this but on FF under OSX). The server is not sent anything.
Is this a bug or an expected condition that requires the client to retry again when it occurs? (yikes!)
The relevant code snippet goes something like this:
<script type="text/javascript"
src="<?=$docURL?>/dojo.x/dojo/dojo.js"
djConfig="parseOnLoad: true, usePlainJson: true"></script>
...
dojo.xhrPost( {
url: _urlAjax,
content: {'ver' : 1, 'func': 'poll', 'args':jsonStr },
handleAs: "json",
timeout: g_timeout, // Time in milliseconds
handle: function(response, ioArgs){
if( response instanceof Error && ioArgs.xhr.status === 0 )
console.debug( "WTF?");
else console.debug( "normal");
}
Attachments
Change History
Note: See
TracTickets for help on using
tickets.