about summary refs log tree commit homepage
path: root/lib/yahns/req_res.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/yahns/req_res.rb')
-rw-r--r--lib/yahns/req_res.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/yahns/req_res.rb b/lib/yahns/req_res.rb
index 9bb8f35..041b908 100644
--- a/lib/yahns/req_res.rb
+++ b/lib/yahns/req_res.rb
@@ -42,7 +42,8 @@ class Yahns::ReqRes < Kgio::Socket # :nodoc:
           # continue looping in middle "case @resbuf" loop
         when :wait_readable
           return rv # spurious wakeup
-        when nil then return c.proxy_err_response(502, self, nil)
+        when nil
+          return c.proxy_err_response(502, self, 'upstream EOF (headers)')
         end # NOT looping here
 
       when String # continue reading trickled response headers from upstream
@@ -50,7 +51,8 @@ class Yahns::ReqRes < Kgio::Socket # :nodoc:
         case rv = kgio_tryread(0x2000, buf)
         when String then res = req.headers(@hdr, resbuf << rv) and break
         when :wait_readable then return rv
-        when nil then return c.proxy_err_response(502, self, nil)
+        when nil
+          return c.proxy_err_response(502, self, 'upstream EOF (big headers)')
         end while true
         @resbuf = false