govalidator
govalidator copied to clipboard
IsRequestURI fails for non-absolute URLs
Bug Report
Q | A |
---|---|
Version(s) | v11.0.1 and earlier? |
Summary
APIs that return relative URIs fail to validate as url.ParseRequestURI
is used instead of url.Parse
. ParseRequestURI
is documented as:
... the url is interpreted only as an absolute URI or an absolute path.
Current behavior
Relative URIs fail validation (e.g. ./some-path
)
How to reproduce
Attempt to validate a relative URI. (e.g. ./some-path
)
Expected behavior
Aboslute and relative URIs pass validation.