From 3dc43b27e2ab2740acda0514bb0d9562810b3df1 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Tue, 21 Apr 2009 11:14:56 -0700 Subject: http11: support underscores in URI hostnames They aren't common, but apparently there exist URLs with them, so we'll support them. --- ext/unicorn/http11/http11_parser_common.rl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ext/unicorn/http11/http11_parser_common.rl') diff --git a/ext/unicorn/http11/http11_parser_common.rl b/ext/unicorn/http11/http11_parser_common.rl index 567ed6b..ae01a55 100644 --- a/ext/unicorn/http11/http11_parser_common.rl +++ b/ext/unicorn/http11/http11_parser_common.rl @@ -25,7 +25,7 @@ # URI schemes and absolute paths scheme = ( "http"i ("s"i)? ) $downcase_char >mark %scheme; - hostname = (alnum | "-" | ".")+; + hostname = (alnum | "-" | "." | "_")+; host_with_port = (hostname (":" digit*)?) >mark %host; path = ( pchar+ ( "/" pchar* )* ) ; -- cgit v1.2.3-24-ge0c7