chocolatey / package-validator

Windows service to validate packages conform to package standards
Apache License 2.0
31 stars 29 forks source link

caddy docsUrl failing #247

Closed majkinetor closed 3 years ago

majkinetor commented 3 years ago

https://chocolatey.org/packages/caddy/2.2.0

gep13 commented 3 years ago

@majkinetor I am digging into what is going on here just now, and I believe I have found out what the problem is. Should have a new version of package-validator deployed soon, and I will push your package through moderation process.

gep13 commented 3 years ago

The docsUrl in this package is:

https://caddyserver.com/docs

In the browser, this causes a 308 permanent redirect to:

https://caddyserver.com/docs/

The .Net HttpClient doesn't understand the 308 Status Code until .Net Core 2.1:

https://docs.microsoft.com/en-us/dotnet/api/system.net.httpstatuscode?view=netcore-2.1

As a result, we will handle any response that include a ReasonPhrase of Permanent Redirect as a valid URL.

gep13 commented 3 years ago

@majkinetor this change has been released, and the caddy package is now successfully passing URL validation.