diff options
Diffstat (limited to 'pyload/lib/mod_pywebsocket/headerparserhandler.py')
-rw-r--r-- | pyload/lib/mod_pywebsocket/headerparserhandler.py | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/pyload/lib/mod_pywebsocket/headerparserhandler.py b/pyload/lib/mod_pywebsocket/headerparserhandler.py index 2cc62de04..c244421cf 100644 --- a/pyload/lib/mod_pywebsocket/headerparserhandler.py +++ b/pyload/lib/mod_pywebsocket/headerparserhandler.py @@ -167,7 +167,9 @@ def _create_dispatcher(): handler_root, handler_scan, allow_handlers_outside_root) for warning in dispatcher.source_warnings(): - apache.log_error('mod_pywebsocket: %s' % warning, apache.APLOG_WARNING) + apache.log_error( + 'mod_pywebsocket: Warning in source loading: %s' % warning, + apache.APLOG_WARNING) return dispatcher @@ -191,12 +193,16 @@ def headerparserhandler(request): # Fallback to default http handler for request paths for which # we don't have request handlers. if not _dispatcher.get_handler_suite(request.uri): - request.log_error('No handler for resource: %r' % request.uri, - apache.APLOG_INFO) - request.log_error('Fallback to Apache', apache.APLOG_INFO) + request.log_error( + 'mod_pywebsocket: No handler for resource: %r' % request.uri, + apache.APLOG_INFO) + request.log_error( + 'mod_pywebsocket: Fallback to Apache', apache.APLOG_INFO) return apache.DECLINED except dispatch.DispatchException, e: - request.log_error('mod_pywebsocket: %s' % e, apache.APLOG_INFO) + request.log_error( + 'mod_pywebsocket: Dispatch failed for error: %s' % e, + apache.APLOG_INFO) if not handshake_is_done: return e.status @@ -210,26 +216,30 @@ def headerparserhandler(request): handshake.do_handshake( request, _dispatcher, allowDraft75=allow_draft75) except handshake.VersionException, e: - request.log_error('mod_pywebsocket: %s' % e, apache.APLOG_INFO) + request.log_error( + 'mod_pywebsocket: Handshake failed for version error: %s' % e, + apache.APLOG_INFO) request.err_headers_out.add(common.SEC_WEBSOCKET_VERSION_HEADER, e.supported_versions) return apache.HTTP_BAD_REQUEST except handshake.HandshakeException, e: # Handshake for ws/wss failed. # Send http response with error status. - request.log_error('mod_pywebsocket: %s' % e, apache.APLOG_INFO) + request.log_error( + 'mod_pywebsocket: Handshake failed for error: %s' % e, + apache.APLOG_INFO) return e.status handshake_is_done = True request._dispatcher = _dispatcher _dispatcher.transfer_data(request) except handshake.AbortedByUserException, e: - request.log_error('mod_pywebsocket: %s' % e, apache.APLOG_INFO) + request.log_error('mod_pywebsocket: Aborted: %s' % e, apache.APLOG_INFO) except Exception, e: # DispatchException can also be thrown if something is wrong in # pywebsocket code. It's caught here, then. - request.log_error('mod_pywebsocket: %s\n%s' % + request.log_error('mod_pywebsocket: Exception occurred: %s\n%s' % (e, util.get_stack_trace()), apache.APLOG_ERR) # Unknown exceptions before handshake mean Apache must handle its |