chiark / gitweb /
wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 20 Mar 2017 08:55:43 +0000 (08:55 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Mon, 20 Mar 2017 08:55:43 +0000 (08:55 +0000)
server

diff --git a/server b/server
index de28624..3abebe9 100755 (executable)
--- a/server
+++ b/server
@@ -159,8 +159,9 @@ def slip_decode(data):
       #print('ESC ', repr((pdata, packet, eix)))
       pdata += packet[0 : eix]
       ck = packet[eix+1]
-      if   ck == slip_esc_esc: pdata += slip_esc
-      elif ck == slip_esc_end: pdata += slip_end
+      #print('ESC... %o' % ck)
+      if   ck == slip_esc_esc[0]: pdata += slip_esc
+      elif ck == slip_esc_end[0]: pdata += slip_end
       else: raise ValueError('invalid SLIP escape')
       packet = packet[eix+2 : ]
     out.append(pdata)
@@ -294,6 +295,9 @@ class IphttpResource(twisted.web.resource.Resource):
     c.process_arriving_data(d)
     c.new_request(request)
 
+  def render_GET(self, request):
+    return '<html><body>hippotit</body></html>'
+
 def start_http():
   resource = IphttpResource()
   sitefactory = twisted.web.server.Site(resource)