Closed salvdel closed 1 year ago
@Fdawgs Hello there and thank you for the review.
Regarding the documentation I don't think it needs to be updated. This is more of a bug fix since the related behavior was already kind of expected but didn't work properly.
@Uzlopak thank you for merging this.
I have a small request: I'm participating in hacktoberfest 2022 and it would be very cool to have this PR count toward the monthly PRs goal over there. Is there a chance you can label this PR with the hacktoberfest-accepted
label?
Checklist
npm run test
andnpm run benchmark
Hello everyone, in an attempt to fix issues #494 and #540 I integrated support for
server
relative and templated urls.When
stripBasePath
was set to true then the server url was being parsed as is usingnew URL(serverUrl)
. This inevitably resulted in an error when the server url was either relative (e.g./foo/bar
) or templated (e.g.http://localhost:{port}/{basePath}
).The changes introduced by this PR solve the issue by first resolving the server url (by replacing templated variables with the corresponing values) and then by using it as is if relative or otherwise parsing it through
new URL(serverUrl)
in order to extract the pathname.Fixes #494, Fixes #540