TooTallNate/Java-WebSocket — Issue #64: Flash Security Policy Not Matching or Being Sent
Author: Sixthly
Created: 2012-01-27 19:15:57+00:00
State: open

# Issue
The flash security policy handshake isn't matching. When the handshake does match, the data isn't written.

# Solution
## Part 1
Add:

>	request.rewind();

Above the following line:

>	return request.remaining() >= FLASH_POLICY_REQUEST.length ? HandshakeState.MATCHED : HandshakeState.MATCHING;

## Part 2
Add:

>	handleWrite();
>	close();

Below the following line:

>	channelWrite( ByteBuffer.wrap( Charsetfunctions.utf8Bytes( wsl.getFlashPolicy( this ) ) ) );