From 0d561cb2531d293ff8f4cee2f73a242e56547139 Mon Sep 17 00:00:00 2001
From: Samo Penic <samo.penic@gmail.com>
Date: Fri, 20 Jan 2017 21:03:21 +0000
Subject: [PATCH] Now commiting correctly. Really. I promise

---
 trisurf/WebTrisurf.py |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/trisurf/WebTrisurf.py b/trisurf/WebTrisurf.py
index 4b36ec9..287210d 100644
--- a/trisurf/WebTrisurf.py
+++ b/trisurf/WebTrisurf.py
@@ -11,7 +11,7 @@
 class TsWEB(http.server.BaseHTTPRequestHandler):
 	def do_GET(self):
 		parsed_path=urlparse(self.path)
-		"""	message_parts = [
+		message_parts = [
                 'CLIENT VALUES:',
                 'client_address=%s (%s)' % (self.client_address, self.address_string()),
                 'command=%s' % self.command,
@@ -30,14 +30,18 @@
 		for name, value in sorted(self.headers.items()):
 			message_parts.append('%s=%s' % (name, value.rstrip()))
 		message_parts.append('')
-		message = '<br>'.join(message_parts) """
+		message = '<br>'.join(message_parts)
 		self.send_response(200)
 		self.end_headers()
 		self.wfile.write(b"<h1>Trisurf-ng manager web interface</h1><hr>")
 		oldstdout=sys.stdout
-		process=subprocess.Popen (['/usr/bin/python3', sys.argv[0], '-s', '--html'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+		if(parsed_path.path=='/analysis'):
+			process=subprocess.Popen (['/usr/bin/python3', sys.argv[0], '--analysis', parsed_path.query, '--html'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
+		else:
+			process=subprocess.Popen (['/usr/bin/python3', sys.argv[0], '-s', '--html'], stdout=subprocess.PIPE, stderr=subprocess.PIPE)
 		stdout, stderr= process.communicate()
 		output=stdout.decode('ascii')
+		output=output+message
 		output=output.replace('\n','<BR>')
 		output=bytearray(output,'ascii')
 		self.wfile.write(output)

--
Gitblit v1.9.3