From d94e094a77db26649c2a5154da24597a209f6881 Mon Sep 17 00:00:00 2001 From: ethan Date: Mon, 12 Aug 2019 13:00:13 +0800 Subject: [PATCH] http_util.go: fix word in error message cleanup:fix words typo in http_util.go Signed-off-by: Guangming Wang --- pkg/httputils/http_util.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/httputils/http_util.go b/pkg/httputils/http_util.go index a618f4add..2324228b2 100644 --- a/pkg/httputils/http_util.go +++ b/pkg/httputils/http_util.go @@ -310,7 +310,7 @@ func GetRangeSE(rangeHTTPHeader string, length int64) ([]*RangeStruct, error) { if strings.ContainsAny(rangeHTTPHeader, "=") { rangeSlice := strings.Split(rangeHTTPHeader, "=") if len(rangeSlice) != 2 { - return nil, errors.Wrapf(errortypes.ErrInvalidValue, "invaild range: %s, should be like bytes=0-1023", rangeStr) + return nil, errors.Wrapf(errortypes.ErrInvalidValue, "invalid range: %s, should be like bytes=0-1023", rangeStr) } rangeStr = rangeSlice[1] } @@ -329,7 +329,7 @@ func GetRangeSE(rangeHTTPHeader string, length int64) ([]*RangeStruct, error) { for i := 0; i < rangeCount; i++ { if strings.Count(rangeArr[i], "-") != 1 { - return nil, errors.Wrapf(errortypes.ErrInvalidValue, "invaild range: %s, should be like 0-1023", rangeArr[i]) + return nil, errors.Wrapf(errortypes.ErrInvalidValue, "invalid range: %s, should be like 0-1023", rangeArr[i]) } // -{length} @@ -413,7 +413,7 @@ func handlePairRange(rangeStr string, length int64) (*RangeStruct, error) { } if endIndex < startIndex { - return nil, errors.Wrapf(errortypes.ErrInvalidValue, "range: %s, the start is lager the end", rangeStr) + return nil, errors.Wrapf(errortypes.ErrInvalidValue, "range: %s, the start is larger the end", rangeStr) } return &RangeStruct{