From 6947497b6001ca9f46009cd78f9d55db4d0fc007 Mon Sep 17 00:00:00 2001 From: zedshaw Date: Wed, 5 Apr 2006 12:36:29 +0000 Subject: Repairs to the parser so it doesn't drop CONTENT_TYPE. git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@148 19e92222-5c0b-0410-8929-a290d50e31e9 --- ext/http11/http11.c | 2 +- ext/http11/http11_parser.rl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'ext') diff --git a/ext/http11/http11.c b/ext/http11/http11.c index 9e2cc6f..ffdbee3 100644 --- a/ext/http11/http11.c +++ b/ext/http11/http11.c @@ -135,7 +135,7 @@ void header_done(void *data, const char *at, size_t length) ctype = rb_hash_aref(req, global_http_content_type); if(ctype != Qnil) { - rb_hash_aset(req, global_content_type, Qnil); + rb_hash_aset(req, global_content_type, ctype); } rb_hash_aset(req, global_gateway_interface, global_gateway_interface_value); diff --git a/ext/http11/http11_parser.rl b/ext/http11/http11_parser.rl index 6a256a6..af3a444 100644 --- a/ext/http11/http11_parser.rl +++ b/ext/http11/http11_parser.rl @@ -99,7 +99,7 @@ field_value = any* >start_value %write_value; - message_header = field_name ":" field_value $0 CRLF >1; + message_header = field_name ":" field_value :> CRLF; Request = Request_Line (message_header)* ( CRLF @done); -- cgit v1.2.3-24-ge0c7