about summary refs log tree commit diff stats
path: root/http-server.mu
diff options
context:
space:
mode:
Diffstat (limited to 'http-server.mu')
-rw-r--r--http-server.mu9
1 files changed, 1 insertions, 8 deletions
diff --git a/http-server.mu b/http-server.mu
index 8f34725d..6978b032 100644
--- a/http-server.mu
+++ b/http-server.mu
@@ -15,14 +15,7 @@ def main [
   session:num <- $accept socket
   contents:&:source:char, sink:&:sink:char <- new-channel 30
   sink <- start-running receive-from-socket session, sink
-  buf:&:buffer <- new-buffer 30
-  {
-    c:char, done?:bool, contents <- read contents
-    break-if done?
-    buf <- append buf, c
-    loop
-  }
-  socket-text:text <- buffer-to-array buf
+  query:text <- drain contents
   $print [Done reading from socket.], 10/newline
   write-to-socket session, [HTTP/1.0 200 OK
 Content-type: text/plain