ASF Bugzilla – Attachment 30098 Details for
Bug 52479
apr_uri_parse("@localhost::8080") reports "@localhost" for the scheme
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
proof of concept fix
PR52479.diff (text/plain), 991 bytes, created by
Stefan Fritsch
on 2013-03-24 08:47:25 UTC
(
hide
)
Description:
proof of concept fix
Filename:
MIME Type:
Creator:
Stefan Fritsch
Created:
2013-03-24 08:47:25 UTC
Size:
991 bytes
patch
obsolete
>diff --git a/test/testuri.c b/test/testuri.c >index ef43388..fd0f53e 100644 >--- a/test/testuri.c >+++ b/test/testuri.c >@@ -123,6 +123,10 @@ struct aup_test aup_tests[] = > "file:../photos/image.jpg", > 0, "file", NULL, NULL, NULL, NULL, NULL, "../photos/image.jpg", NULL, NULL, 0 > }, >+ { >+ "@localhost::8080", >+ APR_EGENERAL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 0 >+ }, > }; > > struct uph_test { >diff --git a/uri/apr_uri.c b/uri/apr_uri.c >index cd8e6ff..187e38f 100644 >--- a/uri/apr_uri.c >+++ b/uri/apr_uri.c >@@ -316,6 +316,12 @@ deal_with_path: > goto deal_with_path; /* backwards predicted taken! */ > } > >+ if (strspn(uri, "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+-.") >+ != s - uri) { >+ /* invalid character in scheme */ >+ goto deal_with_authority; >+ } >+ > uptr->scheme = apr_pstrmemdup(p, uri, s - uri); > if (s[1] != '/' || s[2] != '/') { > uri = s + 1;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 52479
: 30098