tornadoweb / tornadoweb/tornado

strange "Timeout during request" error with this url

Open
#2,984 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

httpclient
Dominant language
Python
Stars
22.2k
Forks
5.6k
Avg merge
3h 42m
Merged PRs (30d)
16

Description

Using the simple httpclient, this code fails:

from tornado.httpclient import AsyncHTTPClient, HTTPRequest

async def test():
  req = HTTPRequest(
    'https://jmeter-plugins.org/get/',
  )
  response = await AsyncHTTPClient().fetch(req)
  print(response.headers)

if __name__ == '__main__':
  import asyncio
  asyncio.run(test())
tornado.simple_httpclient.HTTPTimeoutError: Timeout during request

but using the curl one it runs without issues.

The response has been received and the connection has been closed, but it seems that Tornado doesn't notice that.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the provided AsyncHTTPClient and simple_httpclient reproducer for https://jmeter-plugins.org/get/, then compare its behavior with the curl client. Trace how the response and connection closure are handled after the response is received. Done means the simple client completes this request without raising HTTPTimeoutError.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
networking
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.