10
  .   ˆ{‹„„-i[D<†ªoZƒ›Ù«Â‚l"_‘I|¥‰ÓMdœv ©ƒ†ü+=ÂÁ      ‹      Õ•]oÚ0†ïû+<_ìÐn•ÚÄSG�†FQ¦iš¦Ê±±HìÈ>@Ù¯ŸCèJ'Ð>´Mâ&>N^Ÿ÷<'²½HFÝé§q�¼›ÞÈøÃÛA¿Khàãy ™&õ‡‹f«ÐRB3Äò
`½^7×çMëæ0�@†E~�Ø”();‹ªwìŒD™â2Œ$B�¹b}#Õ±3v‰^KÖm<HµÒByXi‡KžCš[±€ÜÚ²~™	ªb;¿t\¨ê|ÁvQjå¦rnÿE—�l[<O·fUèX„Yñ\ÏMLÑ–”Eº˜ïDLAk|ÈÌÍ¢9×3JxŽ1ýÜïŽ¾`V­f'™S³˜¾éÆÃëQœP6äEðã‡5·AsCÙ€{$…•z¦•<*¾«Åwúëñ„I­I”N—¨­y’ög¨Âæ¾ä�õU ÈÜ¾ª–ÈŸuƒ‹gÍßLzÃiÒŸÔ-‘UŠ§êþüŸQ6æN$‰vJ u›TíðÒ¤¾¼~œ’]ÉNÏ3¤Œ�9¨üÎ¥Y»6û¨¡�!¹Àû‚ûe�Ñ~©?ÔÖiu^7ÚíF§MZ—W�!G„a£¾ÿ�ÊTÛ‚²z<I yŸ§¼"Ø'ˆPêpÜ†Ç	–î‘;¬ûÿ=ü÷¿x°ÁîÈ�`{­DP_hß Î+ªû3       ˆÀ¿Ã599¾ÂÁ W    ‹      Õ–ßOÛ0Çßù+<?ì­½¤t Aâ‰5H«¥‚NÓ4MÈ�ÝÆ"±#ÛmVþú9u�0µZÑ
‚‡êÎÍ7w÷qÎ?¢wÉEoôcxŠ¾ŒÎÏÐðÛç³~áÀ÷ý@2Jüƒn;NáÌÚò ªªvµßVz
£KÈl‘wÁX-RÛf–a²Õÿ‘=eœ2gQd…Í9éKÆ#5A fÖÆÝ{ŒÏEÊMí[^@ZÎê_ R1@Á¥á~÷Ñ¸{�êÒÀ*O4VlQ§w�ÊE\bÐñ2cíjÙÍi.¦2ÆV•˜D¢˜"£ÓƒH•40Î©¼iOÅ#šÛÿì÷.~9Ø¬~›DešObü©Ž/â“-xt½æÜiN09£Æ¢B11œm_yñ•¸Ý0ñš„›T‹Ò
%¤à›¨©ÊMIëG�é¦ÊKØ¿fƒ¦�&cxry:%ýK?%¬ñPÝÿ|8L†TsiQ"4O­{¶Âò9ÞË±)�ï†hU´ÓÌb‚P­U>�t¢rÆu“uå]½Þ6«ü«¬NÐ9h…a+üˆÂÃ£à ¡g¬&o¤ªdÀ5ÂZ %s!9&ÞnÐ	QpxÔélpÎ×(³…¹öí…IcðVQD½ó­H–þkÙ~Q”ªâÚ-
owQÿ/
íö£y}V`rï¾–Ïðc©uKóZÊß¾‹Ìl¼:-Â½ÿ·ØŸ»³owðÂ}Tb×·JrƒIcðü=µåõV»–7ÈüöpQe#    C   ˆl–Ðz¾”Šj"Tâ‚À½q¶”Å£�þ_Í¬ãe#qº•à?Å„eÑ6ÏÄ_ŠI|¥�+Wé3ž¯ÄÃ ?÷     # Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

import os
import hmac
import atexit
from time import time
from hashlib import sha1

from libcloud.utils.py3 import b, httplib, urlquote, urlencode
from libcloud.common.base import Response, RawResponse
from libcloud.utils.files import read_in_chunks
from libcloud.common.types import LibcloudError, MalformedResponseError
from libcloud.storage.base import Object, Container, StorageDriver
from libcloud.storage.types import (
    ObjectDoesNotExistError,
    ObjectHashMismatchError,
    ContainerIsNotEmptyError,
    InvalidContainerNameError,
    ContainerDoesNotExistError,
    ContainerAlreadyExistsError,
)
from libcloud.common.openstack import OpenStackDriverMixin, OpenStackBaseConnection
from libcloud.common.rackspace import AUTH_URL
from libcloud.storage.providers import Provider

try:
    import simplejson as json
except ImportError:
    import json  # type: ignore

from io import FileIO as file

CDN_HOST = "cdn.clouddrive.com"
API_VERSION = "v1.0"

# Keys which are used to select a correct endpoint from the service catalog.
INTERNAL_ENDPOINT_KEY = "internalURL"
PUBLIC_ENDPOINT_KEY = "publicURL"


class CloudFilesResponse(Response):
    valid_response_codes = [httplib.NOT_FOUND, httplib.CONFLICT]

    def success(self):
        i = int(self.status)
        return 200 <= i <= 299 or i in self.valid_response_codes

    def parse_body(self):
        if not self.body:
            return None

        if "content-type" in self.headers:
            key = "content-type"
        elif "Content-Type" in self.headers:
            key = "Content-Type"
        else:
            raise LibcloudError("Missing content-type header")

        content_type = self.headers[key]
        if content_type.find(";") != -1:
            content_type = content_type.split(";")[0]

        if content_type == "application/json":
            try:
                data = json.loads(self.body)
            except Exception:
                raise MalformedResponseError(
                    "Failed to parse JSON",
         