Skip to content

If-Range must compare date with exact match #6072

Closed

Description

@hnakamur

https://tools.ietf.org/html/rfc7233#section-3.2

Note that this comparison by exact match,
including when the validator is an HTTP-date, differs from the
"earlier than or equal to" comparison used when evaluating an
If-Unmodified-Since conditional.

However trafficserver currently compares If-Range date with the Last-Modified using the less than operator.

// this a Date, similar to If-Unmodified-Since
else {
// lm_value is zero if Last-modified not exists
ink_time_t lm_value = response->get_last_modified();
// condition fails if Last-modified not exists
if ((request->get_if_range_date() < lm_value) || (lm_value == 0)) {
return HTTP_STATUS_RANGE_NOT_SATISFIABLE;
} else {
return response->status_get();
}
}

Activity

  1. self-assigned this
    on Oct 28, 2019
  2. added a commit that references this issue on Oct 29, 2019
  3. added a commit that references this issue on Oct 29, 2019
  4. added a commit that references this issue on Oct 29, 2019
  5. hnakamur commented on Oct 29, 2019

    @hnakamur
    ContributorAuthor

    Thanks!

  6. added a commit that references this issue on Nov 19, 2019
  7. added a commit that references this issue on Nov 22, 2019
  8. added a commit that references this issue on Jul 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions