image8 0.3 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/image8.gemspec +1 -1
- data/lib/image8.rb +7 -0
- metadata +2 -1
data/image8.gemspec
CHANGED
data/lib/image8.rb
CHANGED
@@ -10,6 +10,13 @@ class Image8 < Sinatra::Base
|
|
10
10
|
register Sinatra::Async
|
11
11
|
|
12
12
|
aget %r|/([0-9x]+)/(.*)| do |format, uri|
|
13
|
+
if uri.strip.empty?
|
14
|
+
status 404
|
15
|
+
body "No such image."
|
16
|
+
end
|
17
|
+
|
18
|
+
puts "uri: #{uri.inspect} - #{uri.class}"
|
19
|
+
|
13
20
|
# This is retarded.
|
14
21
|
if !request.query_string.empty?
|
15
22
|
uri += "?#{request.query_string}"
|