Closed
Bug 33631
Opened 26 years ago
Closed 26 years ago
processing a 304 answer from a http server without a cache entry results in a crash
Categories
(Core :: Networking: Cache, defect, P3)
Tracking
()
VERIFIED
FIXED
People
(Reporter: andreas.otte, Assigned: ruslan)
References
Details
THE PROBLEM:
The method that processes a 304 answer from a http server assumes that there is
a cache entry to get additional information from. The method in question is
ProcessNotModified in nsHTTPChannel.cpp.
If there is no cache entry, the program crashes.
STEPS TO REPRODUCE:
1. Use the TestProtocols testprogram to access a page of your choice.
2. Look at the displayed headers and use the last-modified date from that header
and feed it into TestPrococols by changing the sample-header into an
if-mofified-since header with the last-modified date as value for
if-modified-since.
3. Start TestProtocols again against the same page.
4. Crash ...
Backtrace:
#0 nsCOMPtr<nsISupportsArray>::get (this=0x60)
at ../../dist/include/nsCOMPtr.h:603
#1 0x400e4a0a in nsCOMPtr<nsISupportsArray>::operator
nsDerivedSafe<nsISupportsArray> * (this=0x60) at
../../dist/include/nsCOMPtr.h:615
#2 0x403abf95 in nsHTTPHeaderArray::SetHeader (this=0x60, aHeader=0x8178c08,
aValue=0x0) at nsHTTPHeaderArray.cpp:124
#3 0x403aabfd in nsHTTPResponse::UpdateHeaders (this=0x0,
aEnumerator=0x819aa80) at nsHTTPResponse.cpp:865
#4 0x403a35be in nsHTTPChannel::ProcessNotModifiedResponse (this=0x8169f08,
aListener=0x8169fe0) at nsHTTPChannel.cpp:1833
#5 0x403a3088 in nsHTTPChannel::ProcessStatusCode (this=0x8169f08)
at nsHTTPChannel.cpp:1739
#6 0x403a2b29 in nsHTTPChannel::FinishedResponseHeaders (this=0x8169f08)
at nsHTTPChannel.cpp:1655
#7 0x403a85c1 in nsHTTPServerListener::FinishedResponseHeaders (
this=0x8164d48) at nsHTTPResponseListener.cpp:766
#8 0x403a72a9 in nsHTTPServerListener::OnDataAvailable (this=0x8164d48,
channel=0x8190224, context=0x8169f08, i_pStream=0x8178374,
i_SourceOffset=0, i_Length=0) at nsHTTPResponseListener.cpp:310
#9 0x4033b626 in nsOnDataAvailableEvent::HandleEvent (this=0x81a5970)
at nsAsyncStreamListener.cpp:384
#10 0x4033a86f in nsStreamListenerEvent::HandlePLEvent (aEvent=0x8193490)
at nsAsyncStreamListener.cpp:97
#11 0x400b89bb in PL_HandleEvent (self=0x8193490) at plevent.c:563
#12 0x400bab79 in nsEventQueueImpl::HandleEvent (this=0x810ee88,
aEvent=0x8193490) at nsEventQueue.cpp:371
#13 0x804d950 in main (argc=2, argv=0xbffff814) at TestProtocols.cpp:694
#14 0x4022d213 in __libc_start_main (main=0x804d600 <main>, argc=2,
argv=0xbffff814, init=0x804a280 <_init>, fini=0x80500b0 <_fini>,
rtld_fini=0x4000ac30 <_dl_fini>, stack_end=0xbffff80c)
at ../sysdeps/generic/libc-start.c:90
| Reporter | ||
Comment 1•26 years ago
|
||
Seems, I can't get bugzilla to display this bug in a buglist, but I can access
it directly.
Andreas, this looks like a duplicate of bug 23263, that Ruslan just fixed. If
you disagree, please reopen it. Thanks.
*** This bug has been marked as a duplicate of 23263 ***
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Actually, on further thought, this looks slightly different. Reassigning to
ruslan
Status: RESOLVED → REOPENED
Resolution: DUPLICATE → ---
Ruslan, could you look at this? It might be related to your fix.
Assignee: gordon → ruslan
Status: REOPENED → NEW
Why would we send if-modified-since if we don't have a cache entry? Is it a
real-life bug?
Comment 6•26 years ago
|
||
This is done in wallet when we want to download a set of tables from the server.
These tables are kept as files in the user's profile directory. We need to know
when the server's version of the tables are newer than the last set of tables
that we downloaded.
See bug 26760.
Don't assume anymore that the cache response is set up when processing 304.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
| Reporter | ||
Comment 8•26 years ago
|
||
verified working now, great work ruslan.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•