From f22a9268b9a6567979336711b0723cc83a24436b Mon Sep 17 00:00:00 2001 From: Ben Stahl Date: Fri, 6 May 2016 13:52:14 -0400 Subject: [PATCH 1/3] Respond 412 Precondition Failed if required headers are missing Closes #79 --- protocol.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/protocol.md b/protocol.md index 7c9f03f..a3ebda6 100644 --- a/protocol.md +++ b/protocol.md @@ -210,6 +210,9 @@ bytes contained in the message at the given offset specified by the `Upload-Offset` header. All `PATCH` requests MUST use `Content-Type: application/offset+octet-stream`. +If the `Upload-Offset` or `Content-Type` headers are invalid or missing from the +request, the Server MUST return `412 Precondition Failed`. + The `Upload-Offset` header's value MUST be equal to the current offset of the resource. In order to achieve parallel upload the [Concatenation](#concatenation) extension MAY be used. If the offsets do not @@ -338,6 +341,9 @@ Once set the length MUST NOT be changed. As long as the length of the upload is not known, the Server MUST set `Upload-Defer-Length: 1` in all responses to `HEAD` requests. +If the `Upload-Length` or `Upload-Defer-Length` headers are missing from the +request, the Server MUST return `412 Precondition Failed`. + If the Server supports deferring length, it MUST add `creation-defer-length` to the `Tus-Extension` header. From df04f392fa46ea91671123144d5941c1280269c7 Mon Sep 17 00:00:00 2001 From: Ben Stahl Date: Sat, 7 May 2016 07:21:41 -0400 Subject: [PATCH 2/3] Add myself to list of authors --- protocol.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol.md b/protocol.md index a3ebda6..deec80c 100644 --- a/protocol.md +++ b/protocol.md @@ -5,7 +5,7 @@ **Authors:** [Felix Geisendörfer](https://twitter.com/felixge), [Kevin van Zonneveld](https://twitter.com/kvz), [Tim Koschützki](https://twitter.com/tim_kos), [Naren Venkataraman](https://github.com/vayam), [Marius -Kleidl](https://twitter.com/Acconut_)
+Kleidl](https://twitter.com/Acconut_), [Ben Stahl](https://github.com/bhstahl)
**Collaborators**: [Bruno de Carvalho](https://github.com/biasedbit), [James Butler](https://github.com/sandfox), From 4da96f1b54692ae8d9b1809eb808fc42ce601729 Mon Sep 17 00:00:00 2001 From: Ben Stahl Date: Sat, 7 May 2016 07:23:20 -0400 Subject: [PATCH 3/3] [Version] Minor bump to 1.1.0 --- protocol.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/protocol.md b/protocol.md index deec80c..0b1eb51 100644 --- a/protocol.md +++ b/protocol.md @@ -1,6 +1,6 @@ # tus resumable upload protocol -**Version:** 1.0.0 ([SemVer](http://semver.org))
+**Version:** 1.1.0 ([SemVer](http://semver.org))
**Date:** 2016-03-25
**Authors:** [Felix Geisendörfer](https://twitter.com/felixge), [Kevin van Zonneveld](https://twitter.com/kvz), [Tim Koschützki](https://twitter.com/tim_kos),