aboutsummaryrefslogtreecommitdiffstats
path: root/sample/dualstack-httpd.rb
diff options
context:
space:
mode:
Diffstat (limited to 'sample/dualstack-httpd.rb')
-rw-r--r--sample/dualstack-httpd.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/sample/dualstack-httpd.rb b/sample/dualstack-httpd.rb
index 11c5201d74..a6d4d3a2c2 100644
--- a/sample/dualstack-httpd.rb
+++ b/sample/dualstack-httpd.rb
@@ -29,22 +29,22 @@ end
while true
as = ls.accept
Thread.start do
- STDERR.print "socket #{myname} accepted, thread ", Thread.current, "\n"
- s = as # copy to dynamic variable
- str = ''
- while line = s.gets
- break if line == "\r\n" or line == "\n"
- str << line
- end
- STDERR.print "socket #{myname} got string\n"
- s.write("HTTP/1.0 200 OK\n")
- s.write("Content-type: text/plain\n\n")
- s.write("this is test: my name is #{myname}, you sent:\n")
- s.write("---start\n")
- s.write(str)
- s.write("---end\n")
- s.close
- STDERR.print "socket #{myname} processed, thread ", Thread.current, " terminating\n"
+ STDERR.print "socket #{myname} accepted, thread ", Thread.current, "\n"
+ s = as # copy to dynamic variable
+ str = ''
+ while line = s.gets
+ break if line == "\r\n" or line == "\n"
+ str << line
+ end
+ STDERR.print "socket #{myname} got string\n"
+ s.write("HTTP/1.0 200 OK\n")
+ s.write("Content-type: text/plain\n\n")
+ s.write("this is test: my name is #{myname}, you sent:\n")
+ s.write("---start\n")
+ s.write(str)
+ s.write("---end\n")
+ s.close
+ STDERR.print "socket #{myname} processed, thread ", Thread.current, " terminating\n"
end
end
end