lib/gyoza-languages/gyoza_app.rb in gyoza-languages-1.0.3 vs lib/gyoza-languages/gyoza_app.rb in gyoza-languages-1.0.4
- old
+ new
@@ -68,10 +68,12 @@
put(path, query, env)
when 'PATCH'
patch(path, query, env)
when 'DELETE'
delete(path, query, env)
+ when 'HEAD'
+ head(path, query, env)
else
response 405
end
end
@@ -125,9 +127,20 @@
# Arguments:
# path: the path of the repository
# query: a hash containing all the query parameters
# env: the environment variables at the time of receiving the request
protected def delete(path, query, env)
+ response 405
+ end
+
+ # The response to a HEAD request.
+ # By default, returns the 405 HTTP status code.
+ #
+ # Arguments:
+ # path: the path of the repository
+ # query: a hash containing all the query parameters
+ # env: the environment variables at the time of receiving the request
+ protected def head(path, query, env)
response 405
end
# Formats a new HTTP response from the given HTTP status code.
#