Skip to content

Commit 2ccdefe

Browse files
shinrichzwoop
authored andcommitted
Test bad request behavior (#7884)
(cherry picked from commit c3827da)
1 parent 291d5ab commit 2ccdefe

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

tests/gold_tests/headers/good_request_after_bad.test.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
'''
2525
Test.ContinueOnFail = True
2626
ts = Test.MakeATSProcess("ts", enable_cache=True)
27-
27+
Test.ContinueOnFail = True
2828
ts.Disk.records_config.update({'proxy.config.diags.debug.tags': 'http',
2929
'proxy.config.diags.debug.enabled': 0,
3030
})
@@ -103,3 +103,10 @@
103103
ts.Variables.port)
104104
tr.Processes.Default.ReturnCode = 0
105105
tr.Processes.Default.Streams.stdout = 'gold/bad_method.gold'
106+
107+
# mangled termination
108+
tr = Test.AddTestRun("mangled line termination")
109+
tr.Processes.Default.Command = 'printf "GET / HTTP/1.1\r\nHost:bob\r\n \r\nGET / HTTP/1.1\r\nHost: boa\r\n\r\n" | nc 127.0.0.1 {}'.format(
110+
ts.Variables.port)
111+
tr.Processes.Default.ReturnCode = 0
112+
tr.Processes.Default.Streams.stdout = 'gold/bad_good_request.gold'

0 commit comments

Comments
 (0)