Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost.Beast includes CRLF in HTTP fields
From: Vinnie Falco (vinnie.falco_at_[hidden])
Date: 2018-07-07 15:20:34

On Sat, Jul 7, 2018 at 8:11 AM, David Demelier via Boost-users
<boost-users_at_[hidden]> wrote:
> The res_ object is a http::response<http::string_body>, And once
> printed to the console I have:
> new location: [
> ]

Hmm...that's not what I'm seeing. I added this function to

        request<empty_body> req;
        req.insert(field::location, "");
        auto it = req.find(field::location);
        if(it != req.end())
            log << "[" << it->value() << "]";

The output is:

    []25.6s, 1 suite, 1 case, 334 tests total, 0 failures
    The program '[0x6BF4] tests-beast-http.exe' has exited with code 0 (0x0).

If the CRLF was being included in the value, then none of these tests
would pass, as the equalities would evaluate to false:



Boost-users list run by williamkempf at, kalb at, bjorn.karlsson at, gregod at, wekempf at