[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    Re: KDE1.1.2 PATCH: Cookies (Bug 1593)
From:       Waldo Bastian <bastian () suse ! de>
Date:       1999-08-10 13:02:52
[Download RAW message or body]

> I do not know ... it did not work for me by automatically accepting
> cookies either.  It only works consistently if I refresh the page
> and sometimes by  itself.  But it definitely looks to me like the
> problem is either a delay in setting the cookie somewhere or the
> redirection is somehow being handled first before the cookie is set. 
> Ummm could it also be the http slaves not sending  the appropriate
> response back regarding the cookies ?? I do not know much about 
> kioslaves so I might just be blubering here ...

Investigating further....

It isn't a cookie problem any longer. The original request is a POST
request. After the redirect we do this POST request again. It looks
like the server is expecting a GET request instead.

Ttry the following patch. It removes the post_data from the request
once a redirect comes in, thereby turning it into a GET request.

RFC1945 says:

   If the 301 status code is received in response to a request using
   the POST method, the user agent must not automatically redirect the
   request unless it can be confirmed by the user, since this might
   change the conditions under which the request was issued.
 
       Note: When automatically redirecting a POST request after
       receiving a 301 status code, some existing user agents will
       erroneously change it into a GET request.                                

Is it a bug or a feature? Should we implement it like this? Netscape
probably behaves like this. 

Cheers,
Waldo


RCS file: /home/kde/kdebase/kfm/Attic/kfmjob.cpp,v
retrieving revision 1.32.4.2
diff -u -r1.32.4.2 kfmjob.cpp
--- kfmjob.cpp  1999/05/05 22:10:14     1.32.4.2
+++ kfmjob.cpp  1999/08/10 13:03:59
@@ -172,6 +172,7 @@
         // This allows to store the "/index.html" in 'url'
         // without changing the url stored here and in kfmman. David.
         url = _url;
+        post_data = 0;
         openFileOrDir(false);
     }
 }

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic