diff options
| author | Shulhan <ms@kilabit.info> | 2023-03-26 13:39:33 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-03-26 13:45:53 +0700 |
| commit | 0a0d647eb485a68be4169e8ca3f4a8a3f1b2c511 (patch) | |
| tree | 1fdd9b9511f3dc4a98c12fc045345a77e6acc87f /lib/http/range.go | |
| parent | 2f5aae2820ebc27225504736aa25bca66cceee0d (diff) | |
| download | pakakeh.go-0a0d647eb485a68be4169e8ca3f4a8a3f1b2c511.tar.xz | |
lib/http: fix empty branch when parsing range
If the range is "x-y-", the function should skip the position.
Diffstat (limited to 'lib/http/range.go')
| -rw-r--r-- | lib/http/range.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/http/range.go b/lib/http/range.go index eb97e0ef..57404a43 100644 --- a/lib/http/range.go +++ b/lib/http/range.go @@ -151,6 +151,8 @@ func ParseRange(v string) (r Range) { tok, delim = par.TokenTrimSpace() if delim == '-' { // Invalid range "start-end-" + skipPosition(par, delim) + continue } if len(tok) == 0 { if start == 0 { |
