File tree Expand file tree Collapse file tree 2 files changed +2
-0
lines changed
Expand file tree Collapse file tree 2 files changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -220,6 +220,7 @@ defimpl Binary.Chars, for: URI.Info do
220220 if uri . userinfo , do: result = result <> uri . userinfo <> "@"
221221 if uri . host , do: result = result <> uri . host
222222 if uri . port , do: result = result <> ":" <> integer_to_binary ( uri . port )
223+ if uri . path , do: result = result <> uri . path
223224 if uri . query , do: result = result <> "?" <> uri . query
224225 if uri . fragment , do: result = result <> "#" <> uri . fragment
225226
Original file line number Diff line number Diff line change @@ -135,6 +135,7 @@ defmodule URITest do
135135 assert to_binary ( URI . parse ( "http://google.com:443" ) ) == "http://google.com:443"
136136 assert to_binary ( URI . parse ( "https://google.com:443" ) ) == "https://google.com"
137137 assert to_binary ( URI . parse ( "http://lol:wut@google.com" ) ) == "http://lol:wut@google.com"
138+ assert to_binary ( URI . parse ( "http://google.com/elixir" ) ) == "http://google.com/elixir"
138139 assert to_binary ( URI . parse ( "http://google.com?q=lol" ) ) == "http://google.com?q=lol"
139140 assert to_binary ( URI . parse ( "http://google.com?q=lol#omg" ) ) == "http://google.com?q=lol#omg"
140141 end
You can’t perform that action at this time.
0 commit comments