Skip to content

If-Range must compare date with exact match #6072

@hnakamur

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();
}
}

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