Skip to content

Commit 33b99dd

Browse files
authored
Apply Willy's suggestion to large number examples (#3234)
Taking the suggestion from #3231 Closes #3231
1 parent 4094277 commit 33b99dd

File tree

1 file changed

+27
-27
lines changed

1 file changed

+27
-27
lines changed

draft-ietf-httpbis-resumable-upload.md

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -412,44 +412,44 @@ The server might not receive the entire request content when the upload is inter
412412

413413
### Examples {#upload-creation-example}
414414

415-
A) The following example shows an upload creation, where the entire 100000000 bytes are transferred in the initial request. The server sends multiple interim responses and one final response from processing the uploaded representation.
415+
A) The following example shows an upload creation, where the entire 123456789 bytes are transferred in the initial request. The server sends multiple interim responses and one final response from processing the uploaded representation.
416416

417417
~~~ http-message
418418
POST /project/123/files HTTP/1.1
419419
Host: example.com
420420
Upload-Complete: ?1
421-
Content-Length: 100000000
422-
Upload-Length: 100000000
421+
Content-Length: 123456789
422+
Upload-Length: 123456789
423423

424-
[content (100000000 bytes)]
424+
[content (123456789 bytes)]
425425
~~~
426426

427427
~~~ http-message
428428
HTTP/1.1 104 Upload Resumption Supported
429429
Location: https://example.com/upload/b530ce8ff
430-
Upload-Limit: max-size=1000000000
430+
Upload-Limit: max-size=1234567890
431431

432432
HTTP/1.1 104 Upload Resumption Supported
433-
Upload-Offset: 50000000
433+
Upload-Offset: 23456789
434434

435435
HTTP/1.1 200 OK
436436
Location: https://example.com/upload/b530ce8ff
437-
Upload-Limit: max-size=1000000000
437+
Upload-Limit: max-size=1234567890
438438
Content-Type: application/json
439439

440440
{"attachmentId": "b530ce8ff"}
441441
~~~
442442

443-
B) The following example shows an upload creation, where only the first 25000000 bytes of a 100000000 bytes upload are transferred. The server acknowledges the received representation data and that the upload is not complete yet. The client can continue appending data.
443+
B) The following example shows an upload creation, where only the first 23456789 bytes of a 123456789 bytes upload are transferred. The server acknowledges the received representation data and that the upload is not complete yet. The client can continue appending data.
444444

445445
~~~ http-message
446446
POST /upload HTTP/1.1
447447
Host: example.com
448448
Upload-Complete: ?0
449-
Content-Length: 25000000
450-
Upload-Length: 100000000
449+
Content-Length: 23456789
450+
Upload-Length: 123456789
451451

452-
[partial content (25000000 bytes)]
452+
[partial content (23456789 bytes)]
453453
~~~
454454

455455
~~~ http-message
@@ -458,7 +458,7 @@ Location: https://example.com/upload/3fd4994ad
458458

459459
HTTP/1.1 201 Created
460460
Location: https://example.com/upload/3fd4994ad
461-
Upload-Limit: max-size=1000000000
461+
Upload-Limit: max-size=1234567890
462462
~~~
463463

464464
C) The following example shows an upload creation, where the server responds with a 5xx status code. Thanks to the interim response containing the upload resource URI, the client can resume the upload.
@@ -467,10 +467,10 @@ C) The following example shows an upload creation, where the server responds wit
467467
POST /upload HTTP/1.1
468468
Host: example.com
469469
Upload-Complete: ?1
470-
Content-Length: 100000000
471-
Upload-Length: 100000000
470+
Content-Length: 123456789
471+
Upload-Length: 123456789
472472

473-
[content (100000000 bytes)]
473+
[content (123456789 bytes)]
474474
~~~
475475

476476
~~~ http-message
@@ -486,10 +486,10 @@ D) The following example shows an upload creation being rejected by the server b
486486
POST /upload-not-allowed HTTP/1.1
487487
Host: example.com
488488
Upload-Complete: ?1
489-
Content-Length: 100000000
490-
Upload-Length: 100000000
489+
Content-Length: 123456789
490+
Upload-Length: 123456789
491491

492-
[content (100000000 bytes)]
492+
[content (123456789 bytes)]
493493
~~~
494494

495495
~~~ http-message
@@ -607,38 +607,38 @@ While the request content is being received, the server SHOULD send interim resp
607607

608608
### Examples {#upload-appending-example}
609609

610-
A) The following example shows an upload append request. The client transfers the next 25000000 bytes at an offset of 25000000 and does not indicate that the upload is then completed. The server generates one interim response and finally acknowledges the new offset:
610+
A) The following example shows an upload append request. The client transfers the next 23456789 bytes at an offset of 23456789 and does not indicate that the upload is then completed. The server generates one interim response and finally acknowledges the new offset:
611611

612612
~~~ http-message
613613
PATCH /upload/37a504d87 HTTP/1.1
614614
Host: example.com
615615
Upload-Complete: ?0
616-
Upload-Offset: 25000000
617-
Content-Length: 25000000
616+
Upload-Offset: 23456789
617+
Content-Length: 23456789
618618
Content-Type: application/partial-upload
619619

620-
[content (25000000 bytes)]
620+
[content (23456789 bytes)]
621621
~~~
622622

623623
~~~ http-message
624624
HTTP/1.1 104 Upload Resumption Supported
625-
Upload-Offset: 12500000
625+
Upload-Offset: 35185184
626626

627627
HTTP/1.1 204 No Content
628628
Upload-Complete: ?0
629629
~~~
630630

631-
B) The next example shows an upload append, where the client transfers the remaining 25000000 bytes and completes the upload. The server processes the uploaded representation and generates the responding response, in this example containing extracted meta data:
631+
B) The next example shows an upload append, where the client transfers the remaining 4567890 bytes and completes the upload with a length of 1234567890 bytes. The server processes the uploaded representation and generates the responding response, in this example containing extracted meta data:
632632

633633
~~~ http-message
634634
PATCH /upload/d38d6ffe8 HTTP/1.1
635635
Host: example.com
636636
Upload-Complete: ?1
637-
Upload-Offset: 25000000
638-
Content-Length: 25000000
637+
Upload-Offset: 1230000000
638+
Content-Length: 4567890
639639
Content-Type: application/partial-upload
640640

641-
[content (25000000 bytes)]
641+
[content (4567890 bytes)]
642642
~~~
643643

644644
~~~ http-message

0 commit comments

Comments
 (0)