Skip to content

Commit

Permalink
send headers in lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsnq committed May 24, 2023
1 parent e7f7c48 commit 4d598a3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scrapypuppeteer/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ def _serialize_body(self, action, request):
if include_headers:
headers = request.headers.to_unicode_dict()
if isinstance(include_headers, list):
headers = {h: headers[h] for h in include_headers if h in headers}
headers = {h.lower(): headers[h] for h in include_headers if h in headers}
payload['headers'] = headers
return json.dumps(payload)
return str(payload)
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

setup(
name='scrapy-puppeteer-client',
version='0.0.7',
version='0.0.8',
description='A library to use Puppeteer-managed browser in Scrapy spiders',
long_description=long_description,
long_description_content_type="text/markdown",
Expand Down

0 comments on commit 4d598a3

Please sign in to comment.