chiark / gitweb /
wip debug
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 1 Apr 2017 12:20:43 +0000 (13:20 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 1 Apr 2017 12:20:43 +0000 (13:20 +0100)
client
server
w3mstracetodump

diff --git a/client b/client
index 5d0f427d354714c37f1cd544ac54fd82f5d06ec0..c9682bd944e135b4a57f0bdb8c375f5bdf2188fa 100755 (executable)
--- a/client
+++ b/client
@@ -105,8 +105,8 @@ def check_outbound():
     lf   =   b'\n'
     mime = (b'--b'                                      + crlf +
             b'Content-Disposition: form-data; name="m"' + crlf + crlf +
     lf   =   b'\n'
     mime = (b'--b'                                      + crlf +
             b'Content-Disposition: form-data; name="m"' + crlf + crlf +
-            password                                    +   lf +
-            str(c.client)             .encode('ascii')  +   lf +
+            password                                    + crlf +
+            str(c.client)             .encode('ascii')  + crlf +
             str(c.target_outstanding) .encode('ascii')  + crlf +
           ((
             b'--b'                                      + crlf +
             str(c.target_outstanding) .encode('ascii')  + crlf +
           ((
             b'--b'                                      + crlf +
diff --git a/server b/server
index 1f652551574f9d498a768165b7f511ddfd948618..68f854148152d69ab01074407cc55276b982d4ab 100755 (executable)
--- a/server
+++ b/server
@@ -137,9 +137,9 @@ class Client():
 def process_request(request, desca):
   # find client, update config, etc.
   metadata = request.args['m']
 def process_request(request, desca):
   # find client, update config, etc.
   metadata = request.args['m']
-  metadata = metadata.split(b'\n')
-  (ci_s, pw, tro) = metadata.split(b'\n')[0:3]
-  desca['m'] = [ci_s, tro]
+  metadata = metadata.split(b'\r\n')
+  (ci_s, pw, tro) = metadata[0:3]
+  desca['m[0,2]'] = [ci_s, tro]
   ci = ipaddr(ci_s)
   desca['ci'] = ci
   cl = clients[ci]
   ci = ipaddr(ci_s)
   desca['ci'] = ci
   cl = clients[ci]
index bb9305edf061350160c17fc89c22ce7def802f1d..fdf28eb22cd9e643e038c8807e373b6934d28f73 100755 (executable)
@@ -1,5 +1,7 @@
 #!/usr/bin/perl -n
 
 #!/usr/bin/perl -n
 
+# strace -s70000 -ot w3m ./form.html
+
 next unless s{^write\(7, "}{};
 next unless m/^POST|GET/..0;
 s{", \d+\)\s+= \d+\n}{};
 next unless s{^write\(7, "}{};
 next unless m/^POST|GET/..0;
 s{", \d+\)\s+= \d+\n}{};