[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdelibs/kioslave/http
From: Dawit Alemayehu <adawit () kde ! org>
Date: 2007-09-01 17:35:28
Message-ID: 1188668128.088933.26262.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 707382 by adawit:
Forward the HTTP response header before processing it or it might never get sent at \
all
M +21 -24 http.cpp
--- trunk/KDE/kdelibs/kioslave/http/http.cpp #707381:707382
@@ -3341,6 +3341,9 @@
} while (!m_bEOF && (len || noHeader) && (headerSize < maxHeaderSize) && \
(gets(buffer, sizeof(buffer)-1)));
+ // Send the current response before processing starts or it
+ // might never get sent...
+ forwardHttpResponseHeader();
// Now process the HTTP/1.1 upgrade
QStringList::Iterator opt = upgradeOffers.begin();
@@ -3482,31 +3485,27 @@
// We need to try to login again if we failed earlier
if ( m_bUnauthorized )
{
- if ( (m_responseCode == 401) ||
- (m_bUseProxy && (m_responseCode == 407))
- )
+ if ( (m_responseCode == 401) || (m_bUseProxy && (m_responseCode == 407)))
{
- if ( getAuthorization() )
- {
- // for NTLM Authentication we have to keep the connection open!
- if ( Authentication == AUTH_NTLM && m_strAuthorization.length() > 4 )
- {
- m_bKeepAlive = true;
- readBody( true );
- }
- else if (ProxyAuthentication == AUTH_NTLM && \
m_strProxyAuthorization.length() > 4)
- {
+ if ( getAuthorization() )
+ {
+ // for NTLM Authentication we have to keep the connection open!
+ if ( Authentication == AUTH_NTLM && m_strAuthorization.length() > 4 )
+ {
+ m_bKeepAlive = true;
readBody( true );
- }
- else
- httpCloseConnection();
- return false; // Try again.
- }
+ }
+ else if (ProxyAuthentication == AUTH_NTLM && \
m_strProxyAuthorization.length() > 4) + {
+ readBody( true );
+ }
+ else
+ httpCloseConnection();
+ return false; // Try again.
+ }
- if (m_bError)
- return false; // Error out
-
- // Show error page...
+ if (m_bError)
+ return false; // Error out
}
m_bUnauthorized = false;
}
@@ -3720,8 +3719,6 @@
mimeType( m_strMimeType );
}
- forwardHttpResponseHeader();
-
if (m_request.method == HTTP_HEAD)
return true;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic