Skip to content

Commit

Permalink
use proper links to images on error pages
Browse files Browse the repository at this point in the history
  • Loading branch information
rkh committed Apr 8, 2011
1 parent f2b494b commit fe9a77d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions CHANGES
Expand Up @@ -23,6 +23,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
Expand Down
2 changes: 1 addition & 1 deletion lib/sinatra/base.rb
Expand Up @@ -1439,7 +1439,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>
Expand Down
2 changes: 1 addition & 1 deletion lib/sinatra/showexceptions.rb
Expand Up @@ -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>
Expand Down

0 comments on commit fe9a77d

Please sign in to comment.