Santiago Gala
0264a0aefc
Upgrade on CONNECT method
15 years ago
Cliff Frey
c83a018d05
test: always try and break every testcase up into two submessages
...
This is just another way that would have caught the bug introduced in
076fa15132
and fixed by
03b8eaa5f8
.
15 years ago
Cliff Frey
5dd740304f
test.c: get it to work with valgrind by using realloc less
...
For some reason valgrind would rapidly run out of memory on my machine
without this.
15 years ago
Ryan Dahl
03b8eaa5f8
Reset url_mark on s_req_host
...
add a new scan test. Report and fix by Master Becker.
15 years ago
Ryan Dahl
9dc258f9dd
Add subversion request methods
...
REPORT, MKACTIVITY, CHECKOUT, MERGE
15 years ago
Cliff Frey
7a1103ae53
add tests of method strings
...
Currently this test fails, because short method strings do not cause
failures, even if they are unknown methods. However, long unknown
method strings do cause errors.
15 years ago
Cliff Frey
634c3a6d26
test: fix compile warnings about printf + size_t
15 years ago
Cliff Frey
b413961182
test.c: add cases for header overflow conditions
...
This currently fails, but the next commit fixes the issue.
15 years ago
Ryan Dahl
4cf39fd2fa
Support request URLs without schema
...
Test case from Poul T Lomholt <pt@lomholt.com>
15 years ago
Ryan Dahl
cdda8b6a60
Support empty header values
...
Test case by Pierre Ruyssen <pierre@ruyssen.fr>
15 years ago
Ryan Dahl
8beed7ef17
Fix whitespace
15 years ago
Cliff Frey
b8c3336f5d
add support for HTTP_BOTH
...
This is good for analyzing raw streams of data when one is not sure
which direction it will be in.
15 years ago
Cliff Frey
7239788205
pass pointer to settings structure rather than pass by value
15 years ago
Ryan Dahl
7cfa645fc7
Fix long chunked message bug
...
The HTTP_MAX_HEADER_SIZE was being consulted at the end of the chunked
message (when you look for trailing headers).
http://github.com/ry/node/issues#issue/77
15 years ago
Ryan Dahl
88d11b394d
Support Upgrade header
15 years ago
Ryan Dahl
e09651c6bb
cross platfom size_t printing
15 years ago
Ryan Dahl
dbd2dad461
Introduce http_parser_settings
15 years ago
Ryan Dahl
8243fddd17
Fix c++ and mac compile errors
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
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
79947a7334
Remove EOL whitespace
15 years ago
Ryan Dahl
b795f94686
Add method -> string lookup
15 years ago
Ryan Dahl
2fc9c8d801
Accidentally commented out a test
15 years ago
Ryan Dahl
51e9ff0314
Fix initialization bug.
...
Heap allocate parser in tests, to get errors with valgrind.
15 years ago
Ryan Dahl
a8f7a3cd78
add message_complete_on_eof test
15 years ago
Ryan Dahl
bd291ab5d8
add license file
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
ca1e011ab3
add response scan, fix persistent bug
15 years ago
Ryan Dahl
3ac0ebdee5
Passing tests
15 years ago
Ryan Dahl
0642366f0e
change around api
15 years ago
Ryan Dahl
3834853a8a
uri -> url
15 years ago
Ryan Dahl
6cefbc13af
all scans 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
Ryan Dahl
c5a92f792f
Now parsing some req headers
15 years ago
Ryan Dahl
433202d825
new version
...
Trashing the old Ragel parser (which was based on Mongrel) because it's
proving difficult to get the control I need in end-of-message cases.
Replacing this with a hand written parser using a couple tricks borrowed
from NGINX. The new parser will be much more work to write, but should prove
faster and allow for better hacking.
15 years ago
Phoenix Sol
6bfd5bf76d
add ab to test
15 years ago
Ryan Dahl
2769741ba5
Fix LICENSE
15 years ago
Ryan Dahl
d827cb368c
Allow quotes in URI
...
IE6 apparently sends such requests... Reported by Michael Carter.
15 years ago
Ryan
dbbc73c16f
API Change: Return void from http_parser_execute().
15 years ago
Ryan
efd801f410
Bug Fix: Connection:close with missing Content-Length.
...
The test and bug report are from tomika.
15 years ago
Ryan
004aff9001
API Change: Demand that EOFs are passed to http_parser_execute().
15 years ago
Ryan
e244dbf797
Fix whitespace, clean up some macros.
15 years ago
Jeremy Hinegardner
b538749fc3
Allow spaces between a chunked start and the CRLF
16 years ago
Jeremy Hinegardner
4ac5581cc6
The Reason Phrase on a response is optional.
...
The standard has it as *<TEXT, exlcuding CR, LF>
and a response with no reason phrase was found in
the wild.
16 years ago
Ryan
23b8eed44c
Fix errors for -Wall.
16 years ago
Ryan
88049b02a5
test: Check that message_begin, message_complete, headers_complete always called
16 years ago
Ryan
cc88f71204
Partially handle callback return values
16 years ago
Ryan
c202e8ecbe
Add second response fixture. Response tests pass.
16 years ago
Ryan
c288a966fe
lint
16 years ago
Ryan
5214fb2524
for clarity, replace is_request_stream with enum http_parser_type
16 years ago
Ryan
9906cb69e6
Clean up the tests in preperation for testing responses.
16 years ago
Ryan
7476612ec2
Deep asserts in test.c
...
Instead of returning a boolean and calling assert() in main(), test.c now
calls assert() as soon as possible. This will require gdb to know what is failing
but that was probably already true before and this way uses a lot less code.
I also added a conditional to the parser which, perhaps, splits input more efficiently
into request and responses. I'm playing around with this and it will likely
change again in the future.
16 years ago
Ryan
97d4572c68
Remove "ebb_message" object from libebb's parser.
...
And much more:
* Begin the framework for parsing HTTP responses
* Modify the test code with the new layout
* Remove EBB_ prefix and use just HTTP_
* Start simple new Makefile
Currently the test passes but it is only checking HTTP requests. I get the
feeling that it is much slower than before, although I have no solid
evidence for this.
16 years ago