[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-core-devel
Subject: Re: Review Request: kio_http: fix keepalive timeout parsing
From: "Dawit Alemayehu" <adawit () kde ! org>
Date: 2011-10-13 19:36:22
Message-ID: 20111013193622.5695.76516 () vidsolbach ! de
[Download RAW message or body]
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
http://git.reviewboard.kde.org/r/102822/#review7299
-----------------------------------------------------------
Ship it!
No objections from me either. I confused the iteratator function with the next in \
HTTPTokenizer ; so as Andreas already indicated feel free to commit this.
- Dawit Alemayehu
On Oct. 13, 2011, 5:59 p.m., Andrea Iacovitti wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> http://git.reviewboard.kde.org/r/102822/
> -----------------------------------------------------------
>
> (Updated Oct. 13, 2011, 5:59 p.m.)
>
>
> Review request for kdelibs, Andreas Hartmetz and Dawit Alemayehu.
>
>
> Description
> -------
>
> Keep-alive header can specify multiple, comma-separated, value pairs.
> For example what apache web server normally sends is something like that:
>
> "Keep-Alive: timeout=5, max=99"
>
> Actually kio_http fails to extract timeout value because it assumes
> keep-alive header can contain only a single value pair.
> In the case of example above what it end up to do is
> m_request.keepAliveTimeout = QString("5, max=99").toInt(), that returns 0 (wrong!).
>
>
> Diffs
> -----
>
> kioslave/http/http.cpp 2862707
> kioslave/http/parsinghelpers.cpp fc75d68
>
> Diff: http://git.reviewboard.kde.org/r/102822/diff/diff
>
>
> Testing
> -------
>
> -Patched code compiles
> -Hacked a web server and made tests against following keep-alive header variants:
> "Keep-Alive: timeout=5, max=99"
> "Keep-Alive: Timeout=5, max=99" (uppercase 'T')
> "Keep-Alive: Timeout=5 , max=99" (extra space before comma)
>
>
> Thanks,
>
> Andrea Iacovitti
>
>
[Attachment #3 (text/html)]
<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="http://git.reviewboard.kde.org/r/102822/">http://git.reviewboard.kde.org/r/102822/</a>
</td>
</tr>
</table>
<br />
<p>Ship it!</p>
<pre style="white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: \
-pre-wrap; white-space: -o-pre-wrap; word-wrap: break-word;">No objections from me \
either. I confused the iteratator function with the next in HTTPTokenizer ; so as \
Andreas already indicated feel free to commit this.</pre> <br />
<p>- Dawit</p>
<br />
<p>On October 13th, 2011, 5:59 p.m., Andrea Iacovitti wrote:</p>
<table bgcolor="#fefadf" width="100%" cellspacing="0" cellpadding="8" \
style="background-image: \
url('http://git.reviewboard.kde.org/media/rb/images/review_request_box_top_bg.png'); \
background-position: left top; background-repeat: repeat-x; border: 1px black \
solid;"> <tr>
<td>
<div>Review request for kdelibs, Andreas Hartmetz and Dawit Alemayehu.</div>
<div>By Andrea Iacovitti.</div>
<p style="color: grey;"><i>Updated Oct. 13, 2011, 5:59 p.m.</i></p>
<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;">Keep-alive header can specify multiple, comma-separated, value pairs. \
For example what apache web server normally sends is something like that:
"Keep-Alive: timeout=5, max=99"
Actually kio_http fails to extract timeout value because it assumes
keep-alive header can contain only a single value pair.
In the case of example above what it end up to do is
m_request.keepAliveTimeout = QString("5, max=99").toInt(), that returns 0 \
(wrong!). </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;">-Patched code compiles
-Hacked a web server and made tests against following keep-alive header variants:
"Keep-Alive: timeout=5, max=99"
"Keep-Alive: Timeout=5, max=99" (uppercase 'T')
"Keep-Alive: Timeout=5 , max=99" (extra space before comma)
</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>kioslave/http/http.cpp <span style="color: grey">(2862707)</span></li>
<li>kioslave/http/parsinghelpers.cpp <span style="color: grey">(fc75d68)</span></li>
</ul>
<p><a href="http://git.reviewboard.kde.org/r/102822/diff/" style="margin-left: \
3em;">View Diff</a></p>
</td>
</tr>
</table>
</div>
</body>
</html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic