Skip to content

Commit

Permalink
refactor(binding-http/server): remove depecrated url.parse and favor URL
Browse files Browse the repository at this point in the history
  • Loading branch information
relu91 committed Jul 19, 2023
1 parent 8552953 commit 83f1d5b
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions packages/binding-http/src/http-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ import * as fs from "fs";
import * as http from "http";
import * as https from "https";
import bauth from "basic-auth";
import * as url from "url";

import { AddressInfo } from "net";

Expand Down Expand Up @@ -583,8 +582,7 @@ export default class HttpServer implements ProtocolServer {
}

private async handleRequest(req: http.IncomingMessage, res: http.ServerResponse) {
// eslint-disable-next-line node/no-deprecated-api
const requestUri = url.parse(req.url);
const requestUri = new URL(req.url, `${this.scheme}://${req.headers.host}`);

debug(
`HttpServer on port ${this.getPort()} received '${req.method} ${
Expand Down

0 comments on commit 83f1d5b

Please sign in to comment.