[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-core-devel
Subject:    R: Re: Review Request: kio_http: fix keepalive timeout parsing
From:       "aiacovitti () libero ! it" <aiacovitti () libero ! it>
Date:       2011-10-12 16:39:50
Message-ID: 8208795.892791318437590312.JavaMail.defaultUser () defaultHost
[Download RAW message or body]

>> 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 (19.7.1.1)

>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...

AI.


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic