Skip to content

Tests: If-Unmodified-Since in DAV methods. - #79

Open
Aayush7352 wants to merge 1 commit into
nginx:masterfrom
Aayush7352:fix/dav-if-unmodified-561
Open

Tests: If-Unmodified-Since in DAV methods.#79
Aayush7352 wants to merge 1 commit into
nginx:masterfrom
Aayush7352:fix/dav-if-unmodified-561

Conversation

@Aayush7352

Copy link
Copy Markdown

Summary

Regression tests for the If-Unmodified-Since precondition check in
the DAV module (nginx/nginx#1571).

What the test covers

  • PUT an existing file with a past If-Unmodified-Since → 412
    Precondition Failed, file content unchanged
  • PUT an existing file with a future If-Unmodified-Since → 204
    No Content, file updated
  • DELETE an existing file with a past If-Unmodified-Since → 412,
    file preserved on disk
  • COPY to an existing destination with a past If-Unmodified-Since
    → 412, destination unchanged
  • PUT with an invalid If-Unmodified-Since date → 204 (invalid dates
    are treated as if the header was absent, per RFC 7232, Section 3.4)

Verified

All 105 subtests pass with the fix applied. Without the fix the
6 If-Unmodified-Since tests fail (the DAV module performs the
operation with 204 instead of rejecting with 412).

Related: nginx/nginx#561

Test that PUT, DELETE, and COPY respect the If-Unmodified-Since
precondition, returning 412 Precondition Failed when the file
modification time is later than the header date.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: New

Development

Successfully merging this pull request may close these issues.

2 participants