httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47485] HTML5 Websocket implementation
Date Wed, 11 May 2011 07:57:00 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=47485

karl155 <karl156@users.sourceforge.net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |karl156@users.sourceforge.n
                   |                            |et

--- Comment #13 from karl155 <karl156@users.sourceforge.net> 2011-05-11 07:57:00 UTC
---
Request for comments: My proposal for WebSockets support

Add a new Config directive "WebSocketsHandler <filenameExecutable>" with
context VirtualHost or server config (same as DocumentRoot directive)

If a connection comes in with "Connection: Upgrade" and "Upgrade: Websocket"
(case insensitive), wait until the request header is complete and then hand the
connection over to the executable.

Proposal A:
- If a request body was sent preliminary (before passing the FD to the
  executable) then close the connection because of a protocol error.
- (A1) All request headers are passed to the executable via env like in CGI
  or (A2) All request headers are passed to the executable via STDIN
- the id of the socket descriptor is passed as env "WEBSOCKET_FD"
- The socket descriptor is left open when forking (FD_CLOEXEC clear)

or Proposal B:
- All request headers are passed to the executable via env like in CGI
- Apache httpd needs to immediately pass all further received data to STDIN of
  the executable (because no new requests can be made in this connection),
  beginning with the request body
- All data wrote in STDOUT of the executable need to be passed through to the
  client (the executable has to send the response header)
- The Apache httpd connection timeouts need to be deactivated

Advantages:
- Maximum customizability in the client application.
- No need of further modifications to Apache httpd
- Easy to understand and implement
- Proposal B is compatible with any Websocket specification
  (confirmed with draft-hixie and draft-ietf-hybi)
- Proposal A needs at least rev. 04 of draft-ietf-hybi-thewebsocketprotocol
- Proposal A allows finetuning of the socket FD
- Proposal A reduces the system load of Apache httpd

Disadvantages:
- Like ordinary CGI scripts, a new executable has to be run for every request
- Proposal A will have problems with SSL/TLS

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message