Skip to content

getResponse handles errors inconsistently #112

@jfn12587

Description

@jfn12587

Strophe.Request.getResponse attempts to detect if the data received is "valid", and in one invalid case will throw a "parsererror". However, if it detects responseText, it logs the same error but does not throw. This causes the function to return null, making _dataRecv effectively a no-op and polling the server again. The issue this is causing for us is that when a user loses their login credentials (cookie), the web server in front of our XMPP server returns a 302 immediately which the ajax request sees as a 200. Strophe then begins hammering the web server for binds because it thinks the connection is still active and responses are just coming back very quickly. I believe in the case of responseText on the XHR we should similarly throw a "parsererror" but I don't know if there are cases where this would not be desirable.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions