Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename Content-*Patch-* within Patches #120

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 22 additions & 22 deletions draft-toomim-httpbis-braid-http-03.txt
Original file line number Diff line number Diff line change
Expand Up @@ -297,14 +297,14 @@ Table of Contents
Merge-Type: sync9 |
Patches: 2 |
|
Content-Length: 53 | | Patch
Range: json=.messages[1:1] | |
Patch-Range: json .messages[1:1] | | Patch
Patch-Length: 53 | |
| |
[{"text": "Yo!", | |
"author": {"link": "/user/yobot"}] | |
|
Content-Length: 40 | | Patch
Range: json=.latest_change | |
Patch-Range: json .latest_change | | Patch
Patch-Length: 40 | |
| |
{"type": "date", "value": 1573952202370} | |

Expand All @@ -318,14 +318,14 @@ Table of Contents
To distinguish the boundaries between patches in an Update, each
patch MUST include the following header:

Content-Length: N
Patch-Length: N

This length determines where each patch ends, and next begins.


The previous example uses the Range Patch format, which is defined in
[RANGE-PATCH]. However, one can use any patch format, by sending a
patch with a Content-Type set to a patch format with a defined
patch with a Patch-Type header set to a patch format with a defined
behavior, such as application/json-patch+json (as specified in
[RFC6902]):

Expand All @@ -340,8 +340,8 @@ Table of Contents
Merge-Type: sync9 |
Patches: 1 |
|
Content-Length: 288 | | Patch
Content-Type: application/json-patch+json | |
Patch-Type: application/json-patch+json | | Patch
Patch-Length: 288 | |
| |
[ | |
{"op": "test", "path": "/a/b/c", "value": "foo"}, | |
Expand All @@ -358,7 +358,7 @@ Table of Contents
Patches: OK


Every patch MUST include either a Content-Type or a Content-Range.
Every patch MUST include either a Patch-Type or a Content-Range.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like I missed a Content-Range->Patch-Range here. This one should be changed, too.



2.4. GET a specific version
Expand Down Expand Up @@ -467,8 +467,8 @@ Table of Contents
Merge-Type: sync9 |
Patches: 1 |
|
Content-Length: 53 | | Patch
Content-Range: json .messages[1:1] | |
Patch-Range: json .messages[1:1] | | Patch
Patch-Length: 53 | |
| |
[{"text": "Yo!", | |
"author": {"link": "/user/yobot"}] | |
Expand All @@ -479,8 +479,8 @@ Table of Contents
Merge-Type: sync9 |
Patches: 1 |
|
Content-Length: 58 | | Patch
Content-Range: json .messages[2:2] | |
Patch-Range: json .messages[2:2] | | Patch
Patch-Length: 58 | |
| |
[{"text": "Hi, Tommy!", | |
"author": {"link": "/user/sal"}}] | |
Expand All @@ -491,8 +491,8 @@ Table of Contents
Merge-Type: sync9 |
Patches: 1 |
|
Content-Length: 288 | | Patch
Content-Type: application/json-patch+json | |
Patch-Type: application/json-patch+json | | Patch
Patch-Length: 288 | |
| |
[ | |
{"op": "test", "path": "/a/b/c", "value": "foo"}, | |
Expand Down Expand Up @@ -530,7 +530,7 @@ Table of Contents

To send multiple updates, a server concatenates multiple updates into
a single response body. Each update MUST include headers and a body,
and MUST specify the end of its body by including at least one of the
and MUST define the end of its body by including at least one of the
following headers:

- Content-Length: N
Expand Down Expand Up @@ -597,8 +597,8 @@ Table of Contents
Merge-Type: sync9 |
Patches: 1 |
|
Content-Length: 53 | | Patch
Content-Range: json .messages[1:1] | |
Patch-Range: json .messages[1:1] | | Patch
Patch-Length: 53 | |
| |
[{"text": "Yo!", | |
"author": {"link": "/user/yobot"}] | |
Expand Down Expand Up @@ -687,13 +687,13 @@ Table of Contents
Content-Type: image/png | Update
Patches: 2 |
|
Content-Length: 1239 | | Patch
Content-Range: bytes 100-200 | |
Patch-Range: bytes 100-200 | | Patch
Patch-Length: 1239 | |
| |
<binary data> | |
|
Content-Length: 62638 | | Patch
Content-Range: bytes 348-887 | |
Patch-Range: bytes 348-887 | | Patch
Patch-Length: 62638 | |
| |
<binary data> | |

Expand Down