<html>
<body>
<div style="font-family: Verdana, Arial, Helvetica, Sans-Serif;">
<table bgcolor="#f9f3c9" width="100%" cellpadding="8" style="border: 1px #c9c399 solid;">
<tr>
<td>
This is an automatically generated e-mail. To reply, visit:
<a href="https://git.reviewboard.kde.org/r/115689/">https://git.reviewboard.kde.org/r/115689/</a>
</td>
</tr>
</table>
<br />
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Because of CustomHTTPMethod i think changes are also needed in kio_http's POST to GET redirection code:
--- kdelibs/kioslave/http/http.cpp
+++ kdelibs/kioslave/http/http.cpp
@@ -3099,16 +3099,17 @@
// this way of doing things! Thus, we are forced to do the same
// thing here. Otherwise, we loose compatibility and might not be
// able to correctly retrieve sites that redirect.
+ const QByteArray method = m_request.methodString();
switch (m_request.responseCode) {
case 301: // Moved Permanently
setMetaData(QLatin1String("permanent-redirect"), QLatin1String("true"));
- if (m_request.method == HTTP_POST) {
+ if (method == "POST ") {
m_request.method = HTTP_GET; // FORCE a GET
setMetaData(QLatin1String("redirect-to-get"), QLatin1String("true"));
}
break;
case 302: // Found
- if (m_request.method == HTTP_POST) {
+ if (method == "POST ") {
m_request.method = HTTP_GET; // FORCE a GET
setMetaData(QLatin1String("redirect-to-get"), QLatin1String("true"));
}
</pre>
<br />
<p>- Andrea Iacovitti</p>
<br />
<p>On February 14th, 2014, 4 p.m. UTC, Dawit Alemayehu wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" style="background-image: url('https://git.reviewboard.kde.org/static/rb/images/review_request_box_top_bg.ab6f3b1072c9.png'); background-position: left top; background-repeat: repeat-x; border: 1px black solid;">
<tr>
<td>
<div>Review request for kdelibs and Andrea Iacovitti.</div>
<div>By Dawit Alemayehu.</div>
<p style="color: grey;"><i>Updated Feb. 14, 2014, 4 p.m.</i></p>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Bugs: </b>
<a href="http://bugs.kde.org/show_bug.cgi?id=331007">331007</a>
</div>
<div style="margin-top: 1.5em;">
<b style="color: #575012; font-size: 10pt;">Repository: </b>
kdelibs
</div>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Description </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Fix khtml/ecma/xmlttprequest.cpp such that it correctly handles HEAD requests without a noticable delay, i.e. use KIO::mimeType instead of KIO::get. Otherwise, the request will wait for the content which is not returned when doing a stat operation like HEAD.</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Testing </h1>
<table width="100%" bgcolor="#ffffff" cellspacing="0" cellpadding="10" style="border: 1px solid #b8b5a0">
<tr>
<td>
<pre style="margin: 0; padding: 0; white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">Tested HEAD redirection with http://greenbytes.de/tech/tc/httpredirects/</pre>
</td>
</tr>
</table>
<h1 style="color: #575012; font-size: 10pt; margin-top: 1.5em;">Diffs</b> </h1>
<ul style="margin-left: 3em; padding-left: 0;">
<li>khtml/ecma/xmlhttprequest.cpp <span style="color: grey">(b3707e7)</span></li>
<li>kio/kio/job.cpp <span style="color: grey">(abb3dfd)</span></li>
</ul>
<p><a href="https://git.reviewboard.kde.org/r/115689/diff/" style="margin-left: 3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>