Skip to content

Content Encoding Default Value #6330

@nitko12

Description

@nitko12

Hi,

I've ran into an issue while querying osrm-routed with latest master build (using boost::beast) using Python Requests library.

It seems the Content-Encoding: deflate has a bug, strangely enough it also seems it is the default encoding of Python Requests library.

requests.get(osrm_url) requests.get(osrm_url, headers={"Accept-Encoding":"deflate"}) 

cause an error, specifically

ContentDecodingError: ('Received response with content-encoding: deflate, but failed to decode it.', error('Error -3 while decompressing data: invalid block type')) 

while

requests.get(osrm_url, headers={"Accept-Encoding":""}) requests.get(osrm_url, headers={"Accept-Encoding":"gzip"}) 

successfully respond with http 200.

Could it be that

std::vector<char> Connection::compress_buffers(const std::vector<char> &uncompressed_data,

is encoding it wrong?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions