Fix folly Uri::host() return value for IPv6 address
authorJun LI <albertli@fb.com>
Wed, 16 Apr 2014 20:58:54 +0000 (13:58 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 18 Apr 2014 19:04:15 +0000 (12:04 -0700)
commit59c7c8eafcd986b169fecaaff870d2d29267d029
tree90f1da8dfa9006b0d9171197041cba4ac0d7a534
parent934a0b06a4ce6e85459c84dc2c6a0e61587fc62c
Fix folly Uri::host() return value for IPv6 address

Summary: folly Uri::host() returns leading and trailing brackets for IPv6 host, for example, for URI "http:://[::1]:8080/index.html", host() method returns "[::1]". But square brackets are not part of host in fact, this diff is going to remove brackets for IPv6 host.

Test Plan: fbconfig -r folly/test && fbmake runtests_dbg

Reviewed By: chip@fb.com

FB internal diff: D1276513
folly/Uri.cpp
folly/Uri.h
folly/test/UriTest.cpp