From 805d58c6aeeeba3e4989c0eed6781b3861e8fae0 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Thu, 25 Jan 2018 22:39:31 -0800 Subject: 4199 --- html/http-server.mu.html | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'html/http-server.mu.html') diff --git a/html/http-server.mu.html b/html/http-server.mu.html index a6ebcea3..030fcbbc 100644 --- a/html/http-server.mu.html +++ b/html/http-server.mu.html @@ -15,13 +15,13 @@ body { font-size: 12pt; font-family: monospace; color: #aaaaaa; background-color a { color:#eeeeee; text-decoration: none; } a:hover { text-decoration: underline; } * { font-size: 12pt; font-size: 1em; } +.muControl { color: #c0a020; } +.muRecipe { color: #ff8700; } .LineNr { color: #444444; } -.Comment { color: #9090ff; } -.Comment a { color:#0000ee; text-decoration:underline; } .Constant { color: #00a0a0; } .Special { color: #c00000; } -.muControl { color: #c0a020; } -.muRecipe { color: #ff8700; } +.Comment { color: #9090ff; } +.Comment a { color:#0000ee; text-decoration:underline; } --> @@ -65,21 +65,21 @@ if ('onhashchange' in window) { 7 # After running it, navigate to localhost:8080. Your browser should display 8 # "SUCCESS!" and the server will terminate after one connection. 9 -10 def main [ +10 def main [ 11 local-scope 12 socket:num <- $open-server-socket 8080/port 13 $print [Mu socket creation returned ], socket, 10/newline 14 return-unless socket 15 session:num <- $accept socket -16 contents:&:source:char, sink:&:sink:char <- new-channel 30 -17 sink <- start-running receive-from-socket session, sink -18 query:text <- drain contents +16 contents:&:source:char, sink:&:sink:char <- new-channel 30 +17 sink <- start-running receive-from-socket session, sink +18 query:text <- drain contents 19 $print [Done reading from socket.], 10/newline -20 write-to-socket session, [HTTP/1.0 200 OK +20 write-to-socket session, [HTTP/1.0 200 OK 21 Content-type: text/plain 22 -23 SUCCESS! -24 ] +23 SUCCESS! +24 ] 25 $print 10/newline, [Wrote to and closing socket...], 10/newline 26 session <- $close-socket session 27 socket <- $close-socket socket -- cgit 1.4.1-2-gfad0