Skip to content

Commit

Permalink
curl is not including cookies
Browse files Browse the repository at this point in the history
  • Loading branch information
cedric05 committed Mar 8, 2022
1 parent 31c0206 commit b2680ce
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dothttp/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.0.40a3'
__version__ = '0.0.40a5'
4 changes: 4 additions & 0 deletions dothttp/request_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,10 @@ def get_curl_output(self):
# if isinstance(self.httpdef.headers, AWS4Auth):
for k, v in sorted(self.httpdef.headers.items()):
parts += [('-H', '{0}: {1}'.format(k, v))]

if 'cookie' in prep.headers:
parts += [('-H', '{0}: {1}'.format('cookie', prep.headers['cookie'] ))]

url = prep.url

if url.startswith(UNIX_SOCKET_SCHEME):
Expand Down
2 changes: 1 addition & 1 deletion test/core/curl-like/curllike.http
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
@name('header')
curl -X GET https://google.com
curl -X GET https://unknowndomain.com
--header simplekey1 : simplevalue1
--header simplekey2: simplevalue2
--header simple-key3 : simplevalue3
Expand Down

0 comments on commit b2680ce

Please sign in to comment.