pull/2153/merge
Andi Powers-Holmes 2024-06-30 23:45:32 +10:00 committed by GitHub
commit f1c471e1d8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 10 additions and 0 deletions

View File

@ -1245,6 +1245,16 @@ ssize_t parse_content_disposition(char* dest, size_t destlen,
*charsetp = nullptr;
*charsetlenp = 0;
/*
* Ignore trailing ';' in Content-Disposition header; this is not
* compliant with RFC 6266, but many servers send it anyway (e.g. CloudFront)
*/
if (len > 0 && *eop == ';') {
A2_LOG_INFO("Non-compliant Content-Disposition header (trailing ';') - "
"will ignore it");
eop--;
}
for (; p != eop; ++p) {
switch (state) {
case CD_BEFORE_DISPOSITION_TYPE: