diff --git a/lib/rpc.py b/lib/rpc.py index 3fd8e72df23d777dcb9d52526383f61307067c8d..437df9817a4c0fc72d453fee0aa1d80c80ec2ba2 100644 --- a/lib/rpc.py +++ b/lib/rpc.py @@ -362,7 +362,7 @@ class _RpcProcessor: else: requests[name] = \ http.client.HttpClientRequest(str(ip), port, - http.HTTP_PUT, str("/%s" % procedure), + http.HTTP_POST, str("/%s" % procedure), headers=_RPC_CLIENT_HEADERS, post_data=body[name], read_timeout=read_timeout, diff --git a/lib/server/noded.py b/lib/server/noded.py index 22091d7c129d71a0eae8ab041b5f2c0a0bf54d35..3495526a41095a6e71b21063e1154d94821d6c9f 100644 --- a/lib/server/noded.py +++ b/lib/server/noded.py @@ -138,8 +138,9 @@ class NodeHttpServer(http.server.HttpServer): """Handle a request. """ - if req.request_method.upper() != http.HTTP_PUT: - raise http.HttpBadRequest() + # FIXME: Remove HTTP_PUT in Ganeti 2.7 + if req.request_method.upper() not in (http.HTTP_PUT, http.HTTP_POST): + raise http.HttpBadRequest("Only PUT and POST methods are supported") path = req.request_path if path.startswith("/"):