Browse files

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.
  • Loading branch information...
ry committed Dec 6, 2009
1 parent 12808fe commit 9c059ec60dc564edc54c8967cc31710d754da6c1
Showing with 127 additions and 464 deletions.
  1. +1 −1
  2. +120 −462 http_parser.c
  3. +6 −1 http_parser.h
@@ -4,7 +4,7 @@ HTTP Parser
This is a parser for HTTP messages written in C. It parses both requests
and responses. The parser is designed to be used in performance HTTP
applications. It does not make any allocations, it does not buffer data, and
-it can be interrupted at anytime. It only requires about 128 bytes of data
+it can be interrupted at anytime. It only requires about 136 bytes of data
per message stream (in a web server that is per connection).
Oops, something went wrong.

0 comments on commit 9c059ec

Please sign in to comment.