Remove size from ResourceData #108

Merged
merged 1 commit into from Nov 17, 2016

Conversation

Projects
None yet
4 participants
Contributor

natefinch commented Nov 17, 2016

We're not guaranteed to get a content-length from our get request, so we can't
guarantee we'll have anything to put in size.

This is half of a fix for https://bugs.launchpad.net/juju/+bug/1628786

Remove size from ResourceData
We're not guaranteed to get a content-length from our get request, so we can't
guarantee we'll have anything to put in size.
Member

jujugui commented Nov 17, 2016

Test PASSed.
Refer to this link for build results (access rights to CI server needed):
http://ci.jujugui.org:8080//job/charmrepo/292/
Test PASSed.

It would be good to understand why content length is not always set. Can't we use it if set and ignore it if not? Why is it set sometimes and not others?

Owner

mitechie commented Nov 17, 2016

+1 to @wallyworld as far as description of the problem and a link to the bug report on the charmstore that should be tracked/related to this issue.

Contributor

natefinch commented Nov 17, 2016

You can't trust content-length, evidently. It gets removed often in the case of gzipped responses. Since we also have the hash, which if it matches must mean the size matches as well.

Contributor

natefinch commented Nov 17, 2016

$$merge$$

Contributor

natefinch commented Nov 17, 2016

:shipit:

Member

jujugui commented Nov 17, 2016

Status: merge request accepted. Url: http://ci.jujugui.org:8080/job/charmrepo-merge

@jujugui jujugui merged commit e79aa29 into juju:v2-unstable Nov 17, 2016

1 check passed

default Merged build finished.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment