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

Fix for assessment downloads over HTTP/2.0 #30

Merged
merged 1 commit into from
Nov 3, 2023
Merged

Conversation

damianhxy
Copy link
Member

@damianhxy damianhxy commented Nov 3, 2023

Currently, assessment downloads do not work on AWS Autolab.

This is because the code checks for "Content-Disposition:" to determine if the file is downloadable.

While the header is usually spelt like that with HTTP/1.1, in HTTP/2.0 header names are converted to lowercase prior to encoding (https://stackoverflow.com/questions/5258977/are-http-headers-case-sensitive)

Local Autolab
Screenshot 2023-11-03 at 02 20 44

AWS Autolab
Screenshot 2023-11-03 at 02 21 01

This PR fixes this by also checking the lowercase version of content-disposition. A more complete solution might be to transform the entire header to lowercase before checking, but that seems unnecessary.

@damianhxy damianhxy changed the title Fix assessment download Fix for assessment downloads over HTTP/2.0 Nov 3, 2023
Copy link
Contributor

@20wildmanj 20wildmanj left a comment

Choose a reason for hiding this comment

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

Verified through local cli install + nightly (which also suffers from same issue) that downloads now work. LGTM

@damianhxy damianhxy merged commit 5257fc1 into master Nov 3, 2023
@damianhxy damianhxy deleted the header-fix branch November 3, 2023 17:56
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.

None yet

2 participants