#165 closed bug (invalid)
Last-Modified and Firefox 1.0
Reported by: | Owned by: | ||
---|---|---|---|
Priority: | undecided | Milestone: | |
Component: | ajax | Version: | |
Keywords: | John | Cc: | John |
Blocked by: | Blocking: |
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 (5)
comment:1 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
comment:2 Changed 16 years ago by
Component: | → ajax |
---|---|
Priority: | → blocker |
Resolution: | → invalid |
Status: | reopened → closed |
Type: | → bug |
SPAMPOLICE
comment:3 Changed 16 years ago by
Cc: | John added; "" removed |
---|---|
Component: | ajax → 1 |
Keywords: | John added; response header removed |
Milestone: | → 1 |
Priority: | blocker → 1 |
Summary: | Unavailable response header breaks Firefox 1.0 → John |
Type: | bug → 1 |
Version: | → 1 |
comment:4 Changed 16 years ago by
Component: | → ajax |
---|---|
Priority: | → blocker |
Resolution: | → invalid |
Status: | reopened → closed |
Type: | → bug |
SPAMPOLICE
comment:5 Changed 16 years ago by
Summary: | John → Last-Modified and Firefox 1.0 |
---|
Note: See
TracTickets for help on using
tickets.
Fixed in SVN (swallowing the exception).