{"record":{"id":"9f9443855d76641d","repo":"goharbor/harbor","slug":"invalid-content-range-format-s","errorCode":null,"errorMessage":"invalid content range format, %s","messagePattern":"invalid content range format, (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"src/pkg/registry/client.go","lineNumber":493,"sourceCode":"\tresp, err := c.do(req)\n\tif err != nil {\n\t\treturn location, -1, err\n\t}\n\n\tdefer resp.Body.Close()\n\n\t_, end, err := parseContentRange(resp.Header.Get(\"Range\"))\n\tif err != nil {\n\t\treturn location, -1, err\n\t}\n\n\treturn resp.Header.Get(\"Location\"), end, nil\n}\n\nfunc parseContentRange(cr string) (int64, int64, error) {\n\tranges := strings.Split(cr, \"-\")\n\tif len(ranges) != 2 {\n\t\treturn -1, -1, fmt.Errorf(\"invalid content range format, %s\", cr)\n\t}\n\tstart, err := strconv.ParseInt(ranges[0], 10, 64)\n\tif err != nil {\n\t\treturn -1, -1, err\n\t}\n\tend, err := strconv.ParseInt(ranges[1], 10, 64)\n\tif err != nil {\n\t\treturn -1, -1, err\n\t}\n\n\treturn start, end, nil\n}\n\nfunc (c *client) initiateBlobUpload(repository string) (string, string, error) {\n\treq, err := http.NewRequest(http.MethodPost, buildInitiateBlobUploadURL(c.url, repository), nil)\n\tif err != nil {\n\t\treturn \"\", \"\", err\n\t}","sourceCodeStart":475,"sourceCodeEnd":511,"githubUrl":"https://github.com/goharbor/harbor/blob/7b2fd08cc568955cca339afeefab27372840d936/src/pkg/registry/client.go#L475-L511","documentation":"Error \"invalid content range format, %s\" thrown in goharbor/harbor.","triggerScenarios":"Thrown at src/pkg/registry/client.go:493 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"7b2fd08cc568955cca339afeefab27372840d936","analyzedAt":"2026-08-16T00:00:10.961Z","schemaVersion":2},"datasetVersion":"2026-08-16T03:17:38.424Z"}