Commit Graph

19 Commits

Author SHA1 Message Date
Ryan Dahl
673cbef4c5 Allow quotes in URI
IE6 apparently sends such requests... Reported by Michael Carter.
2009-10-14 19:26:20 +02:00
Jeremy Hinegardner
37a0ff8928 Initialize the on_fragment callback pointer
http_parser_init() did not initialize the http_parser.on_fragment.
2009-07-20 14:08:47 +02:00
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.
2009-07-20 14:07:21 +02:00
Ryan
23b8eed44c Fix errors for -Wall. 2009-07-13 23:54:20 +02:00
Ryan
cc5c9b037c Correctly error out on non-zero return values. 2009-06-12 17:26:21 +02:00
Ryan
900815228c Don't be clever with the includes 2009-06-10 18:55:28 +02:00
Ryan
9367b74a3d Check for integer overflow in content-length.
Also only allow single digits in the HTTP version.
Need multiple digits? Convince me.
2009-06-09 16:45:12 +02:00
Ryan
9f59cd926f Check for buffer overflow attacks. 2009-06-09 15:16:36 +02:00
Ryan
1776708191 stylistic clean ups. dont include assert.h unless NDEBUG 2009-06-09 14:30:57 +02:00
Ryan
961d455618 Add license file with Mongrel's license. 2009-06-09 14:18:25 +02:00
Ryan
8cae1feeb4 random clean ups 2009-04-27 17:07:07 +02:00
Ryan
7898f1a97a add http_parser_should_keep_alive() 2009-04-27 16:54:09 +02:00
Ryan
fff71362fe Break on non-zero return value from on_body and on_headers_complete.
Changed skip_body() from a function to a marco. This is rather hacky and
should be dealt with better in the future.

Also add handling for callback on_message_begin.
2009-04-27 16:10:08 +02:00
Ryan
cc88f71204 Partially handle callback return values 2009-04-27 15:07:15 +02:00
Ryan
c202e8ecbe Add second response fixture. Response tests pass. 2009-04-26 21:26:07 +02:00
Ryan
c288a966fe lint 2009-04-26 20:52:53 +02:00
Ryan
5214fb2524 for clarity, replace is_request_stream with enum http_parser_type 2009-04-26 20:44:28 +02:00
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.
2009-04-26 12:37:06 +02:00
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.
2009-04-25 13:33:16 +02:00