Switching from websocket uri to http uri to use uri.port defaults around http specific scheme more appropriately

This commit is contained in:
Joakim Erdfelt 2012-07-02 07:23:55 -07:00
parent 990eba7ef4
commit 9f23e89756
1 changed files with 3 additions and 3 deletions

View File

@ -257,10 +257,10 @@ public class BlockheadClient implements Parser.Listener
{
StringBuilder req = new StringBuilder();
req.append("GET /chat HTTP/1.1\r\n");
req.append("Host: ").append(destWebsocketURI.getHost());
if (destWebsocketURI.getPort() > 0)
req.append("Host: ").append(destHttpURI.getHost());
if (destHttpURI.getPort() > 0)
{
req.append(':').append(destWebsocketURI.getPort());
req.append(':').append(destHttpURI.getPort());
}
req.append("\r\n");
req.append("Upgrade: websocket\r\n");