Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Add Traffic Ops If-Match and If-Unmodified-Since Support in Server and Clients #3509

@rob05c

Description

@rob05c

Currently, there is a race condition if multiple people PUT an object, they will overwrite each-other without realizing it.

HTTP has a well-established solution for this: If-Match and If-Unmodified-Since.
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Unmodified-Since
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/If-Match

We should implement this, to prevent races and people accidentally overwriting each other.

It shouldn't be too difficult to implement. We can generate an ETag+Last-Modified header from the resource's last_updated field, and likewise compare them when we get a request with IM or IUS.

It's tempting to add the bug tag, since this is a logical bug, even if it's not a code bug. I won't, but I wouldn't object if someone else did.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Traffic Opsrelated to Traffic Opsnew featureA new feature, capability or behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions