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

Added sha1 header always #4303

Merged
merged 4 commits into from
Jan 16, 2019
Merged

Conversation

lasote
Copy link
Contributor

@lasote lasote commented Jan 15, 2019

Changelog: Fix: Conan client now always include the X-Checksum-Sha1 header in the file uploads, not only when checking if the file is already there with a remote supporting checksum deploy (Artifactory)

Docs: omit

Closes #3544

@ghost ghost assigned lasote Jan 15, 2019
@ghost ghost added the stage: review label Jan 15, 2019
@lasote lasote added this to the 1.12 milestone Jan 15, 2019
@lasote lasote requested a review from uilianries January 15, 2019 13:30
@@ -19,16 +19,18 @@ def __init__(self, requester, output, verify, chunk_size=1000):
self.verify = verify

def upload(self, url, abs_path, auth=None, dedup=False, retry=1, retry_wait=0, headers=None):
# Send always the header with the Sha1
headers = headers or {}
headers["X-Checksum-Sha1"] = sha1sum(abs_path)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dedup is configured by the server capabilities, that means SHA-1 will be included even when a server is not prepared to used it. Do you know if it could affect conan_server or Bintray?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

according to the HTTP specification, unknown headers should be just safely ignored

Copy link
Member

@uilianries uilianries left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@memsharded memsharded merged commit a2c1cbb into conan-io:develop Jan 16, 2019
@ghost ghost removed the stage: review label Jan 16, 2019
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.

4 participants