diff --git a/lib/HTTP/Request.pm6 b/lib/HTTP/Request.pm6 index 50f7760..222c413 100644 --- a/lib/HTTP/Request.pm6 +++ b/lib/HTTP/Request.pm6 @@ -285,7 +285,7 @@ method make-boundary(int $size=10) { method Str (:$debug, Bool :$bin) { - $.file = '/' ~ $.file unless $.file.starts-with: '/'; + $.file ~~ s/^([https?':/']?)['/']?/$0\//; my $s = "$.method $.file $.protocol"; $s ~= $CRLF ~ callwith($CRLF, :debug($debug), :$bin); }