diff options
| author | Ian Ward <ian@excess.org> | 2011-10-20 11:46:46 -0400 |
|---|---|---|
| committer | Ian Ward <ian@excess.org> | 2011-10-20 11:46:46 -0400 |
| commit | 410aae544b9324b62ba5dd56ec7ad16df18f396e (patch) | |
| tree | 883202578a181a75b73b4461d6b072a298f126f1 /urwid/web_display.py | |
| parent | 3c9c29604d6aa0bfc9a0d47ab46cecb4ea606d32 (diff) | |
| download | urwid-410aae544b9324b62ba5dd56ec7ad16df18f396e.tar.gz | |
minor changes to string encoding fix
Diffstat (limited to 'urwid/web_display.py')
| -rwxr-xr-x | urwid/web_display.py | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/urwid/web_display.py b/urwid/web_display.py index 6ee0bd6..96fddb9 100755 --- a/urwid/web_display.py +++ b/urwid/web_display.py @@ -1004,9 +1004,7 @@ def handle_short_request(): except socket.error: sys.stdout.write("Status: 404 Not Found\r\n\r\n") return True - - - + # this is a keyboard input request try: fd = os.open((os.path.join(_prefs.pipe_dir, @@ -1014,12 +1012,13 @@ def handle_short_request(): except OSError: sys.stdout.write("Status: 404 Not Found\r\n\r\n") return True - + + # FIXME: use the correct encoding based on the request keydata = sys.stdin.read(MAX_READ) os.write(fd,keydata.encode('ascii')) os.close(fd) sys.stdout.write("Content-type: text/plain\r\n\r\n") - + return True |
