hramenko / bauglir-websocket

Automatically exported from code.google.com/p/bauglir-websocket
0 stars 0 forks source link

Firefox 7.0.1 #21

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Opened Delphi Server demo with Delphi XE - ok
2. Compiled server demo e server started - ok
3. Loaded ws.html with Firefox 7.0.1 - ok
4. Open websocket - ok
5. Send text - ko

Server raise this Exception in WebSocket2.pas:

if (result = 0) and (fRequireMasking) and (not mask) then
   begin
     // TODO some protocol error
     raise Exception.Create('mask');
   end;

Original issue reported on code.google.com by r.federiconi on 27 Oct 2011 at 7:38

GoogleCodeExporter commented 9 years ago
Hello try update your MainFormU.pas

function TTestWebSocketServer.GetWebSocketConnectionClass(      Socket: 
TTCPCustomConnectionSocket;
      Header: TStringList;
      ResourceName, Host, Port, Origin, Cookie: string;
      out HttpResult: integer;
      var Protocol, Extensions: string
): TWebSocketServerConnections;
begin
  result := TTestWebSocketServerConnection;
  Protocol := '-';
  Extensions := '-';
end;

Does it help?

Original comment by Bronisla...@bauglir.com on 27 Oct 2011 at 9:13

GoogleCodeExporter commented 9 years ago
Yes.. now works!

Original comment by r.federiconi on 27 Oct 2011 at 10:17

GoogleCodeExporter commented 9 years ago
Hello,
The reason here is that FF since 7.0.1 is using implicitli extension 
deflate-stream (compression) and server must say that it does not support such 
extension (Extensions := '-';), than FF falls back to regular WS protocol.

Glad I could help

BK

Original comment by Bronisla...@bauglir.com on 27 Oct 2011 at 10:32