C# 클래스 Headless.RelaxedFolderLocationValidator

The RelaxedFolderLocationValidator class uses relaxed rules for validating locations using Uri.GetComponents.
In addition to ignoring query strings and running case insensitive validations, this class also automatically appends trailing slashes to paths that appear to represent folders before running validation. This fixes validation issues where http://test.com/testing does not match http://test.com/testing/ where the server is likely to interpret the two as the same resource.
상속: ComponentsLocationValidator
파일 보기 프로젝트 열기: roryprimrose/Headless

공개 메소드들

메소드 설명
Matches ( Uri location, Uri expectedLocation ) : bool This method appends a forward slash character to the path part of each Uri where the path appears to be a folder reference that lacks a trailing forward slash. This fixes validation issues where http://test.com/testing does not match http://test.com/testing/ where the server is likely to interpret the two as the same resource.
RelaxedFolderLocationValidator ( ) : System

Initializes a new instance of the RelaxedFolderLocationValidator class.

비공개 메소드들

메소드 설명
MakeSafeFolderLocation ( Uri location ) : Uri

Makes the safe folder location.

메소드 상세

Matches() 공개 메소드

This method appends a forward slash character to the path part of each Uri where the path appears to be a folder reference that lacks a trailing forward slash. This fixes validation issues where http://test.com/testing does not match http://test.com/testing/ where the server is likely to interpret the two as the same resource.
/// The parameter is null. /// /// The is a relative location where an absolute location is required. /// /// The parameter is null. /// /// The is a relative location where an absolute location is required. ///
public Matches ( Uri location, Uri expectedLocation ) : bool
location System.Uri
expectedLocation System.Uri
리턴 bool

RelaxedFolderLocationValidator() 공개 메소드

Initializes a new instance of the RelaxedFolderLocationValidator class.
public RelaxedFolderLocationValidator ( ) : System
리턴 System