Modify ↓
Ticket #165 (closed bug: invalid)
Last-Modified and Firefox 1.0
| Reported by: | klaus.hartl@… | Owned by: | |
|---|---|---|---|
| Priority: | undecided | Milestone: | |
| Component: | ajax | Version: | |
| Keywords: | John | Cc: | John |
| Blocking: | Blocked by: |
Description
If the response header "Last-Modified" is not available, the following code breaks Firefox 1.0:
var modRes = xml.getResponseHeader("Last-Modified");
if ( ifModified && modRes ) jQuery.lastModified[url] = modRes;
It throws the following exception:
Error: [Exception... "Component returned failure code: 0x80040111 (NS_ERROR_NOT_AVAILABLE) [nsIXMLHttpRequest.getResponseHeader]" nsresult: "0x80040111 (NS_ERROR_NOT_AVAILABLE)" location: "JS frame :: http://192.168.1.199/js/jquery.js :: anonymous :: line 5029" data: no] Source File: http://192.168.1.199/js/jquery.js Line: 5029
Fixed this with an try/catch block:
var modRes;
try {
modRes = xml.getResponseHeader("Last-Modified");
} catch (e) {
// do something or do nothing?
}
if ( ifModified && modRes ) jQuery.lastModified[url] = modRes;
Change History
comment:2 Changed 7 years ago by anonymous
- Priority set to blocker
- Resolution set to invalid
- Status changed from reopened to closed
- Component set to ajax
- Type set to bug
SPAMPOLICE
comment:3 Changed 7 years ago by John
- Cc John added; "" removed
- Component changed from ajax to 1
- Summary changed from Unavailable response header breaks Firefox 1.0 to John
- Priority changed from blocker to 1
- Version set to 1
- Milestone set to 1
- Keywords John added; response header removed
- Type changed from bug to 1
Please follow the bug reporting guidlines and use jsFiddle when providing test cases and demonstrations instead of pasting the code in the ticket.
Note: See
TracTickets for help on using
tickets.

Fixed in SVN (swallowing the exception).