Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include Content-Length response header #156

Conversation

paulmillar
Copy link
Contributor

Motivation:

The 'Content-Length' response header is expected by many clients. While it is not possible to specify the content length for on-the-fly compression, it is possible when sending an individual file.

Modification:

Update DataSelection to optionally return the content length.

Update the 'getData' Response to include the Content-Length header when the request targets a single file that is not placed in a zip archive. If the content is dynamically generated (e.g., a zip file) then no Content-Length header is provided.

Result:

IDS now includes the Content-Length response header when this is possible

Motivation:

The 'Content-Length' response header is expected by many clients.  While
it is not possible to specify the content length for on-the-fly
compression, it is possible when sending an individual file.

Modification:

Update DataSelection to optionally return the content length.

Update the 'getData' Response to include the `Content-Length` header
when the request targets a single file that is not placed in a zip
archive.  If the content is dynamically generated (e.g., a zip file)
then no `Content-Length` header is provided.

Result:

IDS now includes the `Content-Length` response header when this is
possible

Signed-off-by: Paul Millar <paul.millar@desy.de>
@RKrahl
Copy link
Member

RKrahl commented Feb 13, 2024

Supersedes #151. Closes #155.

@RKrahl RKrahl added the enhancement New feature or request label Feb 13, 2024
@RKrahl RKrahl added this to the 2.1.0 milestone Feb 13, 2024
@RKrahl RKrahl linked an issue Feb 13, 2024 that may be closed by this pull request
Copy link
Member

@RKrahl RKrahl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed in #155: looks good to me.

@RKrahl RKrahl merged commit a61508d into icatproject:master Feb 13, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include Content-Length response on getData with single file
2 participants