diff --git a/src/types.jl b/src/types.jl index 3974b87..66a5eee 100644 --- a/src/types.jl +++ b/src/types.jl @@ -52,10 +52,10 @@ end function Request(data::String) reg = r""" ((?P[^:/]+)://)? # optional protocol - (?P[^:/]+) # required host + (?P[^:/]+)? # required host (but can be omitted in parsing like /path/ or ./path) (:(?P[0-9]{1,5}))? # optional port (will match impossible 65000+ ports) (/(?P[^\?]*))? # optional path - (\?(?P[^\?]+))? # optional query + (\?(?P.+))? # optional query """x s = endswith(data, "\r\n") ? data[1:end-2] : data m = match(reg, s)