summary refs log tree commit
diff options
context:
space:
mode:
authorLuke Jahnke <luke.jahnke@gmail.com>2011-08-01 23:12:00 +1000
committerKonstantin Haase <konstantin.mailinglists@googlemail.com>2011-09-07 10:24:16 -0700
commit9a69fa6c7a07213e7a88e0383e6940d2dda5fea4 (patch)
treed9d2aecd38d735f33fa1c6e7215af7a05dbee490
parent097f596c847e02b3aca6e8a9e360c020c2280e41 (diff)
downloadrack-9a69fa6c7a07213e7a88e0383e6940d2dda5fea4.tar.gz
Fixed an unhandled condition where req.GET or req.POST could be nil if a URI
such as a=1&a[]=1 was parsed.
-rw-r--r--lib/rack/showexceptions.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/rack/showexceptions.rb b/lib/rack/showexceptions.rb
index 00ddf45e..c91ca07c 100644
--- a/lib/rack/showexceptions.rb
+++ b/lib/rack/showexceptions.rb
@@ -277,7 +277,7 @@ TEMPLATE = <<'HTML'
   <h2>Request information</h2>
 
   <h3 id="get-info">GET</h3>
-  <% unless req.GET.empty? %>
+  <% if req.GET and not req.GET.empty? %>
     <table class="req">
       <thead>
         <tr>
@@ -299,7 +299,7 @@ TEMPLATE = <<'HTML'
   <% end %>
 
   <h3 id="post-info">POST</h3>
-  <% unless req.POST.empty? %>
+  <% if req.POST and not req.POST.empty? %>
     <table class="req">
       <thead>
         <tr>