Stream.end() should write() if given an empty stream.
Check for GET in isWebSocket() and expose the isSecureRequest() method.