| 1 |
@startuml |
| 2 |
title Grab transfer state |
| 3 |
|
| 4 |
legend |
| 5 |
| # | Meaning | |
| 6 |
| D | Destination path known | |
| 7 |
| S | File size known | |
| 8 |
| O | Server options known (Accept-Ranges) | |
| 9 |
| R | Resume supported (Accept-Ranges) | |
| 10 |
| Z | Local file empty or missing | |
| 11 |
| P | Local file partially complete | |
| 12 |
endlegend |
| 13 |
|
| 14 |
[*] --> Empty |
| 15 |
[*] --> D |
| 16 |
[*] --> S |
| 17 |
[*] --> DS |
| 18 |
|
| 19 |
Empty : Filename: "" |
| 20 |
Empty : Size: 0 |
| 21 |
Empty --> O : HEAD: Method not allowed |
| 22 |
Empty --> DSO : HEAD: Range not supported |
| 23 |
Empty --> DSOR : HEAD: Range supported |
| 24 |
|
| 25 |
DS : Filename: "foo.bar" |
| 26 |
DS : Size: > 0 |
| 27 |
DS --> DSZ : checkExisting(): File missing |
| 28 |
DS --> DSP : checkExisting(): File partial |
| 29 |
DS --> [*] : checkExisting(): File complete |
| 30 |
DS --> ERROR |
| 31 |
|
| 32 |
S : Filename: "" |
| 33 |
S : Size: > 0 |
| 34 |
S --> SO : HEAD: Method not allowed |
| 35 |
S --> DSO : HEAD: Range not supported |
| 36 |
S --> DSOR : HEAD: Range supported |
| 37 |
|
| 38 |
D : Filename: "foo.bar" |
| 39 |
D : Size: 0 |
| 40 |
D --> DO : HEAD: Method not allowed |
| 41 |
D --> DSO : HEAD: Range not supported |
| 42 |
D --> DSOR : HEAD: Range supported |
| 43 |
|
| 44 |
|
| 45 |
O : Filename: "" |
| 46 |
O : Size: 0 |
| 47 |
O : CanResume: false |
| 48 |
O --> DSO : GET 200 |
| 49 |
O --> ERROR |
| 50 |
|
| 51 |
SO : Filename: "" |
| 52 |
SO : Size: > 0 |
| 53 |
SO : CanResume: false |
| 54 |
SO --> DSO : GET: 200 |
| 55 |
SO --> ERROR |
| 56 |
|
| 57 |
DO : Filename: "foo.bar" |
| 58 |
DO : Size: 0 |
| 59 |
DO : CanResume: false |
| 60 |
DO --> DSO : GET 200 |
| 61 |
DO --> ERROR |
| 62 |
|
| 63 |
DSZ : Filename: "foo.bar" |
| 64 |
DSZ : Size: > 0 |
| 65 |
DSZ : File: empty |
| 66 |
DSZ --> DSORZ : HEAD: Range supported |
| 67 |
DSZ --> DSOZ : HEAD 405 or Range unsupported |
| 68 |
|
| 69 |
DSP : Filename: "foo.bar" |
| 70 |
DSP : Size: > 0 |
| 71 |
DSP : File: partial |
| 72 |
DSP --> DSORP : HEAD: Range supported |
| 73 |
DSP --> DSOZ : HEAD: 405 or Range unsupported |
| 74 |
|
| 75 |
DSO : Filename: "foo.bar" |
| 76 |
DSO : Size: > 0 |
| 77 |
DSO : CanResume: false |
| 78 |
DSO --> DSOZ : checkExisting(): File partial|missing |
| 79 |
DSO --> [*] : checkExisting(): File complete |
| 80 |
|
| 81 |
DSOR : Filename: "foo.bar" |
| 82 |
DSOR : Size: > 0 |
| 83 |
DSOR : CanResume: true |
| 84 |
DSOR --> DSORP : CheckLocal: File partial |
| 85 |
DSOR --> DSORZ : CheckLocal: File missing |
| 86 |
|
| 87 |
DSORP : Filename: "foo.bar" |
| 88 |
DSORP : Size: > 0 |
| 89 |
DSORP : CanResume: true |
| 90 |
DSORP : File: partial |
| 91 |
DSORP --> Transferring |
| 92 |
|
| 93 |
DSORZ : Filename: "foo.bar" |
| 94 |
DSORZ : Size: > 0 |
| 95 |
DSORZ : CanResume: true |
| 96 |
DSORZ : File: empty |
| 97 |
DSORZ --> Transferring |
| 98 |
|
| 99 |
DSOZ : Filename: "foo.bar" |
| 100 |
DSOZ : Size: > 0 |
| 101 |
DSOZ : CanResume: false |
| 102 |
DSOZ : File: empty |
| 103 |
DSOZ --> Transferring |
| 104 |
|
| 105 |
Transferring --> [*] |
| 106 |
Transferring --> ERROR |
| 107 |
|
| 108 |
ERROR : Something went wrong |
| 109 |
ERROR --> [*] |
| 110 |
|
| 111 |
@enduml |