[links] message request without final line endings
Ricardo Nabinger Sanchez
rnsanchez at socksarmor.org
Wed Jan 23 10:35:37 MST 2008
Hello,
While inspecting some web traffic, I've noticed that Links didn't send a
CRLF after the last header, and also didn't send the CRLF after headers:
15:12:04.813747 IP 192.168.1.100.55418 > 208.70.27.34.80: P 1:813(812) ack 1 win 65535
0x0000: 00c0 49ac 3c1d 0011 d8f8 0ab0 0800 4500 ..I.<.........E.
0x0010: 0354 e674 4000 4006 a3ba c0a8 0164 d046 .T.t at .@......d.F
0x0020: 1b22 d87a 0050 0848 c38e 68e8 ecb1 5018 .".z.P.H..h...P.
0x0030: ffff 6bdd 0000 504f 5354 202f 7365 6172 ..k...POST./sear
0x0040: 6368 7265 7375 6c74 732e 7068 7020 4854 chresults.php.HT
0x0050: 5450 2f31 2e31 0d0a 486f 7374 3a20 7777 TP/1.1..Host:.ww
0x0060: 772e 6172 6368 6976 652e 6f72 670d 0a55 w.archive.org..U
0x0070: 7365 722d 4167 656e 743a 204c 696e 6b73 ser-Agent:.Links
0x0080: 2028 322e 3170 7265 3238 3b20 4672 6565 .(2.1pre28;.Free
0x0090: 4253 4420 362e 312d 5245 4c45 4153 4520 BSD.6.1-RELEASE.
0x00a0: 6933 3836 3b20 3131 3078 3430 290d 0a41 i386;.110x40)..A
0x00b0: 6363 6570 743a 202a 2f2a 0d0a 4163 6365 ccept:.*/*..Acce
0x00c0: 7074 2d45 6e63 6f64 696e 673a 2067 7a69 pt-Encoding:.gzi
0x00d0: 702c 2064 6566 6c61 7465 2c20 627a 6970 p,.deflate,.bzip
0x00e0: 320d 0a41 6363 6570 742d 4368 6172 7365 2..Accept-Charse
0x00f0: 743a 2075 732d 6173 6369 692c 2049 534f t:.us-ascii,.ISO
0x0100: 2d38 3835 392d 312c 2049 534f 2d38 3835 -8859-1,.ISO-885
0x0110: 392d 322c 2049 534f 2d38 3835 392d 332c 9-2,.ISO-8859-3,
0x0120: 2049 534f 2d38 3835 392d 342c 2049 534f .ISO-8859-4,.ISO
0x0130: 2d38 3835 392d 352c 2049 534f 2d38 3835 -8859-5,.ISO-885
0x0140: 392d 362c 2049 534f 2d38 3835 392d 372c 9-6,.ISO-8859-7,
0x0150: 2049 534f 2d38 3835 392d 382c 2049 534f .ISO-8859-8,.ISO
0x0160: 2d38 3835 392d 392c 2049 534f 2d38 3835 -8859-9,.ISO-885
0x0170: 392d 3130 2c20 4953 4f2d 3838 3539 2d31 9-10,.ISO-8859-1
0x0180: 332c 2049 534f 2d38 3835 392d 3134 2c20 3,.ISO-8859-14,.
0x0190: 4953 4f2d 3838 3539 2d31 352c 2049 534f ISO-8859-15,.ISO
0x01a0: 2d38 3835 392d 3136 2c20 7769 6e64 6f77 -8859-16,.window
0x01b0: 732d 3132 3530 2c20 7769 6e64 6f77 732d s-1250,.windows-
0x01c0: 3132 3531 2c20 7769 6e64 6f77 732d 3132 1251,.windows-12
0x01d0: 3532 2c20 7769 6e64 6f77 732d 3132 3536 52,.windows-1256
0x01e0: 2c20 7769 6e64 6f77 732d 3132 3537 2c20 ,.windows-1257,.
0x01f0: 6370 3433 372c 2063 7037 3337 2c20 6370 cp437,.cp737,.cp
0x0200: 3835 302c 2063 7038 3532 2c20 6370 3836 850,.cp852,.cp86
0x0210: 362c 2078 2d63 7038 3636 2d75 2c20 782d 6,.x-cp866-u,.x-
0x0220: 6d61 632c 2078 2d6d 6163 2d63 652c 2078 mac,.x-mac-ce,.x
0x0230: 2d6b 616d 2d63 732c 206b 6f69 382d 722c -kam-cs,.koi8-r,
0x0240: 206b 6f69 382d 752c 206b 6f69 382d 7275 .koi8-u,.koi8-ru
0x0250: 2c20 5443 564e 2d35 3731 322c 2056 4953 ,.TCVN-5712,.VIS
0x0260: 4349 492c 2075 7466 2d38 0d0a 4163 6365 CII,.utf-8..Acce
0x0270: 7074 2d4c 616e 6775 6167 653a 2065 6e2c pt-Language:.en,
0x0280: 202a 3b71 3d30 2e31 0d0a 436f 6e6e 6563 .*;q=0.1..Connec
0x0290: 7469 6f6e 3a20 4b65 6570 2d41 6c69 7665 tion:.Keep-Alive
0x02a0: 0d0a 436f 6e74 656e 742d 5479 7065 3a20 ..Content-Type:.
0x02b0: 6170 706c 6963 6174 696f 6e2f 782d 7777 application/x-ww
0x02c0: 772d 666f 726d 2d75 726c 656e 636f 6465 w-form-urlencode
0x02d0: 640d 0a43 6f6e 7465 6e74 2d4c 656e 6774 d..Content-Lengt
0x02e0: 683a 2036 390d 0a43 6f6f 6b69 653a 2050 h:.69..Cookie:.P
0x02f0: 4850 5345 5353 4944 3d30 3462 6362 3464 HPSESSID=04bcb4d
0x0300: 6433 3262 6164 3264 3631 3163 3636 3835 d32bad2d611c6685
0x0310: 3035 6437 3864 3963 320d 0a0d 0a73 6561 05d78d9c2....sea
0x0320: 7263 683d 6874 7470 2533 4125 3246 2532 rch=http%3A%2F%2
0x0330: 4677 7777 2e66 7265 6562 7364 2e6f 7267 Fwww.freebsd.org
0x0340: 266d 6564 6961 7479 7065 3d77 6562 2653 &mediatype=web&S
0x0350: 7562 6d69 743d 5461 6b65 2b4d 652b 4261 ubmit=Take+Me+Ba
0x0360: 636b ck
15:12:04.814659 IP 208.70.27.34.80 > 192.168.1.100.65336: . ack 2 win 7969
0x0000: 0011 d8f8 0ab0 00c0 49ac 3c1d 0800 4500 ........I.<...E.
0x0010: 0028 692e 4000 3106 332d d046 1b22 c0a8 .(i. at .1.3-.F."..
0x0020: 0164 0050 ff38 6792 5cda b779 ef4e 5010 .d.P.8g.\..y.NP.
0x0030: 1f21 7880 0000 0000 0000 0000 .!x.........
15:12:05.071373 IP 208.70.27.34.80 > 192.168.1.100.55418: . ack 813 win 7308
0x0000: 0011 d8f8 0ab0 00c0 49ac 3c1d 0800 4500 ........I.<...E.
0x0010: 0028 7df6 4000 3106 1e65 d046 1b22 c0a8 .(}. at .1..e.F."..
0x0020: 0164 0050 d87a 68e8 ecb1 0848 c6ba 5010 .d.P.zh....H..P.
0x0030: 1c8c e86b 0000 0000 0000 0000 ...k........
15:12:05.082779 IP 208.70.27.34.80 > 192.168.1.100.55418: P 1:372(371) ack 813 win 7308
0x0000: 0011 d8f8 0ab0 00c0 49ac 3c1d 0800 4500 ........I.<...E.
0x0010: 019b 7df7 4000 3106 1cf1 d046 1b22 c0a8 ..}. at .1....F."..
0x0020: 0164 0050 d87a 68e8 ecb1 0848 c6ba 5018 .d.P.zh....H..P.
0x0030: 1c8c 0f66 0000 4854 5450 2f31 2e31 2033 ...f..HTTP/1.1.3
0x0040: 3032 2046 6f75 6e64 0d0a 4461 7465 3a20 02.Found..Date:.
0x0050: 5765 642c 2032 3320 4a61 6e20 3230 3038 Wed,.23.Jan.2008
0x0060: 2031 373a 3132 3a30 3420 474d 540d 0a53 .17:12:04.GMT..S
0x0070: 6572 7665 723a 2041 7061 6368 652f 322e erver:.Apache/2.
... (snipped) ...
As you can see, I used Links 2.1pre28 on a FreeBSD-6.1-RELEASE. As I
understood RFC-2616, I'd expect Links to include a \r\n\r\n after the
last header ("Cookie:") in the request:
http://tools.ietf.org/html/rfc2616#section-5
5 Request
A request message from a client to a server includes, within the
first line of that message, the method to be applied to the resource,
the identifier of the resource, and the protocol version in use.
Request = Request-Line ; Section 5.1
*(( general-header ; Section 4.5
| request-header ; Section 5.3
| entity-header ) CRLF) ; Section 7.1
CRLF
[ message-body ] ; Section 4.3
Am I overlooking something?
Thanks for your time.
PS: The request worked, this is just a standards-compliance question.
--
Ricardo Nabinger Sanchez <rnsanchez at socksarmor.org>
http://www.socksarmor.org/
More information about the links-list
mailing list