Commit ac63eed
committed
Allow schemeless ip address as job url
When creating a Mojo::URL object without a schema, the whole
string is seen as a path, so it for 10.20.30.40/tests/42 it would be
a path with three elements '10.20.30.40', 'tests', '42'. Then the
first item containing a digit is taken as a match for the job id.
use Mojo::URL;
use Data::Dumper;
my $url = Mojo::URL->new("10.20.30.40/x/y");
say Dumper $url;
__END__
$VAR1 = bless( {
'path' => bless( {
'trailing_slash' => '',
'parts' => [
'10.20.30.40',
'x',
'y'
],
'leading_slash' => '',
'charset' => 'UTF-8'
}, 'Mojo::Path' )
}, 'Mojo::URL' );
Issue: https://progress.opensuse.org/issues/1847351 parent 9b87196 commit ac63eed
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| 178 | + | |
| 179 | + | |
178 | 180 | | |
179 | 181 | | |
180 | | - | |
181 | | - | |
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| |||
0 commit comments