Skip to content
This repository was archived by the owner on Aug 18, 2022. It is now read-only.

Commit 9a2fadb

Browse files
committed
fix: Add license to comment lifted from request
Give @mikeal credit for it.
1 parent 3fe74ce commit 9a2fadb

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/index.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,19 @@ function fetch (uri, opts) {
8787
reject(new FetchError(`redirect location header missing at: ${request.url}`, 'invalid-redirect'))
8888
return
8989
}
90+
91+
// Comment and logic below is used under the following license:
92+
// Copyright (c) 2010-2012 Mikeal Rogers
93+
// Licensed under the Apache License, Version 2.0 (the "License");
94+
// you may not use this file except in compliance with the License.
95+
// You may obtain a copy of the License at
96+
// http://www.apache.org/licenses/LICENSE-2.0
97+
// Unless required by applicable law or agreed to in writing,
98+
// software distributed under the License is distributed on an "AS
99+
// IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
100+
// express or implied. See the License for the specific language
101+
// governing permissions and limitations under the License.
102+
90103
// Remove authorization if changing hostnames (but not if just
91104
// changing ports or protocols). This matches the behavior of request:
92105
// https://github.com/request/request/blob/b12a6245/lib/redirect.js#L134-L138

0 commit comments

Comments
 (0)