mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-08 16:11:18 +00:00
Properly crafting HTTP reply line by parsing CGI reply headers
This commit is contained in:
1 parent
ec84a148f0
commit
d5b33adb88
3 files changed
+34
-6
No files matched your search
+1
-1
@@ -1,3 +1,3 @@
|
||||
#!/usr/bin/env perl
|
||||
|
||||
print "Status: 123 Please pass me to the client\r\n\r\n";
|
||||
print "Status: 302 Please pass me to the client\r\n\r\n";
|
||||
+2
-2
@@ -362,8 +362,8 @@ unless (scalar(@ARGV) > 0 and $ARGV[0] eq "basic_tests") {
|
||||
o("GET /dir%20with%20spaces/hello.cgi HTTP/1.0\n\r\n",
|
||||
'HTTP/1.1 200 OK.+hello', 'CGI script with spaces in path');
|
||||
o("GET /env.cgi HTTP/1.0\n\r\n", 'HTTP/1.1 200 OK', 'GET CGI file');
|
||||
# o("GET /bad2.cgi HTTP/1.0\n\n", "HTTP/1.1 123 Please pass me to the client\r",
|
||||
# 'CGI Status code text');
|
||||
o("GET /bad2.cgi HTTP/1.0\n\n", "HTTP/1.1 302 Please pass me to the client\r",
|
||||
'CGI Status code text');
|
||||
o("GET /sh.cgi HTTP/1.0\n\r\n", 'shell script CGI',
|
||||
'GET sh CGI file') unless on_windows();
|
||||
o("GET /env.cgi?var=HELLO HTTP/1.0\n\n", 'QUERY_STRING=var=HELLO',
|
||||
|
||||
Reference in new issue
Block a user