Skip to content

Commit e88153a

Browse files
committed
fix
1 parent 3921e2a commit e88153a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scrapy_proxy_headers/agent.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ def _cb_bodydone(self, result, request, url: str):
121121
r = super()._cb_bodydone(result, request, url)
122122
if isinstance(r, Response):
123123
if self._agent and hasattr(self._agent, '_endpoint'):
124-
proxy_response_headers = getattr(self._agent._endpoint, '_proxy_response_headers')
124+
proxy_response_headers = getattr(self._agent._endpoint, '_proxy_response_headers', None)
125125
if proxy_response_headers:
126126
r.headers.update(proxy_response_headers)
127127
return r

0 commit comments

Comments
 (0)