Skip to content

Invalid iterator in linearize #45

@demozon

Description

@demozon

In version 0.9.0 we have

(message.hpp - line 98)
string_type body() const {
return _body;
}

this does not work with
(linearize.hpp - line 140)
typename body_range::type body_data = body(request).range();
return boost::copy(body_data, oi);

.. since body(request) creates a new string_type,
the body_data range is invalid at the copy statement.

The easiest fix is to make the const body observer return a const reference.

(message.hpp - line 98)
string_type const& body() const {
return _body;
}

... may be an idea to do the same for source, destinarion and headers too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions