[PATCH] HTTP date parsing and formatting

Dridi Boukelmoune dridi.boukelmoune at zenika.com
Wed Feb 25 10:16:45 CET 2015


On Wed, Feb 25, 2015 at 9:46 AM, Poul-Henning Kamp <phk at phk.freebsd.dk> wrote:
> --------
> In message <CABtDKm5Jd+ZtV-G-7_ww6ngzuTvB2=LtQOMg_unBUXZFZG-xDA at mail.gmail.com>
> , Dridi Boukelmoune writes:
>
>>Why did you keep the ISO 8601 format for parsing?
>
> Because I can't remember why we added it in the first place, and until
> I dig out notes about that, I won't remove it.

It's been added in a commit about gettimeofday:
https://github.com/varnish/Varnish-Cache/commit/be358c29.patch

>>Also please find my first patch rebased against the current master.
>>It's an improvement of m00020.vtc (testing both parsing and
>>formatting) and it adds a setlocale capability to the debug vmod.
>
> I don't really see the value of the setlocale ?

I'm setting a different locale for this very test (also part of the
patch) but it could be handy in other places.

In my initial patch set, I had added it to show how a vmod could
compromise the child's locale. You have removed some str?time and
strtod calls from the code base but there could be other occurrences
to replace (and other functions in libc to not use).

As I said in my first email, I am willing to continue submitting
locale-related patches, so debug.setlocale would help.

Cheers,
Dridi



More information about the varnish-dev mailing list