autolab / Autolab-CLI

Command line autolab client that uses the Autolab API
3 stars 2 forks source link

Fix for assessment downloads over HTTP/2.0 #30

Closed damianhxy closed 10 months ago

damianhxy commented 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 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.