R: Re: Review Request: kio_http: fix keepalive timeout parsing

aiacovitti at libero.it aiacovitti at libero.it
Wed Oct 12 17:39:50 BST 2011

>> 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)
>I don't know which RfC this comes from and if that makes any requirements

rfc 2068 (

>about the ordering, but other header fields (like Content-Disposition) do
>not have some. So what happens with e.g.:
>max=99, timeout=5
>max = 99, timeout = 5
>foo = bar, timeout = 5

Parsinghelpers returns all tokens between commas,
we loop through those tokens to find the one that starts with "timeout="
So the order doesn't matter.

>Is it possible to add a unit test for this?

Well i think it is, i could try...


More information about the kde-core-devel mailing list