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 Jun 29, 2023
1 parent 9c3da47 commit cf05858
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 @@ -566,8 +565,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 cf05858

Please sign in to comment.