Ticket #7969 (closed bug: fixed)
$.get() returns "success" when the request fails by timeout
| Reported by: | mappy | Owned by: | |
|---|---|---|---|
| Priority: | low | Milestone: | 1.5 |
| Component: | ajax | Version: | 1.4.4 |
| Keywords: | Cc: | ||
| Blocking: | Blocked by: |
Description
When $.get() is called to an address where no server is running - e.g. http://127.0.0.1:82 - the request succeeds, returning 'success' as the second callback argument
Expected behavior: Request fails, does not return 'success' to the callback.
Steps to reproduce:
- Save the code from http://pastebin.com/RfXmekB7 as a local .htm file
- Open the .htm in a browser and watch the javascript console
- Status appears as 'success', despite no server existing at 127.0.0.1:82
Change History
comment:2 Changed 2 years ago by jitter
- Priority changed from undecided to low
- Resolution set to fixed
- Status changed from new to closed
- Component changed from unfiled to ajax
- Milestone changed from 1.next to 1.5
Thanks for taking the time to contribute to the jQuery project by writing a bug report.
I used the code you provided on that pastebin. This was only reproducible using Firefox. Anyhow this has already been fixed and works as expected with the today released jQuery 1.5b1 version (which includes a major ajax rewrite)
Please verify with this http://pastebin.com/sk3mmEiG if it is indeed fixed for you also.
comment:3 Changed 2 years ago by mappy
I've tested both scripts with Chrome 9 only. Changing to jQuery 1.5b1, as in your script, seems to make the inner .get function never execute. No further lines are shown after Loading the invalid address ' http://127.0.0.1:82/?'...
This behaviour is fine by me, thanks for your response.
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.

Relevant chat log from #jquery on irc.freenode.org