aspnet / StaticFiles

[Archived] Middleware for handling requests for file system resources including files and directories. Project moved to https://github.com/aspnet/AspNetCore
Apache License 2.0
114 stars 72 forks source link

StaticFileContext.ValidateMethod wrongly named #217

Closed vanillajonathan closed 6 years ago

vanillajonathan commented 7 years ago

The ValidateMethod in the StaticFileContext should probably be named IsValidMethod.

Tratcher commented 7 years ago

I don't see why. It's doing more work than the IsXXX properties. https://github.com/aspnet/StaticFiles/blob/826e89a2d1b325485819040ff41b9948afc91e06/src/Microsoft.AspNetCore.StaticFiles/StaticFileContext.cs#L111-L117

vanillajonathan commented 7 years ago

It does not really do any action, it just checks conditions.

It checks if something is valid by checking if the HTTP request method is a GET or a HEAD.

aspnet-hello commented 6 years ago

This issue was moved to aspnet/Home#2443