summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Fiegehenn <simbabque@cpan.org>2023-04-29 17:08:42 +0100
committerJulien Fiegehenn <simbabque@cpan.org>2023-04-29 17:08:42 +0100
commitb63e24436ccb9d730088a80b9ee5c9c71a00b990 (patch)
tree75cdf1e5a2ca4ef5561f6df599b903e68c10a192
parentaf5c82128112dc2b3b91b668f0a070505b0d993c (diff)
downloaduri-b63e24436ccb9d730088a80b9ee5c9c71a00b990.tar.gz
URI-5.18v5.18
- Add a GH workflow to test LWP::Curl (GH#116) (Olaf Alders) - Add documentation examples for the host() and ihost() methods (GH#28) (Sebastian Willing) - Remove colon from username:password if there is no password (GH#31) (David E. Wheeler, Joenio Marques da Costa, Julien Fiegehenn) - Prefix private methods with _ in URI::_punycode (GH#47) (David E Wheeler)
-rw-r--r--Changes2
-rw-r--r--README.md11
2 files changed, 10 insertions, 3 deletions
diff --git a/Changes b/Changes
index 002340a..58e43fb 100644
--- a/Changes
+++ b/Changes
@@ -1,6 +1,6 @@
Revision history for URI
-{{$NEXT}}
+5.18 2023-04-29 16:08:14Z
- Add a GH workflow to test LWP::Curl (GH#116) (Olaf Alders)
- Add documentation examples for the host() and ihost() methods (GH#28)
(Sebastian Willing)
diff --git a/README.md b/README.md
index a0f8a30..d9ab4bc 100644
--- a/README.md
+++ b/README.md
@@ -430,7 +430,7 @@ methods.
Sets and returns the unescaped hostname.
- If the $new\_host string ends with a colon and a number, then this
+ If the `$new_host` string ends with a colon and a number, then this
number also sets the port.
For IPv6 addresses the brackets around the raw address is removed in the return
@@ -438,9 +438,16 @@ methods.
can use a raw address or one enclosed in brackets. The address needs to be
enclosed in brackets if you want to pass in a new port value as well.
+ my $uri = URI->new("http://www.\xC3\xBCri-sample/foo/bar.html");
+ print $u->host; # www.xn--ri-sample-fra0f
+
- $uri->ihost
- Returns the host in Unicode form. Any IDNA A-labels are turned into U-labels.
+ Returns the host in Unicode form. Any IDNA A-labels (encoded unicode chars with
+ _xn--_ prefix) are turned into U-labels (unicode chars).
+
+ my $uri = URI->new("http://www.\xC3\xBCri-sample/foo/bar.html");
+ print $u->ihost; # www.\xC3\xBCri-sample
- $uri->port
- $uri->port( $new\_port )