File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change @@ -20,11 +20,18 @@ class HeadHandler extends BaseHandler {
2020 const file_name = match [ 1 ] ;
2121 return this . store . getOffset ( file_name )
2222 . then ( ( stats ) => {
23- // The Server MUST prevent the client and/or proxies from caching the response by adding the Cache-Control: no-store header to the response.
23+ // The Server MUST prevent the client and/or proxies from
24+ // caching the response by adding the Cache-Control: no-store
25+ // header to the response.
2426 res . setHeader ( 'Cache-Control' , 'no-store' ) ;
2527
26- // If the size of the upload is known, the Server MUST include the Upload-Length header in the response.
27- res . setHeader ( 'Upload-Length' , stats . size ) ;
28+ // The Server MUST always include the Upload-Offset header in
29+ // the response for a HEAD request, even if the offset is 0
30+ res . setHeader ( 'Upload-Offset' , stats . size ) ;
31+
32+ // If the size of the upload is known, the Server MUST include
33+ // the Upload-Length header in the response.
34+ res . setHeader ( 'Upload-Length' , stats . upload_length ) ;
2835 return res . end ( ) ;
2936 } )
3037 . catch ( ( error ) => {
You can’t perform that action at this time.
0 commit comments