Skip to content

Commit 81a4905

Browse files
committed
fixup! [a] Add support for POST to manifest endpoint (#5918)
1 parent 391cedb commit 81a4905

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lambdas/service/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1274,7 +1274,7 @@ def get_summary():
12741274

12751275

12761276
def manifest_route(*, fetch: bool, method: str):
1277-
initiate = method in ['PUT', 'POST']
1277+
initiate = method in {'PUT', 'POST'}
12781278
return app.route(
12791279
# The path parameter could be a token *or* an object key, but we don't
12801280
# want to complicate the API with this detail
@@ -1549,7 +1549,7 @@ def fetch_file_manifest_with_token(token: str):
15491549

15501550
def _file_manifest(fetch: bool, token_or_key: Optional[str] = None):
15511551
request = app.current_request
1552-
require(request.method != 'POST' or request.raw_body.decode() == '',
1552+
require(request.method != 'POST' or request.raw_body == b'',
15531553
'The body must be empty for a POST request to this endpoint.')
15541554
query_params = request.query_params or {}
15551555
_hoist_parameters(query_params, request)

0 commit comments

Comments
 (0)