File tree Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Expand file tree Collapse file tree 1 file changed +9
-15
lines changed Original file line number Diff line number Diff line change @@ -48,7 +48,6 @@ export default function wrapper(context) {
48
48
headers = headers ( req , res , context ) ;
49
49
}
50
50
51
- let stream ;
52
51
let fileSize ;
53
52
54
53
if ( ! filename ) {
@@ -102,20 +101,15 @@ export default function wrapper(context) {
102
101
103
102
// Buffer
104
103
const ranges = handleRangeHeaders ( context , fileSize , req , res ) ;
105
- try {
106
- stream = context . outputFileSystem . createReadStream (
107
- filename ,
108
- ranges
109
- ? {
110
- start : ranges . start ,
111
- end : ranges . end ,
112
- }
113
- : { }
114
- ) ;
115
- } catch ( _ignoreError ) {
116
- await goNext ( ) ;
117
- return ;
118
- }
104
+ const stream = context . outputFileSystem . createReadStream (
105
+ filename ,
106
+ ranges
107
+ ? {
108
+ start : ranges . start ,
109
+ end : ranges . end ,
110
+ }
111
+ : { }
112
+ ) ;
119
113
120
114
const responseSize = ranges ? 1 + ( ranges . end - ranges . start ) : fileSize ;
121
115
res . setHeader ( "Content-Length" , responseSize ) ;
You can’t perform that action at this time.
0 commit comments