Skip to content

bulk: report 413 Entity Too Large is limits on bulk requests are exce…#8094

Open
DmitryLitvintsev wants to merge 1 commit into10.2from
fix/10.2/7997
Open

bulk: report 413 Entity Too Large is limits on bulk requests are exce…#8094
DmitryLitvintsev wants to merge 1 commit into10.2from
fix/10.2/7997

Conversation

@DmitryLitvintsev
Copy link
Copy Markdown
Member

…eded

Motivation:

Issue #7997 reports that when the number of targets in a bulk request exceeds the configured limit, dCache replies with HTTP 403 – Forbidden which is confusing.

Suggested response: 413 Content Too Large

Modification:

Instead of BulkPermissionDeniedException throw newly added BulkContentTooLargeException when limits are exceeded and throwing ClientErrorException(REQUEST_ENTITY_TOO_LARGE, error) in the sunbsequent handling resulting in 413 code returned to the client.

Result:

dCache replies w/ 413 Entity Too Large code when various bulk request limits are exceeded.

python dcache_tape_api.py -d uqbar -s /pnfs/fs/usr/fermilab/users/litvinse/1.data /pnfs/fs/usr/fermilab/users/litvinse/10.data 413 Client Error: Request Entity Too Large for url: https://uqbar:3880/api/v1/tape/stage

Ticket: #7997
Acked-by: Anastasiia Chub
Patch: https://rb.dcache.org/r/14683/
Target: trunk
Request: 11.2, 11.1, 11.0, 10.2
Require-book: no
Require-notes: yes

…eded

Motivation:
-----------
Issue #7997 reports
that when the number of targets in a bulk request exceeds the configured
limit, dCache replies with HTTP 403 – Forbidden which is confusing.

Suggested response: 413 Content Too Large

Modification:
-------------
Instead of BulkPermissionDeniedException throw newly added
BulkContentTooLargeException when limits are exceeded and throwing
ClientErrorException(REQUEST_ENTITY_TOO_LARGE, error)
in the sunbsequent handling resulting in 413 code returned
to the client.

Result:
--------
dCache replies w/ 413 Entity Too Large code when various bulk
request limits are exceeded.

python dcache_tape_api.py -d uqbar -s  /pnfs/fs/usr/fermilab/users/litvinse/1.data  /pnfs/fs/usr/fermilab/users/litvinse/10.data
413 Client Error: Request Entity Too Large for url: https://uqbar:3880/api/v1/tape/stage

Ticket: #7997
Acked-by: Anastasiia Chub
Patch: https://rb.dcache.org/r/14683/
Target: trunk
Request: 11.2, 11.1, 11.0, 10.2
Require-book: no
Require-notes: yes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant