INNER CODE UNIT · Python

get_bytes

Altinity/clickhouse-operator · tools/restore_shared_to_replicated.py:207

    def get_bytes(self, bucket: str, key: str) -> bytes:
        self.bucket = bucket
        now = dt.datetime.now(dt.timezone.utc)
        amz_date = now.strftime("%Y%m%dT%H%M%SZ")
        datestamp = now.strftime("%Y%m%d")
        payload_hash = "UNSIGNED-PAYLOAD"
        scheme, host, canonical_uri = self._target(key)
        url = f"{scheme}://{host}{canonical_uri}"

        canonical_headers = f"host:{host}\nx-amz-content-sha256:{payload_hash}\nx-amz-date:{amz_date}\n"
        signed_headers = "host;x-amz-content-sha256;x-amz-date"
        canonical_request = "\n".join(
            [
                "GET",
                canonical_uri,
                "",
                canonical_headers,
                signed_headers,

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…