Created
July 20, 2014 06:27
-
-
Save dstufft/4dbdec2ea53bc3a1479c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> import http11 | |
>>> | |
>>> p = http11.ffi.new("http_parser *") | |
>>> http11.lib.http_parser_init(p) | |
>>> p.finished | |
0 | |
>>> p.error | |
0 | |
>>> http11.lib.http_parser_execute(p, b"GET / HTTP/1.1\r\n\r\n", 18, 0) | |
1 | |
>>> p.finished | |
1 | |
>>> p.error | |
0 | |
>>> http11.lib.http_parser_init(p) | |
>>> http11.lib.http_parser_execute(p, b"WAT / HTTBB/1.1\r\n\r\n", 19, 0) | |
1 | |
>>> p.finished | |
1 | |
>>> p.error | |
1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment