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
$.ajax DELETE requests hang due to "keep-alive" header #2069
Comments
There are too many things in play here. Maybe consider removing the jquery ajax call and using builtin stuff. jQuery could be doing something. Also, what do you mean by subsequent calls hang? Subsequent ajax calls? Or subsequent page reloads? Try isolating the issue more. There is a lot of extra fluff (middleware, etc) in the example which again broadens the problem space. |
Hi Roman - I have isolated the issue. I built the same server using Flask in Python and compared the subsequent headers (Flask works). I've also resolved the issue by closing the connection (as indicated in the solution). I've included all the above in order to let you know that no obvious middleware was missing. By subsequent calls hanging, I mean that any subsequent call, even hitting refresh, completely hangs. |
Just tried it on my machine using express 3.5.1 and your example worked. I see the delete and I can refresh just fine. I would also recommend disabling any extensions you might have (try this in incognito mode). |
Interesting...thanks for trying it. I did disable all extensions and also tried in incognito mode. Chromium 34 works, but Chrome 33 and FF 28 did not. |
Not trying to ignore suggestions, just that I spent 10 hours on this, so had already tried a lot of things before isolating. |
I'm wondering if #2060 may be related. Using v0.10.25 FYI. I'll try to replicate on another machine. |
I'll take a look in Firefox a bit later. First I gotta find a way to make
|
So, it appeared that it was Sophos running in the background, distorting the requests. Strangely Safari wasn't having a problem. Permanently uninstalled. Sorry for the red herring! |
I am having the exact same issue (any operation after a DELETE hangs on Firefox and Chrome, fine on Safari). I tried uninstalling Sophos, but it did not fix the issue for me. @brandoncarl do you have any additional information? |
@cahrens when you go to http://jsfiddle.net/icodeforlove/75gUy/ do you see two alerts or only one? |
Just one. |
@cahrens if you only see one alert, the second DELETE is hanging on jsfiddle's web site, which does not even use express, so your machine is clearly still broken. You'll have to fix your machine, but it's not an express issue. |
Sorry, I should have confessed that I am not using express. This was the only post that I could find when searching that exactly replicated the issue I am seeing. Thanks for putting together the jsfiddle example. |
Ah, gotcha.
Credit goes to this person: http://openforum.sophos.com/t5/Sophos-Anti-Virus-for-Mac-Home/Sophos-9-0-7-Web-Protection-HTTP-DELETE-bug/td-p/15823 :) |
Following up, the way that I tried uninstalling Sophos did not actually uninstall it. Disabling "Web Protection" in Sophos did solve my problem. |
When issuing a same-origin AJAX delete via jQuery, subsequent calls to the server via the same client are hanging.
Using Express 3.5.1, jQuery 1.11.0, and Chrome 33.x (also occurs in FF28).
To replicate:
The solution is to use
res.set("Connection", "close").send(204)
. That said, it's not clear to me that the user should need to "force close" the connection so much as prevent the "keep-alive" header from being used.The text was updated successfully, but these errors were encountered: