Closed
Bug 274025
Opened 20 years ago
Closed 20 years ago
If-Modified-Since has a date in the wrong format (must not be localized)
Categories
(Core :: Networking: HTTP, defect)
Tracking
()
VERIFIED
INVALID
People
(Reporter: miha.valencic, Assigned: darin.moz)
Details
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0 Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0 When requesting information, Firefox includes HTTP header If-Modified-Since. This header has the wrong value which causes problems with most J2EE servers (who call getDateHeader() method in Servlet API. This is the FireFox request: GET /portal/binary/com.epicentric.contentmanagement.servlet.ContentDeliveryServlet/sample/images/foto_2.gif HTTP/1.1 Host: d-brackoa.mobitel.si:7001 User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en-gb,en;q=0.5 Accept-Encoding: gzip,deflate Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Keep-Alive: 300 Connection: keep-alive Cookie: JSESSIONID=B42Hk0hIus89ThbmW0inCLS56HMBKCLTNqsdId5VoRUdfISW2lBE!1063154115 If-Modified-Since: Sre, 1 dec 2004 12:56:40 GMT Cache-Control: max-age=0 Please note the wrong value for If-Modified-Since header. It should be Wed, 1 dec 2004... instead of Sre (which is localized string). Reproducible: Always Steps to Reproduce: 1. Set regional settings to something non english (like German, French, Slovenian) 2. Make a request to some page, which does not prevent caching 3. Make another request (and observe what gets sent to it Actual Results: Firefox sends the worng If-Modified-Since header. Expected Results: Send the right date. As described in RFC 1945. This poses problems with many java servlet containers (such as Tomcat, BEA, etc) when requesting information through servlets (
Updated•20 years ago
|
Assignee: firefox → darin
Component: General → Networking: HTTP
Product: Firefox → Core
QA Contact: firefox.general → core.networking.http
Version: unspecified → 1.7 Branch
Comment 1•20 years ago
|
||
What do you call changing the "Regional Setting" precisely ? I'm not sure if you're talking about a FF setting (I see several related, but none with that exact name) or an OS setting. If an OS setting, it probably has yet to be confirmed this is really OS=ALL. Did you check with the suite ?
Comment 2•20 years ago
|
||
Miha: What Last-Modified date did the server send initially?
| Reporter | ||
Comment 3•20 years ago
|
||
Regional settings of the host operating system (Windows 2000 in my case). I have two locales available (slovenian and english). This error was confirmed with my colleague who has german and english. (In reply to comment #1) > What do you call changing the "Regional Setting" precisely ?
| Reporter | ||
Comment 4•20 years ago
|
||
Hey! Right on! The Last-Modified is in the wrong format as well. Last-Modified: Sre, 1 dec 2004 12:56:40 GMT And then, in the next request FF sends the If-Modified-Since with the same value. Is this a bug? It is definitely on the J2ee side... What about ff? Should it send the right date or no date at all (in case ff can not parse the returned date)? Miha (In reply to comment #2) > Miha: What Last-Modified date did the server send initially?
Comment 5•20 years ago
|
||
There was some mid-air collision between your comments and mine. I tested with the french version of Firefox 1.0, under a french version of WinXP (so the exact equivalent of the platform shown by your headers), with of course the OS regional settings set to french, french as the preferred language, everything french everywhere, and Live HTTP Headers stills shows me the If-Modified-Since value sent is in english. So at the end, I read the source : http://lxr.mozilla.org/aviarybranch/source/netwerk/protocol/http/src/nsHttpChannel.cpp#1429 1430 val = mCachedResponseHead->PeekHeader(nsHttp::Last_Modified); 1431 if (val) 1432 mRequestHead.SetHeader(nsHttp::If_Modified_Since, 1433 nsDependentCString(val)); FireFox does *not* create the value it sends inside If_Modified_Since, it only copies the value it received inside Last_Modified. Your script has sent an invalid value, this is what is sent back to your web server. Closing INVALID.
Status: UNCONFIRMED → RESOLVED
Closed: 20 years ago
Resolution: --- → INVALID
Comment 6•20 years ago
|
||
(In reply to comment #4) > And then, in the next request FF sends the If-Modified-Since with the same value. > > Is this a bug? No, it's not, see RFC 2616 (http://www.faqs.org/rfcs/rfc2616.html) 14.25 Note 3: " clients are advised to use the exact date string received in a previous Last- Modified header field whenever possible." vrfy.
Status: RESOLVED → VERIFIED
| Reporter | ||
Comment 7•20 years ago
|
||
Guys, thanks for your effort. I checked the RFC as well. Thanks, Miha.
You need to log in
before you can comment on or make changes to this bug.
Description
•