[X2Go-Commits] x2gobroker.git - build-main (branch) updated: 0.0.0.1-31-g23c2c59
X2Go dev team
git-admin at x2go.org
Sun May 19 13:04:45 CEST 2013
The branch, build-main has been updated
via 23c2c59626fbd1c0d5b5cccc3db6387996e35a9c (commit)
from afc89fc0421a3061f9caa388e3f0de17a0b41575 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
-----------------------------------------------------------------------
Summary of changes:
x2gobroker/web/plain.py | 15 ++++++++++-----
1 file changed, 10 insertions(+), 5 deletions(-)
The diff of changes is:
diff --git a/x2gobroker/web/plain.py b/x2gobroker/web/plain.py
index e25b5c0..22b14ba 100644
--- a/x2gobroker/web/plain.py
+++ b/x2gobroker/web/plain.py
@@ -25,8 +25,9 @@ import web
import types
# Python X2Go Broker modules
-from x2gobroker.defaults import X2GOBROKER_DEFAULT_BACKEND as _X2GOBROKER_DEFAULT_BACKEND
-from x2gobroker.defaults import X2GOBROKER_DEBUG as _X2GOBROKER_DEBUG
+import x2gobroker.defaults
+
+from x2gobroker.loggers import logger_broker, logger_error
class X2GoBrokerWebPlain:
@@ -41,14 +42,15 @@ class X2GoBrokerWebPlain:
web.header(http_header_item, self.http_header_items[http_header_item])
def GET(self, backend):
- if _X2GOBROKER_DEBUG:
+ if x2gobroker.defaults.X2GOBROKER_DEBUG:
+ logger_broker.warn('GET http request detected, if unwanted: disable X2GOBROKER_DEBUG')
return self.POST(backend)
return web.notfound()
def POST(self, backend):
if not backend:
- backend = _X2GOBROKER_DEFAULT_BACKEND
+ backend = x2gobroker.defaults.X2GOBROKER_DEFAULT_BACKEND
else:
backend = backend.rstrip('/')
@@ -63,9 +65,11 @@ class X2GoBrokerWebPlain:
# set the client address for the broker backend
ip = web.ctx.env.get('HTTP_X_FORWARDED_FOR', web.ctx.get('ip', ''))
if ip:
+ logger_broker.info('client address is {address}'.format(address=ip))
broker_backend.set_client_address(ip)
- elif not _X2GOBROKER_DEBUG:
+ elif not x2gobroker.defaults.X2GOBROKER_DEBUG:
# if the client IP is not set, we pretend to have nothing on offer
+ logger_error.error('client could not provide an IP address, pretending: 404 Not Found')
return web.notfound()
# if the broker backend is disabled in the configuration, pretend to have nothing on offer
@@ -89,6 +93,7 @@ class X2GoBrokerWebPlain:
output = ''
self._gen_http_header()
+ logger_broker.debug ('username: {username}, password: {password}, task: {task}, profile_id: {profile_id}'.format(username=username, password='XXXXX', task=task, profile_id=profile_id))
if broker_backend.check_access(username=username, password=password, authid=authid):
###
hooks/post-receive
--
x2gobroker.git (HTTP(S) Session broker for X2Go)
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "x2gobroker.git" (HTTP(S) Session broker for X2Go).
More information about the x2go-commits
mailing list