Ryan Dahl
ef14734f6c
Use marcros instead of inline funcs to do callbacks
...
Simplifies things.
15 years ago
Ryan Dahl
d37a9c5b9b
fix typos
15 years ago
Ryan Dahl
8243fddd17
Fix c++ and mac compile errors
15 years ago
Ryan Dahl
1b30bf4ba5
Only allow 80kb of header bytes
15 years ago
Cliff Frey
d5a900264f
Allow newlines before HTTP requests.
...
I have seen cases where a browser will POST data, and then send an
extra CRLF before issuing the next request.
15 years ago
Cliff Frey
f167565742
Allow '_' in header fields.
...
Technically anything defined as a 'token' by
http://www.w3.org/Protocols/rfc2616/rfc2616-sec2.html#sec2.2 should be
allowed, which includes !#$%^&*+-.`~| and probably others. However
this is the only one that I have found in use.
15 years ago
Cliff Frey
6409a5bd17
Allow extra '?' in query strings, and add a test for it.
15 years ago
Cliff Frey
ae8234de93
Prevent uninitialized variable use
15 years ago
Cliff Frey
31d9f0099c
Makefile: fix include path
15 years ago
Ryan Dahl
9cbd66e49a
Support 'Proxy-Connection' header
...
See http://www.http-stats.com/Proxy-Connection
15 years ago
Ryan Dahl
caef58793e
Update license for 2010
15 years ago
Ryan Dahl
1a677040c0
API: Define parser type in http_parser_init()
...
That is, for a request parser do this:
http_parser_init(my_parser, HTTP_REQUEST)
for a response parser do this:
http_parser_init(my_parser, HTTP_RESPONSE)
Then http_parse_requests() and http_parse_responses() both turn
into http_parer_execute().
15 years ago
Ryan Dahl
6108b765ce
Bugfix: sometimes servers send \n instead of \r\n
15 years ago
Ryan Dahl
1d9ebac036
Revert "Add method -> string lookup"
...
This reverts commit b795f94686
.
(I don't like this feature, and I'm not using it.)
15 years ago
Ryan Dahl
b5b116e59e
Remove unused 's_headers_done' state
15 years ago
Ryan Dahl
79947a7334
Remove EOL whitespace
15 years ago
Ryan Dahl
402eda40a7
Change flag values to bit shifts
15 years ago
Ryan Dahl
b795f94686
Add method -> string lookup
15 years ago
Ryan Dahl
4aebd8bbb9
reorder methods
15 years ago
Ryan Dahl
0d6cebd70b
wasn't correctly setting method for PROPPATCH and PROPFIND
15 years ago
Ryan Dahl
9c059ec60d
Reimplement support for extension methods
...
This sacrifices
- a little space (10 bytes),
- a few extra calculations, and
- introduces a dependency on strncmp()
to dramatically simplify the code of parsing methods and support almost
arbitrary extension methods.
In the future I will do as NGINX does and not use strncmp but bit level
blob comparisons.
15 years ago
Ryan Dahl
12808fe1e6
accept webdav methods
15 years ago
Ryan Dahl
d53606f57e
Add a macros for the usual case
15 years ago
Ryan Dahl
0cbc9101d0
Use error label, instead of returning directly
15 years ago
Ryan Dahl
2fc9c8d801
Accidentally commented out a test
15 years ago
Ryan Dahl
769f06ef93
add tags to make clean
15 years ago
Ryan Dahl
d1e0af7420
fix spelling
15 years ago
Ryan Dahl
51e9ff0314
Fix initialization bug.
...
Heap allocate parser in tests, to get errors with valgrind.
15 years ago
Ryan Dahl
873912df5e
Only use s_dead in STRICT mode.
15 years ago
Ryan Dahl
a8f7a3cd78
add message_complete_on_eof test
15 years ago
Ryan Dahl
357d7c2a24
Update readme
15 years ago
Ryan Dahl
a5d0d52a23
Don't delete http_parser.c on make clean
15 years ago
Ryan Dahl
bd291ab5d8
add license file
15 years ago
Ryan Dahl
4536312215
two builds in makefile
15 years ago
Ryan Dahl
4226a8f63b
add tests for should_keep_alive()
15 years ago
Ryan Dahl
5b00b6a64f
add http_should_keep_alive()
15 years ago
Ryan Dahl
5b37977e32
Don't put should_keep_alive messages in front of messages
15 years ago
Ryan Dahl
8f52d451a6
Add http version to tests
15 years ago
Ryan Dahl
717d04ce2d
Optimize increasing the header_index
15 years ago
Ryan Dahl
ca1e011ab3
add response scan, fix persistent bug
15 years ago
Ryan Dahl
fb6dc67b05
strict check
15 years ago
Ryan Dahl
3ac0ebdee5
Passing tests
15 years ago
Ryan Dahl
0642366f0e
change around api
15 years ago
Ryan Dahl
b283cd950f
copyright header
15 years ago
Ryan Dahl
3834853a8a
uri -> url
15 years ago
Ryan Dahl
6cefbc13af
all scans works
15 years ago
Ryan Dahl
d931481302
fix bug, first scan works.
15 years ago
Ryan Dahl
b71a17ec85
better output for test_scan
15 years ago
Ryan Dahl
0b8a48049c
Handling chunked messages
15 years ago
Ryan Dahl
a0476a08a0
better output on errors in test program
15 years ago