Trying to get more information from failing Websocket Draft0 test failure
This commit is contained in:
parent
629c6c470a
commit
e7608eafae
|
@ -129,6 +129,7 @@ public class WebSocketConnectionD00 extends AbstractConnection implements WebSoc
|
||||||
int filled=_endp.fill(_hixieBytes);
|
int filled=_endp.fill(_hixieBytes);
|
||||||
if (filled<0)
|
if (filled<0)
|
||||||
{
|
{
|
||||||
|
_endp.flush();
|
||||||
_endp.close();
|
_endp.close();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,6 +32,7 @@ import org.eclipse.jetty.io.ByteArrayBuffer;
|
||||||
import org.eclipse.jetty.util.TypeUtil;
|
import org.eclipse.jetty.util.TypeUtil;
|
||||||
import org.eclipse.jetty.util.log.Log;
|
import org.eclipse.jetty.util.log.Log;
|
||||||
import org.eclipse.jetty.util.log.Logger;
|
import org.eclipse.jetty.util.log.Logger;
|
||||||
|
import org.eclipse.jetty.util.log.StdErrLog;
|
||||||
import org.junit.Assert;
|
import org.junit.Assert;
|
||||||
|
|
||||||
public class SafariD00
|
public class SafariD00
|
||||||
|
@ -45,6 +46,10 @@ public class SafariD00
|
||||||
|
|
||||||
public SafariD00(URI uri)
|
public SafariD00(URI uri)
|
||||||
{
|
{
|
||||||
|
if (LOG instanceof StdErrLog)
|
||||||
|
{
|
||||||
|
((StdErrLog)LOG).setLevel(StdErrLog.LEVEL_DEBUG);
|
||||||
|
}
|
||||||
this.uri = uri;
|
this.uri = uri;
|
||||||
this.endpoint = new InetSocketAddress(uri.getHost(),uri.getPort());
|
this.endpoint = new InetSocketAddress(uri.getHost(),uri.getPort());
|
||||||
}
|
}
|
||||||
|
@ -69,7 +74,7 @@ public class SafariD00
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Issue an Http websocket (Draft-0) upgrade request using the Safari particulars.
|
* Issue an Http websocket (Draft-0) upgrade request (using an example request captured from OSX/Safari)
|
||||||
*
|
*
|
||||||
* @throws UnsupportedEncodingException
|
* @throws UnsupportedEncodingException
|
||||||
*/
|
*/
|
||||||
|
@ -120,6 +125,7 @@ public class SafariD00
|
||||||
// Read expected handshake hixie bytes
|
// Read expected handshake hixie bytes
|
||||||
byte hixieHandshakeExpected[] = TypeUtil.fromHexString("c7438d956cf611a6af70603e6fa54809");
|
byte hixieHandshakeExpected[] = TypeUtil.fromHexString("c7438d956cf611a6af70603e6fa54809");
|
||||||
byte hixieHandshake[] = new byte[hixieHandshakeExpected.length];
|
byte hixieHandshake[] = new byte[hixieHandshakeExpected.length];
|
||||||
|
Assert.assertThat("Hixie handshake buffer size", hixieHandshake.length, is(16));
|
||||||
|
|
||||||
LOG.debug("Reading hixie handshake bytes");
|
LOG.debug("Reading hixie handshake bytes");
|
||||||
int readLen = in.read(hixieHandshake,0,hixieHandshake.length);
|
int readLen = in.read(hixieHandshake,0,hixieHandshake.length);
|
||||||
|
|
Loading…
Reference in New Issue