Skip to content

Commit e261f0e

Browse files
committed
Support zero-length ranges for bytes.
See #29.
1 parent fcc61ca commit e261f0e

File tree

1 file changed

+22
-13
lines changed

1 file changed

+22
-13
lines changed

draft-xx-httpbis-range-patch-00.txt

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,17 @@ Table of Contents
4545
2.2. Stand-Alone Range Patch ....................................4
4646
2.3. URI Fragment Identifiers ...................................5
4747
3. Range Units .....................................................6
48-
3.1. JSON Range Unit ............................................7
49-
4. IANA Considerations .............................................8
50-
4.1. Range Unit Registration ....................................9
51-
4.2. The +patch Structured Syntax Suffix .......................10
52-
5. Security Considerations ........................................11
53-
6. Conventions ....................................................12
54-
7. Copyright Notice ...............................................13
55-
8. References .....................................................14
56-
8.1. Normative References ......................................15
57-
8.2. Informative References ....................................16
48+
3.1. Bytes Range Unit ...........................................7
49+
3.2. JSON Range Unit ............................................8
50+
4. IANA Considerations .............................................9
51+
4.1. Range Unit Registration ...................................10
52+
4.2. The +patch Structured Syntax Suffix .......................11
53+
5. Security Considerations ........................................12
54+
6. Conventions ....................................................13
55+
7. Copyright Notice ...............................................14
56+
8. References .....................................................15
57+
8.1. Normative References ......................................16
58+
8.2. Informative References ....................................17
5859

5960

6061

@@ -247,9 +248,17 @@ Table of Contents
247248
Different range units can be compatible with content expresses
248249
through different media types.
249250

250-
Bytes range unit is already specified in [RFC7233].
251+
3.1. Bytes Range Unit
251252

252-
3.1. JSON Range Unit
253+
Bytes range unit is already specified in [RFC7233]. We extend it
254+
by allowing a zero-length range using a zero-length-byte-range-spec.
255+
256+
zero-length-byte-range-spec = 1*DIGIT
257+
258+
A zero-length range is a byte offset used to identify a location
259+
immediately before which new content can be inserted with a patch.
260+
261+
3.2. JSON Range Unit
253262

254263
JSON range unit operates on JSON and JSON-compatible data structures.
255264
Its range specification is based on JSON pointer as described in
@@ -327,7 +336,7 @@ Table of Contents
327336
| Range Unit | Description | Reference |
328337
| Name | | |
329338
+-------------+---------------------------------------+-------------+
330-
| json | a JSON pointer range on JSON and | Section 3.1 |
339+
| json | a JSON pointer range on JSON and | Section 3.2 |
331340
| | JSON-compatible data structures | |
332341
+-------------+---------------------------------------+-------------+
333342

0 commit comments

Comments
 (0)