Skip to content

Commit

Permalink
PROXY_AGENT_HEADER_VALUE still needs the v :)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhinavsingh committed Nov 18, 2021
1 parent 4cbeb6c commit 195ee57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion proxy/common/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def _env_threadless_compliant() -> bool:
HTTP_1_1 = b'HTTP/1.1'

PROXY_AGENT_HEADER_KEY = b'Proxy-agent'
PROXY_AGENT_HEADER_VALUE = b'proxy.py ' + \
PROXY_AGENT_HEADER_VALUE = b'proxy.py v' + \
__version__.encode('utf-8', 'strict')
PROXY_AGENT_HEADER = PROXY_AGENT_HEADER_KEY + \
COLON + WHITESPACE + PROXY_AGENT_HEADER_VALUE
Expand Down
3 changes: 2 additions & 1 deletion tests/http/test_protocol_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,8 @@ def assert_data_queued(
b'Via: 1.1 proxy.py v%s' % bytes_(__version__),
CRLF,
])
server.queue.assert_called_once_with(pkt)
server.queue.assert_called_once()
self.assertEqual(server.queue.call_args_list[0][0][0].tobytes(), pkt)
server.buffer_size.return_value = len(pkt)

def assert_data_queued_to_server(self, server: mock.Mock) -> None:
Expand Down

0 comments on commit 195ee57

Please sign in to comment.