CurlAsyncHTTPClient can not save cookie using pycurl.COOKIEJAR
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start by reproducing the issue with CurlAsyncHTTPClient, the prepare_curl_callback, and pycurl.COOKIEFILE/COOKIEJAR while following a 301 or 302 redirect. Trace how cookies are handled across the redirect and compare the final cookie jar with the response headers. Done means cookies are automatically saved and remain available after redirected requests.
Written by the indexing model from the issue text.
Description
When I use CurlAsyncHTTPClient, it can not save cookies automatically, If I use the response header
to parse cookies myself, I can not get cookies if it's a 302/301 redirection, since the header is from the following url. How can I solve this problem?
my code is here:
`
def callback(curl):
curl.setopt(pycurl.COOKIEFILE, 'cookies.txt')
curl.setopt(pycurl.COOKIEJAR, 'cookies.txt')
http = CurlAsyncHTTPClient()
loop = asyncio.get_event_loop()
loop.run_until_complete(http.fetch(url, prepare_curl_callback=callback))
`
- Dominant language
- Python
- Stars
- 22.2k
- Forks
- 5.6k
- Avg merge
- 3h 42m
- Merged PRs (30d)
- 16
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.
More from tornadoweb/tornado
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
tornadoweb/tornado#3701 · 1 comment ·
-
httpserver
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
tornadoweb/tornado#1050 · 2 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 55/100
tornadoweb/tornado#3728 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 64/100
tornadoweb/tornado#3651 · 2 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 50/100
tornadoweb/tornado#3616 · 2 comments ·
All issues in tornadoweb/tornado
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
bancolombia/sentinel#23 ·
-
test md OpenCI
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
-
integration:quickjs org:external priority:backlog topic:code-interpreter topic:middleware type:feature
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
langchain-ai/deepagents#6450 ·
-
bug client
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100