| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
| |
It seems there was a bug in Perl < 5.22 that led to defined immediately
followed by a ternary '?' getting the parsing wrong. I checked this with
RJBS at the PTC and he couldn't explain why, so I just added the
brackets.
|
|
|
|
|
| |
you can create them by passing `undef` as value, which is also what
you get when parsing them
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
been documented and have always been considered private to
actually be private.
* adapt -> _adapt
* code_point -> _code_point
* digit_value -> _digit_value
* min -> _min
This allows us to remove some special casing in the dist.ini conf
file, reducing complexity.
|
| |
|
|
|
|
| |
(closes github issue #13)
|
| |
|
| |
|
| |
|
|
|
|
| |
fixing the params() setter but make the code more readable in general.
|
|
|
|
|
| |
Latest RFC version of the uri file scheme is RFC 8089, and latest
version of RFC for generic URI syntax is RFC 3986.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
uri_escape accepts a set of characters as its second parameter. This
would have some escaping done on it before being put in an eval to
generate an an escaping sub.
The last release of URI attempted to do extra escaping on this character
set. It tried to match the allowed forms of character classes, including
a-z and [:alpha:] forms, an escaping everything else. But it didn't
allow for character classes like \w. This broke several modules.
The original design of the code was written for prehistoric versions of
perl that didn't support compiled regexes (qr//). This is why it needed
the eval and sub generation. The supported perl versions all support
qr// objects, so we can compile using them rather than eval. This means
much less needs to be escaped. Specifically, only the [] characters
themselves. If we allow through the POSIX class forms ([:alpha:]),
escaping all others, we can still be safe but allow all existing forms
to be used.
This can result in warnings when attempting to use escapes like \Q...\E,
which are not valid character class escapes. These warnings are
appropriate, so test for them.
Some existing tests were expecting any backslash in the input to result
in backslashes being escaped. Since we are now allowing all backslash
sequences through, this is inappropriate. The tests needed to be
changed.
|
| |
|
|
|
|
| |
Fixes #74
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Test case added.
Skipping attempt to unescape empty authority part.
See: https://github.com/libwww-perl/URI/issues/102
The previous fix checked the result of the regex-match.
However, the regex-match could have avoided the situation
in the first place.
The new regex now asks for a non-zero authority part.
Skip IPv6 handling of schemes that do not have an authority part.
Currently: data, file, ldapi, urn, sqlite, sqlite3
Fix: Fallback to pre 5.11 for specific schemes (i.e. 'mailto:').
Short test cases added for 'mailto:' URIs having
address literals (IPv4 and IPv6).
Modernized t/file.t to use Test::More instead of plain TAP.
In preparation of more future tests.
Tests added to show that domain in file:// is properly escaped.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
bugfix #99: Square brackets in path element not escaped.
Hopefully fixes issue#99 w/o breaking new stuff.
https://github.com/libwww-perl/URI/issues/99
Setting the environment variable URI_RESERVED_SQUARE_BRACKETS=1
restores the old behaviour (5.10 and before).
See section ENVIRONMENT VARIABLES of the URI.pm perldoc.
Tests for issue#99: Square brackets in path element not escaped.
Not complete yet. See #TODO.
t/old-base.t adapted to match new and legacy behavior
Fixed typos in POD of URI.pm
more tests, esp. getter validation
userinfo(): setter escapes according to RFC 3987
authority(): setter escapes userinfo part separately from host part
authority(): IPv6 detection for host part (should use Regexp::IPv6)
URI.pm: POD fixed
uri-test: explicit use of ./lib replaced by visual warning
See: https://github.com/libwww-perl/URI/pull/100#discussion_r903497606
POD corrections and clarifications.
See: https://github.com/libwww-perl/URI/pull/100#discussion_r895442979
https://github.com/libwww-perl/URI/pull/100#discussion_r895443302
https://github.com/libwww-perl/URI/pull/100#discussion_r903515373
Unused global variable removed.
See: https://github.com/libwww-perl/URI/pull/100#discussion_r895978559
_generic.pm: uses Regexp::IPv6 if installed, fallback otherwise
The fallback regexp is just a check for the minimum amount of
legal characters. Extra check is used to ensure that at least
two colons are present.
See: https://github.com/libwww-perl/URI/pull/100#discussion_r903810999
Another try to get POD spehlink rait.
cpanfile: Regexp::IPv6 is suggested at runtime
Spelling fixed and comments updated. Thanks, @simbabque.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is in accordance with
https://datatracker.ietf.org/doc/html/rfc6068#section-5.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Fixes #73 and #76.
|
| |
|
|
|
|
|
|
|
| |
This reverts commit c77b2bc35d8bb6f469851f97ec0354c67f0228fe.
This was breaking tests for HTTP::Config. See
https://github.com/libwww-perl/HTTP-Message/issues/121
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
to fix GH Issue #45.
Standardized the documentation a bit as well by using head2 entries
instead of over and item. This allows metacpan and the like to
auto-generate a Table of Contents a bit more easily and makes direct
links to sections/functions a bit simpler.
The synopsis should be directly runnable now if someone were to
copy and paste it to test.
|
| |
|
| |
|