Skip to content

Empty documents not handled correctly, can lead to failed PUTs #1335

@darkdread

Description

@darkdread

This line in the codebase causes issue if the body is 0 byte; it will skip the storing of revision (etag) and subsequent pushes to the server will fail due to etag mismatch.

The correct behavior I can think of are:

  1. Keep the current behavior, but the remotestorage client MUST store 0 byte document properly
  2. Accept 0 byte document, but allow PUT with/without etag (treat as empty)
  3. Disallow 0 byte document at all

Maybe this issue should be referenced in https://github.com/remotestorage/spec/issues?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions