File tree Expand file tree Collapse file tree 2 files changed +0
-18
lines changed Expand file tree Collapse file tree 2 files changed +0
-18
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,6 @@ import {
17
17
} from '@web3-storage/gateway-lib/handlers'
18
18
import {
19
19
withContentClaimsDagula ,
20
- withHttpRangeUnsupported ,
21
20
withVersionHeader ,
22
21
withCarBlockHandler
23
22
} from './middleware.js'
@@ -45,7 +44,6 @@ export default {
45
44
withCarBlockHandler ,
46
45
withContentClaimsDagula ,
47
46
withFormatRawHandler ,
48
- withHttpRangeUnsupported ,
49
47
withFormatCarHandler ,
50
48
withContentDispositionHeader ,
51
49
withFixedLengthStream
Original file line number Diff line number Diff line change @@ -15,22 +15,6 @@ import { handleCarBlock } from './handlers/car-block.js'
15
15
* @typedef {import('@web3-storage/gateway-lib').UnixfsContext } UnixfsContext
16
16
*/
17
17
18
- /**
19
- * Validates the request does not contain a HTTP `Range` header.
20
- * Returns 501 Not Implemented in case it has.
21
- * @type {import('@web3-storage/gateway-lib').Middleware<import('@web3-storage/gateway-lib').Context> }
22
- */
23
- export function withHttpRangeUnsupported ( handler ) {
24
- return ( request , env , ctx ) => {
25
- // Range request https://github.com/web3-storage/gateway-lib/issues/12
26
- if ( request . headers . get ( 'range' ) ) {
27
- throw new HttpError ( 'Not Implemented' , { status : 501 } )
28
- }
29
-
30
- return handler ( request , env , ctx )
31
- }
32
- }
33
-
34
18
/**
35
19
* Middleware that will serve CAR files if a CAR codec is found in the path
36
20
* CID. If the CID is not a CAR CID it delegates to the next middleware.
You can’t perform that action at this time.
0 commit comments