Tests: Support HEAD requests in oci-registry-server

This just does a GET, which is not quite right, but will work.
This is needed for the authenticator.

(cherry picked from commit 530475b9ab)
This commit is contained in:
Alexander Larsson
2020-05-04 15:51:59 +02:00
committed by Alexander Larsson
parent c0d5ee100d
commit 0063d61366

View File

@@ -135,6 +135,9 @@ class RequestHandler(http_server.BaseHTTPRequestHandler):
else:
self.wfile.write(response_string.encode('utf-8'))
def do_HEAD(self):
return self.do_GET()
def do_POST(self):
if self.check_route('/testing/@repo_name/@tag'):
repo_name = self.matches['repo_name']