Skip to main content

Bug Tracker

Side navigation

#165 closed bug (invalid)

Opened September 01, 2006 09:16AM UTC

Closed November 11, 2006 02:04PM UTC

Last modified June 19, 2007 08:08AM UTC

Last-Modified and Firefox 1.0

Reported by: klaus.hartl@stilbuer 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;
Attachments (0)
Change History (5)

Changed October 01, 2006 02:33PM UTC by joern comment:1

resolution: → fixed
status: newclosed

Fixed in SVN (swallowing the exception).

Changed October 26, 2006 02:23PM UTC by anonymous comment:2

component: → ajax
priority: → blocker
resolution: → invalid
status: reopenedclosed
type: → bug

SPAMPOLICE

Changed November 06, 2006 09:21PM UTC by John comment:3

cc: ""John
component: ajax1
keywords: response headerJohn
milestone: → 1
priority: blocker1
summary: Unavailable response header breaks Firefox 1.0John
type: bug1
version: → 1

Changed November 11, 2006 02:04PM UTC by anonymous comment:4

component: → ajax
priority: → blocker
resolution: → invalid
status: reopenedclosed
type: → bug

SPAMPOLICE

Changed November 17, 2006 10:35PM UTC by john comment:5

summary: JohnLast-Modified and Firefox 1.0