Skip to content

Commit 7e61026

Browse files
committed
fix: clean up merge
1 parent 83132c7 commit 7e61026

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

src/middleware.js

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -158,23 +158,6 @@ export function withRateLimits(handler) {
158158
}
159159
}
160160

161-
162-
/**
163-
* Validates the request does not contain a HTTP `Range` header.
164-
* Returns 501 Not Implemented in case it has.
165-
* @type {import('@web3-storage/gateway-lib').Middleware<import('@web3-storage/gateway-lib').Context>}
166-
*/
167-
export function withHttpRangeUnsupported (handler) {
168-
return (request, env, ctx) => {
169-
// Range request https://github.com/web3-storage/gateway-lib/issues/12
170-
if (request.headers.get('range')) {
171-
throw new HttpError('Not Implemented', { status: 501 })
172-
}
173-
174-
return handler(request, env, ctx)
175-
}
176-
}
177-
178161
/**
179162
* Middleware that will serve CAR files if a CAR codec is found in the path
180163
* CID. If the CID is not a CAR CID it delegates to the next middleware.

0 commit comments

Comments
 (0)