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

List:       kde-core-devel
Subject:    Re: www.granroth.org == KWord doc?
From:       Dawit Alemayehu <adawit () earthlink ! net>
Date:       2000-03-18 4:38:03
[Download RAW message or body]

On Fri, 17 Mar 2000, Alex Zepeda wrote:
> On Fri, 17 Mar 2000, Graham TerMarsch wrote:
> 
> > Think its going to be a case of having to facilitate some fudginess
> > around the HTTP spec in order to deal with servers (or server-side apps)
> > that don't adhere to the spec themselves.  I'd vote for "If you see a
> > 'Location' redirection header that you could safely ignore any
> > content-type or document body that you receive".
> 
> Moreover, I think that the server isn't actually sending any data with the
> redirection.  Konqy IMO, should just ignore such zero length content.  
> And, actually a content-type header is somewhat required as is a body,
> unless you're sending one of the "No Content" HTTP responses.


This seems to me to be the problematic code that is causing this issue in
kio_http:

  else if (!locationStr.isEmpty() && !noRedirect)
  {
#if 0
    // WABA:
    // We either need to close the connection or read the rest of the contents!
    // Closing the connection is bad for performance.
    // We really should read the contents here!
    http_closeConnection();
    KURL u(m_request.url, locationStr);
    redirection(u.url());

    if ( !http_open() )
      return false;

    return readHeader();
#else
    KURL u(m_request.url, locationStr);
    redirection(u.url());
#endif
  }
  // FINALLY, let the world know what kind of data we are getting
  // and that we do indeed have a header
  mimeType(m_strMimeType);

As already stated in previous messages, we should not be changing
the mimeType on redirection.  I  also do not know exactly why Waldo felt that
closing the connection is bad for performance.  Wouldn't this problematic
if the server responded with header that explicitly asked the connection to
be closed after the transmission of the header ( "Connection : close" ) as this
site does ??  Anyways, I think the simplest fix is to have change the last line
to

if( locationStr.isEmpty() ) // Do this if there is no redirection...
  mimeType( m_strMimeType );

Waldo has to explain why the connection should not be closed if specifically
requested by the server ??  Hmmm... perhaps this happens elsewhere ??  

Cheers,
Dawit A.

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

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