úΛ-”ēK      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJ AAn Amazon Web Services connection. Everything needed to connect  and authenticate requests. Service provider hostname Service provider port number Access Key ID Secret Access Key &Hostname used for connecting to Amazon's production S3 service (s3.amazonaws.com). )Port number used for connecting to Amazon's production S3 service (80). >Create an AWSConnection to Amazon from credentials. Uses the  production service. Access Key ID Secret Access Key Connection to Amazon S3 ;Retrieve Access and Secret keys from environment variables > AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY, respectively. ; Either variable being undefined or empty will result in  K.     BAn error from an S3 request, either at the network layer, or from  S3 itself. AWSError code message% constructs an error message from S3  itself. See   Hhttp://docs.amazonwebservices.com/AmazonS3/2006-03-01/ErrorCodeList.html * for a detailed list of possible codes. 'Connection error at the network layer. ?A result from processing a request to S3. Either some success  value, or a . Pretty print an error message. /$An action to be performed using S3. *Connection and authentication information 'Name of bucket to act on (URL encoded) 'Name of object to act on (URL encoded) 'Query parameters (requires a prefix of ?) !Additional header fields to send  Body of action, if sending data Type of action, L, M, etc. N Transform an % into an HTTP request. Does not add A authentication or date information, so it is not suitable for  sending directly to AWS. Action to transform 'Action represented as an HTTP Request. OCreate PQ objects from an action. RInspect HTTP body, and add a Content-Length header with the  correct length. S2Add AWS authentication header to an HTTP request.  Action with authentication data Request to transform Authenticated request T2Sign a string using the given authentication data  Action with authentication data String to sign Base-64 encoded signature U@Generate text that will be signed and subsequently added to the  request. V(Extract header data needed for signing. WExtract x-amz-* headers needed for signing. B find all headers with type HdrCustom that begin with amzHeader  lowercase key names $ sort lexigraphically by key name " combine headers with same name  unfold multi-line headers % trim whitespace around the header X=Give the string representation of a (key,value) header pair. ) Uses rules for authenticated headers. Y8Replace CRLF followed by whitespace with a single space Z strip leading/trailing whitespace [Combine same-named headers. \2Headers with same name should have values merged. ]"Group headers with the same name. ^Sort by key name. _Make PQ* easier to work with, and lowercase keys. 2Determine if a header belongs in the StringToSign `*is the first list a prefix of the second? a'Prefix used by Amazon metadata headers b0Extract resource name, as required for signing. c Add a date string to a request. Request to modify  Date string, in RFC 2616 format Request with date header added d%Add an expiration date to a request. e$Attach an HTTP header to a request. f8Get hostname to connect to. Needed for european buckets g/Get current time in HTTP 1.1 format (RFC 2616) + Numeric time zones should be used, but I'd rather not subvert the E intent of ctTZName, so we stick with the name format. Otherwise,  we could send +0000 instead of GMT.  see:   #http://www.ietf.org/rfc/rfc2616.txt   #http://www.ietf.org/rfc/rfc1123.txt   "http://www.ietf.org/rfc/rfc822.txt h'Convenience for dealing with HMAC-SHA1 @Construct the request specified by an S3Action, send to Amazon, 6 and return the response. Todo: add MD5 signature. i#Construct a pre-signed URI, but don't act on it. This is useful E for when an expiration date has been set, and the URI needs to be  passed on to a client. Action with resource "Expiration time, in seconds since # 00:00:00 UTC on January 1, 1970 URI of resource j=Inspect a response for network errors, HTTP error codes, and  Amazon error messages. I We need the original action in case we get a 307 (temporary redirect) k=Find the errors embedded in an XML message body from Amazon. Find children of Error entity, use their Code and Message  entities to create an . lNDecode a mime string, we know about quoted printable and base64 encoded UTF-8 + S3 may convert quoted printable to base64 mn op   !4An object that can be stored and retrieved from S3. "#*Name of the bucket containing this object $"URI of the object. Subresources (?acl or  | ?torrent%) should be suffixed onto this name. %2A standard MIME type describing the format of the  contents. If not specified, binary/ octet-stream is  used. &1Object metadata in (key,value) pairs. Key names  should use the prefix  x-amz-meta- to be stored with : the object. The total HTTP request must be under 4KB,  including these headers. ' Object data. (Send data for an object. AWS connection information Object to add to a bucket Server response )ACreate a pre-signed request URI. Anyone can use this to request ' an object until the specified date. AWS connection information Object to be made available "Expiration time, in seconds since # 00:00:00 UTC on January 1, 1970 URI for the object *ACreate a pre-signed request URI. Anyone can use this to request 2 an object for the number of seconds specified. AWS connection information Object to be made available How many seconds until this  request expires URI for the object +Retrieve an object. AWS connection information Object to retrieve Server response ,=Get object info without retrieving content body from server. AWS connection information "Object to retrieve information on Server response q%Get an object with specified method.  Method to use for retrieval (GET/HEAD) AWS connection Object to request r-:Delete an object. Only bucket and object name need to be A specified in the S3Object. Deletion of a non-existent object  does not return an error. AWS connection information Object to delete Server response .=Copy object from one bucket to another (or the same bucket). AWS connection information Source object Destination object Server response !"#$%&'()*+,-.(.+,-*)!"#$%&'!"#$%&'"#$%&'()*+,-.'/$Is a result set response truncated? 0Result from listing objects. 12Name of object 3Last modification date 4MD5 5Bytes of object data 6List request parameters 789:;<=>?@>Create a new bucket on S3 with the given prefix, and a random ? suffix. This can be used to programatically create buckets  without of naming conflicts. AWS connection information Bucket name prefix US or EU Server response, if  successful, the bucket  name is returned. A7see createBucketWithPrefixIn, but hardcoded for the US AWS connection information Bucket name prefix "Server response, with bucket name sB/Create a new bucket on S3 with the given name. AWS connection information Proposed bucket name US or EU Server response C/Create a new bucket on S3 with the given name. AWS connection information Proposed bucket name Server response D!Physical location of the bucket. US or EU AWS connection information  Bucket name Server response (US or EU) tuE?Delete a bucket with the given name on S3. The bucket must be " empty for deletion to succeed. AWS connection information Bucket name to delete Server response F=Empty a bucket of all objects. Iterates through all objects A issuing delete commands, so time is proportional to number of B objects in the bucket. At this time, delete requests are free  from Amazon. AWS connection information Bucket name to empty Server response vCDelete a list of objects, stop as soon as an error is encountered. G:Return a list of all bucket names and creation dates. S3 - allows a maximum of 100 buckets per user. AWS connection information Server response wxH3List objects in a bucket, based on parameters from 76. See E the Amazon S3 developer resources for in depth explanation of how  the fields in 76# can be used to query for objects.   Mhttp://docs.amazonwebservices.com/AmazonS3/2006-03-01/ListingKeysRequest.html AWS connection information Bucket name to search List parameters Server response IFRepeatedly query the server for all objects in a bucket, ignoring the max_keys field. AWS connection information Bucket name to search List parameters Server response yADetermine if ListBucketResult is truncated. It would make sense > to combine this with the query for list results, so we didn't  have to parse the XML twice. z{|JLCheck Amazon guidelines on bucket naming. (missing test for IP-like names) }Remove quote characters from a ~. /0123456789:;<=>?@ABCDEFGHIJBC@AEDFGHIJ<=>?6789:;012345//012345123456789:;789:;<=>?=>?@ABCDEFGHIJ       !"#$%&&'()*+,-./012344567899:;<=>>?@ABCDEFGHIJKLMNOPQOPRSTOUVOUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~€‚Lƒ„… hS3-0.5.2Network.AWS.ArrowUtilsNetwork.AWS.AWSConnectionNetwork.AWS.AWSResultNetwork.AWS.AuthenticationNetwork.AWS.S3ObjectNetwork.AWS.S3BucketsplitunsplitatTagtext AWSConnectionawsHostawsPort awsAccessKey awsSecretKeydefaultAmazonS3HostdefaultAmazonS3PortamazonS3ConnectionamazonS3ConnectionFromEnvReqErrorAWSError NetworkError AWSResultprettyReqErrorS3Actions3conns3buckets3objects3query s3metadatas3body s3operation isAmzHeader runAction preSignedURI mimeDecode mimeEncodeQPS3Object obj_bucketobj_name content_type obj_headersobj_data sendObjectpublicUriUntilTimepublicUriForSeconds getObject getObjectInfo deleteObject copyObject IsTruncated ListResultkey last_modifiedetagsize ListRequestprefixmarker delimitermax_keysS3Bucket bucket_namebucket_creation_datecreateBucketWithPrefixIncreateBucketWithPrefixcreateBucketIn createBucketgetBucketLocation deleteBucket emptyBucket listBuckets listObjectslistAllObjectsisBucketNameValidbase Data.MaybeNothing HTTP-4000.0.9Network.HTTP.BasePUTGETrequestFromActionheadersFromActionNetwork.HTTP.HeadersHeaderaddContentLengthHeaderaddAuthenticationHeader makeSignature stringToSigncanonicalizeHeaderscanonicalizeAmzHeaders showHeaderfold_whitespaceremoveLeadingTrailingWhitespacecombineHeadersmergeSameHeaders groupHeaders sortHeadersheaderToLCKeyValueisPrefix amzHeadercanonicalizeResource addDateToReqaddExpirationToReqaddHeaderToReq s3HostnamehttpCurrentDate string2words runAction'createAWSResultparseRestErrorXML mimeDecodeQP mimeDecodeQP' mimeDecodeB64 mimeEncodeQP' reservedChargetObjectWithMethodheadersFromResponse randomNameparseBucketLocationXMLprocessLocation deleteObjectsparseBucketListXMLprocessBucketsisListTruncatedprocessTruncationgetListResultsprocessListResultsunquoteGHC.BaseString