Skip to content

Message header crash #56

@slimshader

Description

@slimshader

Hi,

after replacing 0.9 -> 0.9.1 I am getting a crash in following line (which worked ok in 0.9):

std::String cookie_ = ((headers(response)["Set-Cookie"]).begin())->second;

crash is due to assertion error: "map/set iterator not dereferencable" (msvc 2008 sp1)

I believe (didn't really have time to investigate much) it is related to async_message.hpp line line 94:

    headers_container_type const headers() const {
        headers_container_type raw_headers = headers_.get();
        raw_headers.insert(added_headers.begin(), added_headers.end());
        BOOST_FOREACH(string_type const & key, removed_headers) {
            raw_headers.erase(key);
        }
        return raw_headers;
    }

raw_headers is returned as a temporary which is used to initialize iterator_range but then temporary gets destroyed and iterators in iterator_range are no longer valid.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions