Package io.milton.http.http11
Class MatchHelper
java.lang.Object
io.milton.http.http11.MatchHelper
- Author:
- brad
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckIfMatch(Resource r, Request req) Check if the resource has been modified based on etags Returns true if the match comparison indicates that the resource has NOT been modified Ie, returning "true" means to continue with PUT processing.booleancheckIfNoneMatch(Resource r, Request req) Returns true if none of the given etags match those given in the if-none-match header In the usual use case of GET returning false means "do nothing different", ie continue processing.booleancheckIfRange(Resource r, Request request) Only used if a Range header is in the request.
-
Constructor Details
-
MatchHelper
-
-
Method Details
-
checkIfMatch
Check if the resource has been modified based on etags Returns true if the match comparison indicates that the resource has NOT been modified Ie, returning "true" means to continue with PUT processing. Returning "false" means that the comparison indicates that processing should not continue- Parameters:
r-req-- Returns:
- - true means resource is not modified
-
checkIfNoneMatch
Returns true if none of the given etags match those given in the if-none-match header In the usual use case of GET returning false means "do nothing different", ie continue processing.- Parameters:
r-req-- Returns:
-
checkIfRange
Only used if a Range header is in the request. Check for the presence of a If-Range header , if present check if it contains the current etag for the resource, and if so continue with the partial GET. If the given etag is not valid return false, which indicates that a normal GET with full content should be performed If there is no If-Range header returns true to indicate the partial GET should proceed normally
-