Skip to content

Instantly share code, notes, and snippets.

@xse
Created October 19, 2019 23:28
Show Gist options
  • Save xse/ae0a082971b440a21e9519a2647992d4 to your computer and use it in GitHub Desktop.
Save xse/ae0a082971b440a21e9519a2647992d4 to your computer and use it in GitHub Desktop.
WITHOUT HTTP/0.9/
xse@krkrkr ~/kcgi (git)-[master] % ./regress/test-fcgi-header :(
== Info: Trying ::1:17123...
== Info: TCP_NODELAY set
== Info: connect to ::1 port 17123 failed: Connection refused
== Info: Trying 127.0.0.1:17123...
== Info: TCP_NODELAY set
== Info: Connected to localhost (127.0.0.1) port 17123 (#0)
=> Send header, 0000000085 bytes (0x00000055)
0000: 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a GET / HTTP/1.1..
0010: 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 3a Host: localhost:
0020: 31 37 31 32 33 0d 0a 41 63 63 65 70 74 3a 20 2a 17123..Accept: *
0030: 2f 2a 0d 0a 54 65 73 74 69 6e 67 3a 31 32 33 0d /*..Testing:123.
0040: 0a 54 65 73 74 69 6e 67 2d 54 65 73 74 3a 33 32 .Testing-Test:32
0050: 31 0d 0a 0d 0a 1....
child.c:1197: RFC violation: REMOTE_ADDR not set
child.c:1223: RFC violation: SERVER_PORT not set
== Info: Received HTTP/0.9 when not allowed
== Info: Closing connection 0
fcgi.c:677: fcgi_waitread: exit request
child.c:2039: FastCGI: worker termination
1 xse@krkrkr ~/kcgi (git)-[master] %
WITH HTTP/0.9:
xse@krkrkr ~/kcgi (git)-[master] % ./regress/test-fcgi-header
== Info: Trying ::1:17123...
== Info: TCP_NODELAY set
== Info: connect to ::1 port 17123 failed: Connection refused
== Info: Trying 127.0.0.1:17123...
== Info: TCP_NODELAY set
== Info: Connected to localhost (127.0.0.1) port 17123 (#0)
=> Send header, 0000000085 bytes (0x00000055)
0000: 47 45 54 20 2f 20 48 54 54 50 2f 31 2e 31 0d 0a GET / HTTP/1.1..
0010: 48 6f 73 74 3a 20 6c 6f 63 61 6c 68 6f 73 74 3a Host: localhost:
0020: 31 37 31 32 33 0d 0a 41 63 63 65 70 74 3a 20 2a 17123..Accept: *
0030: 2f 2a 0d 0a 54 65 73 74 69 6e 67 3a 31 32 33 0d /*..Testing:123.
0040: 0a 54 65 73 74 69 6e 67 2d 54 65 73 74 3a 33 32 .Testing-Tchild.c:1197: RFC violation: REMOTE_ADDR not set
est:32
0050: 31 0d 0a 0d 0a child.c:1223: RFC violation: SERVER_PORT not set
1....
<= Recv data, 0000000016 bytes (0x00000010)
0000: fcgi.c:677: fcgi_waitread: exit request
53 74 61 74 75 73 3a 20 32 30 30 20 4f 4b 0d 0a Status: 200 OK..
<= Recv data, 0000000027 bytes (0x0000001b)
0000: 43 6f 6e 74 65 6e 74 2d 54 79 70 65 3a 20 74 65 Content-Type: te
0010: 78 74 2f 68 74 6d 6c 0d 0a 0d 0a xt/html....
Status: 200 OK
Content-Type: text/html
== Info: Closing connection 0
child.c:2039: FastCGI: worker termination
xse@krkrkr ~/kcgi (git)-[master]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment