2020-08-27 10:07:46 +03:00
|
|
|
from flask import request, make_response
|
2022-02-14 11:13:33 +03:00
|
|
|
from app import app
|
2020-08-27 10:07:46 +03:00
|
|
|
|
|
|
|
|
2022-02-05 08:56:33 +03:00
|
|
|
@app.route("/patch/file.txt", methods=["PATCH"])
|
2020-08-27 10:07:46 +03:00
|
|
|
def patch():
|
2022-02-05 08:56:33 +03:00
|
|
|
assert request.headers["Host"] == "www.example.com"
|
|
|
|
assert request.headers["Content-Type"] == "application/example"
|
|
|
|
assert request.headers["If-Match"] == '"e0023aa4e"'
|
2020-08-27 10:07:46 +03:00
|
|
|
resp = make_response()
|
2022-02-05 08:56:33 +03:00
|
|
|
resp.headers["Content-Location"] = "/file.txt"
|
|
|
|
resp.headers["ETag"] = '"e0023aa4f"'
|
2020-08-27 10:07:46 +03:00
|
|
|
return resp, 204
|