-
Notifications
You must be signed in to change notification settings - Fork 989
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
Added sha1 header always #4303
Conversation
@@ -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) |
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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