Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getResponse handles errors inconsistently #112

Open
jfn12587 opened this issue Oct 29, 2013 · 0 comments
Open

getResponse handles errors inconsistently #112

jfn12587 opened this issue Oct 29, 2013 · 0 comments

Comments

@jfn12587
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant