[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: 1.1 kioslave (HTTP redirection) bug ?
From: David Faure <David.Faure () insa-lyon ! fr>
Date: 1999-02-15 9:35:40
[Download RAW message or body]
On Mon, Feb 15, 1999 at 10:26:24AM +0100, Waldo Bastian wrote:
> David Faure wrote:
> >
> > Please have a look at bug #649 :
> > what happens is a HTTP redirection in a loop.
> >
> > Had a look at kioslave/http.cpp :
> >
> > else if ( strncasecmp( buffer, "Location: ", 10 ) == 0 )
> > {
> > Close();
> > KURL u( url );
> > KURL u2( u, buffer + 10 );
> > emit redirection( u2.url() );
> > // return Open( &u2, currentMode );
> > bytesleft = 0;
> > return (SUCCESS);
> > }
> >
> > }
> > emit mimeType( mType );
> > if (!Cookie.isEmpty())
> > {
> > emit cookie( url.data(), Cookie.data() );
> > }
> >
> > The redirection is emitted before the cookie is, and I think that's the
> > problem - shouldn't there be the cookie first, then the redirection ?
> > Ok, I tested adding the "if (...) emit cookie" before the redirection, and
> > added a debug(). There _is_ a cookie, as well as the redirection, but the
> > hack doesn't change anything.
>
> Yes, I think you are right here. Is there a defined order for headers
> btw? Otherwise we would have to parse all headers first, and only THEN
> start to do any actions.
We already do that for most things (e.g. Cookies), but not for the
redirection.
Anyway, there must be another problem, because as I said, I tried emitting
the cookie first and it doesn't change anything. It might a problem in kfm
handling of those signals.
Do you think you could come up with a patch for this ?
> Aren't these kioslaves going to be replaced btw?
Their replacement is already in kdebase/kioslave (/http for that one), but
the code comes from the old one, AFAIK, so fixing both can be done at the
same time :))
Evidence : code from kdebase/kioslave/http/http.cc (line 419) :
else if ( strncmp( buffer, "Location: ", 10 ) == 0 )
{
http_close();
K2URL u( _url, buffer + 10 );
string url = u.url();
redirection( url.c_str() );
return http_open( u, _post_data, _post_data_size, _reload, _offset );
}
--
____________________________________________________________________
| |
| David FAURE |
| E-mail : David.Faure@insa-lyon.fr, faure@kde.org |
| http://www.insa-lyon.fr/People/AEDI/dfaure/index.html |
|____________________________________________________________________|
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic