Closed damianhxy closed 10 months ago
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
AWS Autolab
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.
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
AWS Autolab
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.