> Hi,
>
> Which version are you using?
When I sent the previous messages, I was using:
r571 | tyos...@chromium.org | 2011-10-18 10:03:09 -0400 (Tue, 18 Oct 2011)
I just upgraded to:
r576 | toyo...@chromium.org | 2011-10-20 04:03:43 -0400 (Thu, 20 Oct 2011)
> We've recently made a change which might break some use case.
> Now headerparserhandler doesn't fall back to HTTP. For now
> please wrap PythonHeaderParserHandler with Location or Directory
> directive to get only requests to specific path handled by pywebsocket,
> and serve normal HTTP by Apache.
I'll try that and report back.
> We're thinking if we revert it or not. Feel free to give us comments.
What's the advantage of the recent change? I'm guessing it's a
security concern? Since I had it working before, my uneducated
instinct is to say "revert" without really knowing why the change was
made in the first place. I suppose I need to read more. ;-)
| [error] mod_python (pid=32229, interpreter='Host IP octet',
| phase='PythonHeaderParserHandler',
| handler='mod_pywebsocket.headerparserhandler'):
| Application error
| [error] ServerName: 'Host IP octet'
| [error] DocumentRoot: '/var/www/html'
| [error] URI: '/~.../pywebsocket/progress.php'
| [error] Location: None
| [error] Directory: '/home/.../public_htmll/pywebsocket/'
| [error] Filename: '/home/.../public_html/pywebsocket/progress.php'
| [error] PathInfo: ''
| [error] Traceback (most recent call last):
| [error] File "/usr/lib64/python2.6/site-packages/mod_python/importer.py",
| line 1540, in HandlerDispatch
| default=default_handler, arg=req,
| silent=hlist.silent)
| [error] File "/usr/lib64/python2.6/site-packages/mod_python/importer.py",
| line 1205, in _process_target
| module = import_module(module_name, path=path)
| [error] File "/usr/lib64/python2.6/site-packages/mod_python/importer.py",
| line 307, in import_module
| return __import__(module_name, {}, {}, ['*'])
| [error] File
"/usr/lib/python2.6/site-packages/mod_pywebsocket/headerparserhandler.py",
| line 162, in <module>
| _dispatcher = _create_dispatcher()
| [error] File
"/usr/lib/python2.6/site-packages/mod_pywebsocket/headerparserhandler.py",
| line 143, in _create_dispatcher
| apache.APLOG_ERR)
| [error] Exception: ('PythonOption mod_pywebsocket.handler_root
| is not defined', 3)
Thanks.
Better, but not fixed yet. At least now it sometimes displays the page
although not the animation:
http://research.gallaudet.edu/~kjcole/pywebsocket/progress.php
If I refresh the page sometimes the browser says:
| Bad Request
|
| Your browser sent a request that this server could not understand.
| Apache/2.2.15 (Red Hat) Server at research.gallaudet.edu Port 80
But I'm guessing that it's now going to be solvable with a bit of
re-reading the documentation.
My rough documentation w/ source code (which still shows the old
Apache config, but will soon your changes) is at:
I'm sorry for your inconvenience.
I checked your site.
ws://research.gallaudet.edu/progress seems to return 404 status.
So, I guess your configuration is still wrong.
Anyway, I fixed this compatibility issue.
http://code.google.com/p/pywebsocket/source/detail?r=583
I think this revision could work fine with your original configuration.
I'll push version 0.7 of pywebsocket at early next week.
It will include this fix and be fully compliant to latest hybi-17.
Thanks
I added some debugging code, and changed WebSocket to MozWebSocket.
The current problem appears to be that
> PythonOption mod_pywebsocket.handler_root /usr/local/lib64/websock_handlers
is being ignored. I have verified that it is in the global section.
Instead, it looks in the webserver document root
The Javascript lines:
> document.getElementById("debug").innerHTML = "Connecting...";
> socket = new MozWebSocket("ws://research.gallaudet.edu/progress");
> document.getElementById("debug").innerHTML = "Connected...";
show the text change from "Connecting..." to "Connected..." in the web
page, but Apache puts an entry in /var/log/httpd/error_log
> [error] File does not exist: /var/www/html/progress
I posted pywebsocket-0.7 yesterday.
It includes the improvements Takeshi said, and also includes sample
configuration file for apache.
http://code.google.com/p/pywebsocket/source/browse/tags/pywebsocket-0.7/src/example/pywebsocket.conf
Anyway...
>> document.getElementById("debug").innerHTML = "Connecting...";
>> socket = new MozWebSocket("ws://research.gallaudet.edu/progress");
>> document.getElementById("debug").innerHTML = "Connected...";
You should catch onopen event by handler. At the point you show 'Connected...',
WebSocket might be going to perform opening handshake, but not connected.
console.html in our example could be good sample how to use WebSocket.
http://code.google.com/p/pywebsocket/source/browse/tags/pywebsocket-0.7/src/example/console.html
Thanks,
So, now mod_pywebsocket.handler_root has to refer to a directory
under Apache's DocumentRoot? Or am I misunderstanding what went wrong
and why it's fixed now for me?