Skip to content

Bug: Ethon adapter fails when response headers are empty #67

@RKushnir

Description

@RKushnir

When using the Ethon adapter and when the response_headers is an empty string, this code produces nil

# Hard to believe that Ethon wouldn't parse out the headers into
# an array; probably overlooked it. Anyway, let's do it ourselves:
headers = response_headers.split(/\r?\n/)[1..-1]

which then causes a crash when calling map on it:

response_headers: headers.map{ |header| header.split(/:\s/) }.to_h,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions