use proper links to images on error pages

This commit is contained in:
Konstantin Haase 2011-04-08 17:52:25 +01:00
parent 644c26e287
commit 238eedeb52
3 changed files with 5 additions and 2 deletions

View File

@ -43,6 +43,9 @@
* If a route with an empty pattern is defined (`get("") { ... }`) requests with
an empty path info match this route instead of "/". (Konstantin Haase)
* In development environment, when running under a nested path, the image URIs
on the error pages are set properly. (Konstantin Haase)
= 1.2.1 / 2011-03-17
* Use a generated session secret when using `enable :sessions`. (Konstantin

View File

@ -1450,7 +1450,7 @@ module Sinatra
</head>
<body>
<h2>Sinatra doesn't know this ditty.</h2>
<img src='/__sinatra__/404.png'>
<img src='#{uri "/__sinatra__/404.png"}'>
<div id="c">
Try this:
<pre>#{request.request_method.downcase} '#{request.path_info}' do\n "Hello World"\nend</pre>

View File

@ -174,7 +174,7 @@ TEMPLATE = <<-HTML # :nodoc:
<body>
<div id="wrap">
<div id="header">
<img src="/__sinatra__/500.png" alt="application error" height="161" width="313" />
<img src="<%= env['SCRIPT_NAME'] %>/__sinatra__/500.png" alt="application error" height="161" width="313" />
<div id="summary">
<h1><strong><%=h exception.class %></strong> at <strong><%=h path %>
</strong></h1>