about summary refs log tree commit homepage
path: root/extras
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2013-11-16 04:00:33 +0000
committerEric Wong <e@80x24.org>2013-11-16 04:02:13 +0000
commit9500e08721a7fd697e3449738cc20ffcc15aca8f (patch)
treed785371e1354efbaac4f8229654eaaa4014d16fd /extras
parent521a703c390a1decbfd4b7ede049880a9afe146c (diff)
downloadyahns-9500e08721a7fd697e3449738cc20ffcc15aca8f.tar.gz
The body may contain extra repeated newlines, of course
Diffstat (limited to 'extras')
-rw-r--r--extras/exec_cgi.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/extras/exec_cgi.rb b/extras/exec_cgi.rb
index 39042af..6924698 100644
--- a/extras/exec_cgi.rb
+++ b/extras/exec_cgi.rb
@@ -84,7 +84,7 @@ class ExecCgi
         tmp = pipe.kgio_read(8192) or break
         head << tmp
       end
-      head, body = head.split(/\r?\n\r?\n/)
+      head, body = head.split(/\r?\n\r?\n/, 2)
       pipe.body_tip = body
 
       env["HTTP_VERSION"] ||= "HTTP/1.0" # stop Rack::Chunked for HTTP/0.9