File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " tauri " : patch
3+ ---
4+
5+ Allow range in the form of ` bytes=0-* ` on the asset protocol.
Original file line number Diff line number Diff line change @@ -558,11 +558,18 @@ impl<R: Runtime> WindowManager<R> {
558558 }
559559 } ;
560560 // parse the range
561- let range = match crate :: runtime:: http:: HttpRange :: parse ( & range, file_size) {
561+ let range = match crate :: runtime:: http:: HttpRange :: parse (
562+ & if range. ends_with ( "-*" ) {
563+ range. chars ( ) . take ( range. len ( ) - 1 ) . collect :: < String > ( )
564+ } else {
565+ range. clone ( )
566+ } ,
567+ file_size,
568+ ) {
562569 Ok ( r) => r,
563570 Err ( e) => {
564571 #[ cfg( debug_assertions) ]
565- eprintln ! ( "Failed to parse range: {:?}" , e) ;
572+ eprintln ! ( "Failed to parse range {} : {:?}" , range , e) ;
566573 return ( headers, 400 , buf) ;
567574 }
568575 } ;
You can’t perform that action at this time.
0 commit comments