Am 14.11.26 um 11:46 schrieb Rainer Jung:
Am 14.11.26 um 07:43 schrieb Daniel Sahlberg:
fre 13 nov. 2026 kl. 14:44 skrev Rainer Jung <[email protected]
<mailto:[email protected]>>:
Am 13.11.26 um 14:00 schrieb Ruediger Pluem via dev:
>>
>> I can create a PR if this seems desirable.
>
> You can, but APR is still on Subversion :-)
Oh well ...
I would say you can make a PR if that is what makes most sense to you.
It is easy enough to extract the patch and apply to SVN and close the
PR in one go.
I can do that if needed, although I’m not an expert in the code so I’d
like a review from someone else.
Thanks Daniel. Sorry for the confusion. By PR I originally meant
"suggest a patch". I have committed (minor) things to APR/APPU in the
past, so I can do all necessary steps by myself.
I will change the code in APR trunk and add the patch to STATUS in APU
1.7 and 1.6.
Suggested patch:
Index: uri/apr_uri.c
===================================================================
--- uri/apr_uri.c (Revision 1940324)
+++ uri/apr_uri.c (Arbeitskopie)
@@ -900,6 +900,7 @@
/* scheme must be non-empty and followed by : */
if (s != uri && s[0] == ':') {
uptr->scheme = apr_pstrmemdup(p, uri, s - uri);
+ uptr->port = apr_uri_port_of_scheme(uptr->scheme);
s++;
}
else {
@@ -1017,7 +1018,6 @@
/* Invalid characters after ':' found */
return APR_EGENERAL;
}
- uptr->port = apr_uri_port_of_scheme(uptr->scheme);
goto deal_with_path;
}
It moves setting the port from the scheme directly to where the schemes
is detected. The code further down deriving the port from a port
explicitly contained in the URI does not check, whether port was already
set and overwrites it. So instead of falling back to the default port,
always set it from the scheme and then overwrite it, if one was
explicitly given.
I'll wait a bit for comments before I apply it.
I am not sure what the current backport process to APU 1.7 and 1.6 is.
Probably apply to 1.7 directly after APR trunk, but for 1.6 add it to
STATUS?
Best regards,
Rainer