diff options
author | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-20 13:41:02 +0000 |
---|---|---|
committer | zzak <zzak@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-07-20 13:41:02 +0000 |
commit | b4489ae953601cceb30e5dbdac5fe213ecad1b75 (patch) | |
tree | 0e8bea2d6e4a0cdfc900c835653a83a2637ff740 /sample/dualstack-httpd.rb | |
parent | 368cecc1517ba2a09b0413eeaf5c3ba9981de4db (diff) |
* sample/*: whitespace patch by Sergio Campama [Fixes GH-364]
https://github.com/ruby/ruby/pull/364
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@42086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'sample/dualstack-httpd.rb')
-rw-r--r-- | sample/dualstack-httpd.rb | 32 |
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 |