Add content-length header if present in sig headers

This commit is contained in:
Django Doucet 2023-04-02 20:38:10 -06:00
parent 2293c0b3d7
commit d6169f4bc3

View file

@ -263,6 +263,9 @@ class Signature {
if ( 'content-type' === $header ) {
$signed_data .= $header . ': ' . $headers['content_type'][0] . "\n";
}
if ( 'content-length' === $header ) {
$signed_data .= $header . ': ' . $headers['content_length'][0] . "\n";
}
if ( 'date' === $header ) {
// allow a bit of leeway for misconfigured clocks.
$d = new DateTime( $headers[ $header ][0] );