Skip to content

Support 100 continue responses #592

@matuszewskijan

Description

@matuszewskijan

It seems that HTTP isn't following the 100-continue responses:

HTTP.headers('Content-Type' => 'application/json', 'Accept' => 'application/json').post('https://foo.bar/api', body: '{...}')
=> #<HTTP::Response/1.1 100 Continue {}>

when cURL does:

curl -v -X POST \
>   https://foo.bar/api \
>   -H 'Accept: application/json' \
>   -H 'Content-Type: application/json' \
>   -d '{...}'
...
> POST /api HTTP/1.1
> Host: foo.bar
> Accept: application/json
> Content-Type: application/json
> Content-Length: 294
> 
* upload completely sent off: 294 out of 294 bytes
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
...

I would expect the HTTP response to be <HTTP::Response/1.1 200 OK {}>.

Is it something what the HTTP gem should support?

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