@@ -908,7 +908,10 @@ impl<'content> AssetRouter<'content> {
908
908
http:: header:: CONTENT_RANGE . to_string ( ) ,
909
909
format ! ( "bytes {range_begin}-{range_end}/{total_length}" ) ,
910
910
) ) ;
911
- request_headers. push ( http:: header:: RANGE . to_string ( ) ) ;
911
+ request_headers. push ( (
912
+ http:: header:: RANGE . to_string ( ) ,
913
+ format ! ( "bytes={range_begin}-" ) ,
914
+ ) ) ;
912
915
} ;
913
916
914
917
Self :: prepare_response_and_certification (
@@ -925,7 +928,7 @@ impl<'content> AssetRouter<'content> {
925
928
status_code : StatusCode ,
926
929
body : Cow < ' content , [ u8 ] > ,
927
930
additional_response_headers : Vec < ( String , String ) > ,
928
- certified_request_headers : Vec < String > ,
931
+ certified_request_headers : Vec < ( String , String ) > ,
929
932
) -> AssetCertificationResult < ( HttpResponse < ' content > , HttpCertification ) > {
930
933
let mut headers = vec ! [ ( "content-length" . to_string( ) , body. len( ) . to_string( ) ) ] ;
931
934
@@ -934,7 +937,7 @@ impl<'content> AssetRouter<'content> {
934
937
. with_request_headers (
935
938
certified_request_headers
936
939
. iter ( )
937
- . map ( |s | s. as_str ( ) )
940
+ . map ( |( s , _ ) | s. as_str ( ) )
938
941
. collect :: < Vec < & str > > ( ) ,
939
942
)
940
943
. with_response_certification ( DefaultResponseCertification :: response_header_exclusions (
@@ -944,7 +947,9 @@ impl<'content> AssetRouter<'content> {
944
947
let cel_expr_str = cel_expr. to_string ( ) ;
945
948
headers. push ( ( CERTIFICATE_EXPRESSION_HEADER_NAME . to_string ( ) , cel_expr_str) ) ;
946
949
947
- let request = HttpRequest :: get ( url) . build ( ) ;
950
+ let request = HttpRequest :: get ( url)
951
+ . with_headers ( certified_request_headers. clone ( ) )
952
+ . build ( ) ;
948
953
949
954
let response = HttpResponse :: builder ( )
950
955
. with_status_code ( status_code)
0 commit comments