Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Connections being reset with valid requests from Python client #144

Open
rtyler opened this issue Oct 26, 2020 · 3 comments
Open

Connections being reset with valid requests from Python client #144

rtyler opened this issue Oct 26, 2020 · 3 comments
Assignees

Comments

@rtyler
Copy link

rtyler commented Oct 26, 2020

I'm using schemathesis (just the worst name) to run OpenAPI tests against my Tide server.

A number of these tests outright fail with connection resets by the server and obtuse errors on the server side.

Easy reproduction for exactly what I'm doing would be:

  • Download this openapi.yaml
  • pip install schemathesis
  • RUST_LOG=debug tide-serve -b localhost:8000
  • ~/.local/bin/schemathesis run ./openapi.yaml -O PutObject --base-url=http://localhost:8000/ --show-errors-tracebacks

Observe numerous client-side failures such as:

requests.exceptions.ConnectionError: ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))

Running a dummy server with python -m SimpleHTTPServer doesn't result in these connection resets however.

@jbr jbr self-assigned this Oct 26, 2020
@yoshuawuyts
Copy link
Member

@rtyler is the client by any chance running HTTP/1.0? -- if so, we should probably log a warning if an unsupported connection tries to connect.

@jbr
Copy link
Member

jbr commented Oct 26, 2020

I believe we would fail earlier if it were http/1.0

@rtyler
Copy link
Author

rtyler commented Oct 26, 2020

Looks like the client is doing valid HTTP/1.1 requests, Could empty header values (see Authorization below) cause this problem?,

❯ nc -l 8000
PUT /0/0 HTTP/1.1
Host: localhost:8000
User-Agent: schemathesis/2.7.1
Accept-Encoding: gzip, deflate
Accept: */*
Connection: keep-alive
Authorization: 
Content-Length: 2
Content-Type: application/json

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants