Skip to content

Replace io.ReadAll with a more memory efficient method #89

@guacamole

Description

@guacamole
bz, err := io.ReadAll(resp)
	if err != nil {
		errMsg := r.errorResponse(RegistryErrorCodeManifestInvalid, err.Error(), nil)
		ctx.Set(types.HttpEndpointErrorKey, errMsg)
		return ctx.JSONBlob(http.StatusNotFound, errMsg)
	}
	_ = resp.Close()

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions