mirror of
https://github.com/httpie/cli.git
synced 2024-11-24 08:22:22 +02:00
parent
c6f2b32e36
commit
48a6d234cb
@ -5,9 +5,13 @@
|
|||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def main():
|
||||||
try:
|
try:
|
||||||
from .core import main
|
from .core import main
|
||||||
sys.exit(main())
|
sys.exit(main())
|
||||||
except KeyboardInterrupt:
|
except KeyboardInterrupt:
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
|
@ -11,7 +11,7 @@ def test_Host_header_overwrite(httpbin):
|
|||||||
|
|
||||||
"""
|
"""
|
||||||
host = 'httpbin.org'
|
host = 'httpbin.org'
|
||||||
url = httpbin.url + '/get'
|
url = httpbin.url + '/set?k2=v2&k1=v1'
|
||||||
r = http('--print=hH', url, 'host:{0}'.format(host))
|
r = http('--print=hH', url, 'host:{0}'.format(host))
|
||||||
assert HTTP_OK in r
|
assert HTTP_OK in r
|
||||||
assert r.lower().count('host:') == 1
|
assert r.lower().count('host:') == 1
|
||||||
|
Loading…
Reference in New Issue
Block a user