Skip to content

Instantly share code, notes, and snippets.

@ichiban
Created February 14, 2016 07:16
Show Gist options
  • Select an option

  • Save ichiban/c3a4b13e40ed36d5d291 to your computer and use it in GitHub Desktop.

Select an option

Save ichiban/c3a4b13e40ed36d5d291 to your computer and use it in GitHub Desktop.
HTTPパーサの進捗
$ cat post.txt | ./1l
Input:
POST /cgi-bin/process.cgi HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Content-Type: text/xml; charset=utf-8
Content-Length: length
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
<?xml version="1.0" encoding="utf-8"?>
<string xmlns="http://clearforest.com/">string</string>
**** message begin ****
method: "POST"
url: "/cgi-bin/process.cgi"
major: "1"
minor: "1"
field: "User-Agent"
value: "Mozilla/4.0 (compatible; MSIE5.01; Windows NT)"
field: "Host"
value: "www.tutorialspoint.com"
field: "Content-Type"
value: "text/xml; charset=utf-8"
field: "Content-Length"
value: "length"
field: "Accept-Language"
value: "en-us"
field: "Accept-Encoding"
value: "gzip, deflate"
field: "Connection"
value: "Keep-Alive"
Fatal error: exception Parser.InvalidHeaderToken
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment