Changeset View
Changeset View
Standalone View
Standalone View
swh/deposit/api/common.py
Show First 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | from ..errors import ( | ||||
MEDIATION_NOT_ALLOWED, | MEDIATION_NOT_ALLOWED, | ||||
METHOD_NOT_ALLOWED, | METHOD_NOT_ALLOWED, | ||||
NOT_FOUND, | NOT_FOUND, | ||||
PARSING_ERROR, | PARSING_ERROR, | ||||
DepositError, | DepositError, | ||||
ParserError, | ParserError, | ||||
) | ) | ||||
from ..models import DepositClient, DepositCollection, DepositRequest | from ..models import DepositClient, DepositCollection, DepositRequest | ||||
from ..parsers import parse_swh_reference, parse_xml | from ..parsers import parse_xml | ||||
from ..utils import parse_swh_reference | |||||
ACCEPT_PACKAGINGS = ["http://purl.org/net/sword/package/SimpleZip"] | ACCEPT_PACKAGINGS = ["http://purl.org/net/sword/package/SimpleZip"] | ||||
ACCEPT_ARCHIVE_CONTENT_TYPES = ["application/zip", "application/x-tar"] | ACCEPT_ARCHIVE_CONTENT_TYPES = ["application/zip", "application/x-tar"] | ||||
@attr.s | @attr.s | ||||
class ParsedRequestHeaders: | class ParsedRequestHeaders: | ||||
content_type = attr.ib(type=str) | content_type = attr.ib(type=str) | ||||
▲ Show 20 Lines • Show All 1,116 Lines • Show Last 20 Lines |