tornadoweb / tornadoweb/tornado
Tornado httpclient fails requesting a url that urllib works with.
Open
Nobody has claimed this yet.
httpclient
- Dominant language
- Python
- Stars
- 22.2k
- Forks
- 5.6k
- Avg merge
- 3h 42m
- Merged PRs (30d)
- 16
Description
I've hit a url that the httpclient it failing for that works with urllib. Below is a snippet of code with the url and showing it produces a 400 bad request from the httpclient side.
import urllib
from tornado import httpclient
url = "https://blogs.msdn.com/b/jmeier/archive/2012/05/13/the-rapid-research-method.aspx?utm_source=feedburner&utm_medium=feed&utm_campaign=Feed: jmeier (J.D. Meier's Blog)&Redirected=true"
fh = urllib.urlopen(url)
# This will load up the content just peachy...
content = fh.read()
# This will get me a 400 bad request response.
http = httpclient.HTTPClient()
try:
response = http.fetch(url)
print "Content should be in here."
except Exception, e:
print "but it goes BOOM!"
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the provided URL with Tornado's HTTPClient and urllib, then inspect the HTTPClient fetch path for differences in URL handling. Done means the HTTPClient can fetch this URL without the 400 response while preserving existing behavior; the issue does not name a source file or test to run.
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
- 30/100