We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d16bd2f commit f3be3a6Copy full SHA for f3be3a6
src/index.js
@@ -7,7 +7,6 @@
7
* All spec algorithm step numbers are based on https://fetch.spec.whatwg.org/commit-snapshots/ae716822cb3a61843226cd090eefc6589446c1d2/.
8
*/
9
10
-import { resolve as resolve_url } from 'url';
11
import http from 'http';
12
import https from 'https';
13
import zlib from 'zlib';
@@ -71,7 +70,7 @@ export default function fetch(url, opts) {
71
70
const location = headers.get('Location');
72
73
// HTTP fetch step 5.3
74
- const locationURL = location === null ? null : resolve_url(request.url, location);
+ const locationURL = location === null ? null : new URL(location, request.url).toString();
75
76
// HTTP fetch step 5.5
77
switch (request.redirect) {
0 commit comments