Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

use proper links to images on error pages

  • Loading branch information...
commit 238eedeb52dbbf688d561751d9dd5ad79c59c6ff 1 parent 644c26e
Konstantin Haase rkh authored
3  CHANGES
View
@@ -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
2  lib/sinatra/base.rb
View
@@ -1450,7 +1450,7 @@ class << self
</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>
2  lib/sinatra/showexceptions.rb
View
@@ -174,7 +174,7 @@ def frame_class(frame)
<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>
Please sign in to comment.
Something went wrong with that request. Please try again.