Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only verify size if we can #1080

Merged
merged 2 commits into from
Jul 14, 2021
Merged

Only verify size if we can #1080

merged 2 commits into from
Jul 14, 2021

Conversation

jonjohnsonjr
Copy link
Collaborator

Sometimes Content-Length isn't set, and sometimes we don't know what it
should be. Do our best regardless.

Fixes #1061

@imjasonh
Copy link
Collaborator

How do you feel about const SizeUnknown = -1

@codecov-commenter
Copy link

codecov-commenter commented Jul 13, 2021

Codecov Report

Merging #1080 (a3b65cf) into main (5ea3569) will increase coverage by 0.01%.
The diff coverage is 81.81%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1080      +/-   ##
==========================================
+ Coverage   75.51%   75.52%   +0.01%     
==========================================
  Files         107      107              
  Lines        5096     5100       +4     
==========================================
+ Hits         3848     3852       +4     
  Misses        703      703              
  Partials      545      545              
Impacted Files Coverage Δ
pkg/v1/remote/descriptor.go 73.65% <60.00%> (+0.28%) ⬆️
internal/verify/verify.go 100.00% <100.00%> (ø)
pkg/v1/remote/image.go 79.72% <100.00%> (ø)
pkg/v1/remote/layer.go 65.51% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5ea3569...a3b65cf. Read the comment docs.

@jonjohnsonjr
Copy link
Collaborator Author

How do you feel about const SizeUnknown = -1

I love it, done.

Sometimes Content-Length isn't set, and sometimes we don't know what it
should be. Do our best regardless.
Co-authored-by: Jason Hall <jasonhall@redhat.com>
@jonjohnsonjr
Copy link
Collaborator Author

PTAL

@jonjohnsonjr jonjohnsonjr merged commit 13e1a6b into google:main Jul 14, 2021
@jonjohnsonjr jonjohnsonjr deleted the length branch July 14, 2021 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: failed to copy image: response did not include Content-Length header
3 participants