GNOME Bugzilla – Bug 89554
view source requests don't send cookies
Last modified: 2004-12-22 21:47:04 UTC
I understand this might be a Mozilla problem, but I'm not sure. Using C-u or the view-source:<url> makes a second request, but doesn't send any cookie information. Here's something to try if you've got an Amazon.com account... 1. Using Galeon, go to http://amazon.com/ and make sure you are recognized (you should see a message under the nav bar that says something to the effect of, "Hello, YOURNAME. Blah blah blah. (If you're not YOURNAME, click here.)"; if it doesn't, then log in). 2. Hit C-u or select View -> Page source or type 'view-source:' in front of the Amazon.com URL. 3. Hit C-f or select Edit -> Find... and do a search for YOURNAME in the source. You won't find it. You'll get something like: <font face=verdana,arial,helvetica size=-1><font color=#CC6600><b>Hello.</b></font> Sign in to get <a href=...>personalized recommendations</a>. New customer? <a href=...>Start here</a>. </font> Amazon.com stores a key to their user information in the ubid-main or xmain cookies (I think). Since these don't get sent during the retransmission of the source, then the app will behave differently. BTW, not sending another request for view-source: would alleviate the symptom here, but is only a partial fix, since you can always reload URLs prefixed with "view-source:". What should probably happen is both: send cookies & grab the initial source from that which is rendered on the page without sending another request (if it is available).
Prepending view-source: will not work properly; this causes a refetch and will result in the behaviour you have observed. On the other hand, selecting View Source from the menu or using it's shortcut will use mozilla's cached view-source functionality which does not refetch and you will see exactly the source for the page you have. If you are running galeon 1.2.5, then you must be running a mozilla that is no older than 1.0, so this functionality should all be in place.
Perhaps I was unclear: the bug is that cookies are not sent with the (re-)request. As a result the source viewed is wrong. Incidentally, your claim (unless it has been fixed in current development) that using C-u or View -> Page source will use the cached page is incorrect: all three approaches yield the same results (I have disk caching at 0, and memory caching at 4096). This would lead me to believe that the view-source-from-cache behavior is not functioning as you claim it should, but that is not the bug I am filing. Cached or uncached, 1.2.5 doesn't send the cookies with the request when displaying the source. This is the bug. I'm sorry my original report did not make this clear. $ rpm -qa | grep '(mozilla|galeon)' | sort galeon-1.2.5-2.ximian.3 mozilla-1.0.0-5.ximian.1 mozilla-chat-1.0.0-5.ximian.1 mozilla-dom-inspector-1.0.0-5.ximian.1 mozilla-js-debugger-1.0.0-5.ximian.1 mozilla-mail-1.0.0-5.ximian.1 mozilla-nspr-1.0.0-5.ximian.1 mozilla-nss-1.0.0-5.ximian.1 mozilla-psm-1.0.0-5.ximian.1 nautilus-mozilla-1.0.6-15.ximian.14
See bug #89583 for a more lucid description.