diff options
author | evanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9> | 2007-10-15 18:00:40 +0000 |
---|---|---|
committer | evanweaver <evanweaver@19e92222-5c0b-0410-8929-a290d50e31e9> | 2007-10-15 18:00:40 +0000 |
commit | e6336cdacfc8d0ca63fdd786952b2ae9f9000cd7 (patch) | |
tree | ee4d267501b92053a79985ea1ff64ea2f0379ca9 /ext/http11/http11_parser.rl | |
parent | 9ae59b9d96204c555d83abead77c476a6cd9d8d7 (diff) | |
download | unicorn-e6336cdacfc8d0ca63fdd786952b2ae9f9000cd7.tar.gz |
git-svn-id: svn+ssh://rubyforge.org/var/svn/mongrel/trunk@650 19e92222-5c0b-0410-8929-a290d50e31e9
Diffstat (limited to 'ext/http11/http11_parser.rl')
-rw-r--r-- | ext/http11/http11_parser.rl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ext/http11/http11_parser.rl b/ext/http11/http11_parser.rl index 90bb63f..d974022 100644 --- a/ext/http11/http11_parser.rl +++ b/ext/http11/http11_parser.rl @@ -39,6 +39,10 @@ if(parser->request_uri != NULL) parser->request_uri(parser->data, PTR_TO(mark), LEN(mark, fpc)); } + action fragment { + if(parser->fragment != NULL) + parser->fragment(parser->data, PTR_TO(mark), LEN(mark, fpc)); + } action start_query {MARK(query_start, fpc); } action query_string { @@ -96,11 +100,12 @@ absolute_path = ("/"+ rel_path); Request_URI = ("*" | absolute_uri | absolute_path) >mark %request_uri; + Fragment = ( uchar | reserved )* >mark %fragment; Method = (upper | digit | safe){1,20} >mark %request_method; http_number = (digit+ "." digit+) ; HTTP_Version = ("HTTP/" http_number) >mark %http_version ; - Request_Line = (Method " " Request_URI " " HTTP_Version CRLF) ; + Request_Line = (Method " " Request_URI ("#" Fragment ){0,1} " " HTTP_Version CRLF) ; field_name = (token -- ":")+ >start_field %write_field; |