Class MatchHelper

java.lang.Object
io.milton.http.http11.MatchHelper

public class MatchHelper extends Object
Author:
brad
  • Constructor Details

  • Method Details

    • checkIfMatch

      public boolean checkIfMatch(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. Returning "false" means that the comparison indicates that processing should not continue
      Parameters:
      r -
      req -
      Returns:
      - true means resource is not modified
    • checkIfNoneMatch

      public boolean checkIfNoneMatch(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.
      Parameters:
      r -
      req -
      Returns:
    • checkIfRange

      public boolean checkIfRange(Resource r, Request request)
      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