feat: Decode URI in target extractor

This commit is contained in:
Joachim Van Herwegen
2020-10-06 10:46:18 +02:00
parent b47dc3f7f6
commit bb28af937b
4 changed files with 35 additions and 3 deletions

View File

@@ -1,6 +1,7 @@
import type { TLSSocket } from 'tls';
import { format } from 'url';
import type { HttpRequest } from '../../server/HttpRequest';
import { toCanonicalUrl } from '../../util/Util';
import type { ResourceIdentifier } from '../representation/ResourceIdentifier';
import { TargetExtractor } from './TargetExtractor';
@@ -28,6 +29,6 @@ export class BasicTargetExtractor extends TargetExtractor {
pathname: input.url,
});
return { path: url };
return { path: toCanonicalUrl(url) };
}
}