You've already forked httpie-cli
mirror of
https://github.com/httpie/cli.git
synced 2026-04-26 20:02:11 +02:00
@@ -0,0 +1,17 @@
|
||||
"""Miscellaneous regression tests"""
|
||||
import socket
|
||||
|
||||
from utils import http, HTTP_OK
|
||||
|
||||
|
||||
def test_Host_header_overwrite():
|
||||
"""
|
||||
https://github.com/jakubroztocil/httpie/issues/235
|
||||
|
||||
"""
|
||||
host = 'httpbin.org'
|
||||
url = 'http://{httpbin_ip}/get'.format(
|
||||
httpbin_ip=socket.gethostbyname(host))
|
||||
r = http('--print=hH', url, 'host:{}'.format(host))
|
||||
assert HTTP_OK in r
|
||||
assert r.lower().count('host:') == 1
|
||||
Reference in New Issue
Block a user