tornadoweb / tornadoweb/tornado

Feature request: Implement `body_producer` for `curl_httpclient`

Open
#2,096 6 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

This line seems implies the body is always a text, which is not always true:
https://github.com/tornadoweb/tornado/blob/v4.5.1/tornado/curl_httpclient.py#L424

Can we unify the API, e.g. wrap body_producer to pycurl.READFUNCTION?

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 in tornado/curl_httpclient.py at the line referenced near 424 and read how the request body is currently handled. Investigate pycurl.READFUNCTION and the proposed body_producer wrapping; done means the API is unified and can handle bodies that are not always text.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.