Skip to content

Instantly share code, notes, and snippets.

@ryankennedy
Created August 2, 2011 20:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryankennedy/1121167 to your computer and use it in GitHub Desktop.
Save ryankennedy/1121167 to your computer and use it in GitHub Desktop.
bite me, java.net.URI
#
# WTF is java.net.URI thinking?
#
scala> new URI("http", null, "hostname", 80, "/foo", "bar%20is=baz", null)
res5: java.net.URI = http://hostname:80/foo?bar%2520is=baz
#
# Oh, I see...I have to do this the inconvenient way.
#
scala> URI.create("http://hostname:80/foo?bar%20is=baz")
res6: java.net.URI = http://hostname:80/foo?bar%20is=baz
@spullara
Copy link

spullara commented Aug 2, 2011

new URI("http", null, "hostname", 80, "/foo", "bar is=baz", null)? why encode the qps first?

http://hostname:80/foo?bar%20is=baz

@ryankennedy
Copy link
Author

ryankennedy commented Aug 2, 2011 via email

@spullara
Copy link

spullara commented Aug 2, 2011

yeah, seems broken to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment