sub probe_resp - VIP RFC

Dridi Boukelmoune dridi at varni.sh
Tue Apr 11 16:47:02 CEST 2017


On Tue, Apr 11, 2017 at 4:31 PM, Nils Goroll <slink at schokola.de> wrote:
> Dridi,
>
> thank you for the quick feedback. I'm fine with your suggestions, except:
>
>>> * The default vcl_probe_resp:
>>>
>>>         sub vcl_probe_resp {
>>>                 if (prresp.proto ~ "^HTTP/\d+\.\d+$" &&
>>
>> ^HTTP/1\.[01]$
>
> This was intended to be equivalent to the current code:
>
>         i = sscanf(vt->resp_buf, "HTTP/%*f %u ", &resp);

Considering that we only support 1.0 and 1.1 today, I believe we would
get a more accurate result with this regex instead of a clunky scanf
format.

If we go for vcl_probe_response we might as well improve the parsing
of the response, why not?

Cheers,
Dridi



More information about the varnish-dev mailing list