Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Pass Rack::Lint inspection

  • Loading branch information...
commit 4c23a1bd6818199c4aece94a21fb883ccfe58520 1 parent 67bf82f
@jvatic jvatic authored
Showing with 2 additions and 1 deletion.
  1. +1 −1  lib/tentd/api.rb
  2. +1 −0  lib/tentd/api/router/etag_check.rb
View
2  lib/tentd/api.rb
@@ -33,7 +33,7 @@ class API
class HelloWorld < Middleware
def action(env)
- [200, { 'Link' => %(<%s>; rel="%s") % [File.join(env['SCRIPT_NAME'], 'profile'), PROFILE_REL] }, ['Tent!']]
+ [200, { 'Link' => %(<%s>; rel="%s") % [File.join(env['SCRIPT_NAME'], 'profile'), PROFILE_REL], 'Content-Type' => 'text/plain' }, ['Tent!']]
end
end
View
1  lib/tentd/api/router/etag_check.rb
@@ -9,6 +9,7 @@ def initialize(app)
def call(env)
status, headers, body = @app.call(env)
if !headers['ETag'].nil? && headers['ETag'] == env['HTTP_IF_NONE_MATCH'] && %w(GET HEAD).include?(env['REQUEST_METHOD'])
+ headers.delete('Content-Type')
[304, headers, []]
else
[status, headers, body]
Please sign in to comment.
Something went wrong with that request. Please try again.