patch: uri_decode() -- handle empty username

This commit is contained in:
Alfred E. Heggestad 2011-03-18 10:45:57 +00:00
parent 85ab7c2120
commit 630fa8eb58

View file

@ -110,7 +110,7 @@ int uri_decode(struct uri *uri, const struct pl *pl)
memset(uri, 0, sizeof(*uri));
if (0 == re_regex(pl->p, pl->l,
"[^:]+:[^@:]+[:]*[^@]*@[^;? ]+[^?]*[^]*",
"[^:]+:[^@:]*[:]*[^@]*@[^;? ]+[^?]*[^]*",
&uri->scheme, &uri->user, NULL, &uri->password,
&hostport, &uri->params, &uri->headers)) {