SVN commit 726539 by adawit: - Forward port the fix for BR 150904 and 150070 from KDE 3.5 branch. BUG:150904 BUG:150070 M +4 -6 http.cpp --- trunk/KDE/kdelibs/kioslave/http/http.cpp #726538:726539 @@ -3290,12 +3290,6 @@ } 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... - // Except if this is just a validation, then the cached request sends them - if (!cacheValidated) - forwardHttpResponseHeader(); - // Now process the HTTP/1.1 upgrade QStringList::Iterator opt = upgradeOffers.begin(); for( ; opt != upgradeOffers.end(); ++opt) { @@ -3647,6 +3641,10 @@ mimeType( m_strMimeType ); } + // Do not move send response header before any redirection as it seems + // to screw up some sites. See BR# 150904. + forwardHttpResponseHeader(); + if (m_request.method == HTTP_HEAD) return true;