Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Beast includes CRLF in HTTP fields
From: David Demelier (markand_at_[hidden])
Date: 2018-07-07 08:19:27


On Fri, 2018-07-06 at 08:31 -0700, Vinnie Falco via Boost-users wrote:
> You shouldn't have to do any trimming. basic_fields member functions
> and iterator value_type which return field values do so using a
> string_view, whose length excludes the trailing CRLF and also any
> colon and space. Callers should not assume the string is
> null-terminated, and work with the interface provided by string_view.
>

Ah yes, I didn't see the basic_fields' value_type has dedicated member
functions, I was blindly doing:

    cout << foo[field::location];

Thanks!

-- 
David

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net