Skip to content

Commit

Permalink
refactor: change URL max length to 8000
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Apr 23, 2024
1 parent b11763b commit 499267c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/contrib/parseuri.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const parts = [
];

export function parse(str: string) {
if (str.length > 2000) {
if (str.length > 8000) {
throw "URI too long";
}

Expand Down
2 changes: 1 addition & 1 deletion test/parseuri.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,6 @@ describe("parseuri", function () {
expect(relativeWithQuery.path).to.be("/foo");
expect(relativeWithQuery.query).to.be("bar=@example.com");

expect(() => parseuri(repeat("a", 2001))).to.throwError("URI too long");
expect(() => parseuri(repeat("a", 8001))).to.throwError("URI too long");
});
});

0 comments on commit 499267c

Please sign in to comment.