Remove trailing junk from IP addresses for sockets
commit6b31942b265effd792843be299e50cdcfe584325
authorPaul Bissonnette <paulbiss@fb.com>
Wed, 12 Nov 2014 21:46:46 +0000 (12 13:46 -0800)
committerhhvm-bot <hhvm-bot@fb.com>
Wed, 12 Nov 2014 22:00:37 +0000 (12 14:00 -0800)
tree1f3284cbab6d74e4314e067e395dbabcce82a979
parentf80bfae3394cc48a0a99a49e003c7c3cd92e444f
Remove trailing junk from IP addresses for sockets

Summary: If IP addresses contain an additional '/' (potentially followed by other
characters) they should all be ignored. For instance prot://1.2.3.4:567/foo
is a connection to 1.2.3.4 on port 567 over protocol prot where /foo is
simply ignored.

Fixes #3154

Reviewed By: @JoelMarcey

Differential Revision: D1671652

Signature: t1:1671652:1415769458:5fd487f565ec5f3c4a801270b9857f8174c89070
hphp/test/slow/streams/addr-junk.php [new file with mode: 0644]
hphp/test/slow/streams/addr-junk.php.expect [new file with mode: 0644]
hphp/util/network.cpp