[pve-devel] [PATCH http-server 1/1] fix #4344: http-server: ignore unused multipart headers

Matthias Heiserer m.heiserer at proxmox.com
Wed Nov 16 11:05:34 CET 2022


(Citing the accidental off-list response)
>>
>> We should drop the xx and escaping of spaces, it's not needed for the
>> single line.
>>
> 
>  I think this would still be needed to support weird filenames? idk, I'm
> not familiar with all of perl's regex flags.

AFAIUI the /x and /xx is in case you want to use whitespace/newlines as 
separators in the regex, rather than actually matching it:
https://perldoc.perl.org/perlre#/x-and-/xx

Instead of e.g. `Disposition:\ (.*?);\ name=`
we can then use `Disposition: (.*?); name=`

>>  I'm thinking of whether it would be better to include this line in the
>> 
>> other one, or not. Probably more clearer the way it is now.
> 
> 
> I think, while this is more lines, it is a better signpost that this is the
> end of the multipart stuff. And if any future
> data needs to be taken from the headers, it will not need to change.

Agree, let's keep it that way.





More information about the pve-devel mailing list