Redirection upon a POST

Waldo Bastian bastian at kde.org
Thu Jan 27 09:34:34 GMT 2005


I don't see how this has anything to do with the difference between 302 or 
303. Re-posting on a 302 wouldn't fix this case and it would break many other 
sites. Webserver's don't send 302 or 303's out of their own, it's the 
website-developer or the stack on top of it that tells the webserver what to 
send. Whether the server speaks HTTP/1.1 is irrelevant.

Cheers,
Waldo

On Thursday 27 January 2005 01:47, Dawit A. wrote:
> The current behavior was done to support old broken servers, mostly
> HTTP/1.0 compliant ones. However, since most producation servers today are
> HTTP/1.1 compliant, maybe it is time to update how we deal with the
> different types of redirections. You can find more information about this
> problem in the code comment in kio_http.cc. Simply search for "302".
>
> The actual problem AFAIC is that redirection requests are never propagated
> back to the application. Instead they are automatically handled by code in
> KIO::Job. This prevents the application from deciding how to deal with the
> redirection request. That is how it should be handled. See RFC 2616
> sections 10.3, specially 10.3.3
>
> On Tuesday 25 January 2005 16:36, David Faure wrote:
> > http://www.gandi.net/whois?l=en doesn't work in konqueror: if you type
> > kde.org and hit Enter, the same page appears again, instead of showing
> > the "please copy this security code" text.
> >
> > Using the URL http://www.gandi.net/whois?l=en&domain=kde.org does the job
> > just fine.
> >
> > The problem is that the HTTP POST leads to a redirection (Location:
> > header), which makes khtml reload "http://www.gandi.net/whois?l=en",
> > losing the initial HTML result which came with the POST response.
> > Why doesn't Mozilla follow the redirection? Hmm, more precisely, why does
> > it appear to follow it (the location bar doesn't show whois.html.en)
> > without reloading the new url?
> >
> > kio_http: (559) POST /whois.html.en HTTP/1.1
> > kio_http: (559) Connection: Keep-Alive
> > kio_http: (559) User-Agent: Mozilla/5.0 (compatible; Konqueror/3.3;
> > Linux) KHTML/3.3.91 (like Gecko) kio_http: (559) Referer:
> > http://www.gandi.net/whois?l=en
> > kio_http: (559) Pragma: no-cache
> > kio_http: (559) Cache-control: no-cache
> > kio_http: (559) Accept: text/html, image/jpeg, image/png, text/*,
> > image/*, */* kio_http: (559) Accept-Encoding: x-gzip, x-deflate, gzip,
> > deflate kio_http: (559) Accept-Charset: utf-8, utf-8;q=0.5, *;q=0.5
> > kio_http: (559) Accept-Language: en
> > kio_http: (559) Host: www.gandi.net
> > kio_http: (559) Content-Type: application/x-www-form-urlencoded
> > kio_http: (559) ============ Received Response:
> > kio_http: (559) "HTTP/1.1 302 Found"
> > kio_http: (559) "Date: Tue, 25 Jan 2005 21:31:18 GMT"
> > kio_http: (559) "Server: Apache"
> > kio_http: (559) "Location: http://www.gandi.net/whois?l=en"
> > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > kio_http: (559) "Keep-Alive: timeout=15, max=100"
> > kio_http: (559) "Connection: Keep-Alive"
> > kio_http: (559) "Transfer-Encoding: chunked"
> > kio_http: (559) "Content-Type: text/html; charset=iso-8859-1"
> > kio_http: (559) --empty--

-- 
bastian at kde.org   |   Free Novell Linux Desktop 9 Evaluation Download
bastian at suse.com  |   http://www.novell.com/products/desktop/eval.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20050127/b447d293/attachment.sig>


More information about the kfm-devel mailing list