] with-variables
] unit-test
-{ URL" http://localhost:3128" } [
- { { "http.proxy" "localhost:3128" } } [
+{ URL" //localhost:3128" } [
+ { { "http.proxy" "//localhost:3128" } } [
"google.com" "GET" <client-request> ?default-proxy proxy-url>>
] with-variables
] unit-test
-{ URL" http://localhost:3128" } [
+{ URL" //localhost:3128" } [
"google.com" "GET" <client-request>
- URL" localhost:3128" >>proxy-url ?default-proxy proxy-url>>
+ URL" //localhost:3128" >>proxy-url ?default-proxy proxy-url>>
] unit-test
-{ URL" http://localhost:3128" } [
+{ URL" //localhost:3128" } [
"google.com" "GET" <client-request>
- "localhost:3128" >>proxy-url ?default-proxy proxy-url>>
+ "//localhost:3128" >>proxy-url ?default-proxy proxy-url>>
] unit-test
{ URL" http://proxysec.private:3128" } [
] if ;
: misparsed-url? ( url -- url' )
- [ protocol>> not ] [ host>> not ] [ path>> ]
- tri and and ;
+ [ protocol>> not ] [ host>> not ] [ path>> ] tri and and ;
: request-url ( url -- url' )
dup >url dup misparsed-url? [