Permalink
Browse files

rack's normalize_params can raise an exception which can result

in req.GET and req.POST being nil. This was not handled.
  • Loading branch information...
1 parent 495d5e5 commit bbe70a629643b4c73c37f40f4920b0e26724bc4c @lukejahnke lukejahnke committed with rkh Jul 31, 2011
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/sinatra/showexceptions.rb
@@ -252,7 +252,7 @@ def frame_class(frame)
<div id="get">
<h3 id="get-info">GET</h3>
- <% unless req.GET.empty? %>
+ <% if req.GET and not req.GET.empty? %>
<table class="req">
<tr>
<th>Variable</th>
@@ -273,7 +273,7 @@ def frame_class(frame)
<div id="post">
<h3 id="post-info">POST</h3>
- <% unless req.POST.empty? %>
+ <% if req.POST and not req.POST.empty? %>
<table class="req">
<tr>
<th>Variable</th>

0 comments on commit bbe70a6

Please sign in to comment.