1diff -ru orig/Aws/Core.hs new/Aws/Core.hs
2--- orig/Aws/Core.hs 2013-12-04 07:33:52.794606590 +0200
3+++ new/Aws/Core.hs 2013-12-04 07:33:51.000000000 +0200
6 import Data.Conduit (ResourceT, ($$+-))
7 import qualified Data.Conduit as C
8+import qualified Data.Conduit.List as CL
9+import Data.Default (def)
14 -- | Does not parse response. For debugging.
15 instance ResponseConsumer r (HTTP.Response L.ByteString) where
16 type ResponseMetadata (HTTP.Response L.ByteString) = ()
17- responseConsumer _ _ resp = HTTP.lbsResponse resp
18+ responseConsumer _ _ resp = do
19+ bss <- HTTP.responseBody resp $$+- CL.consume
21+ { HTTP.responseBody = L.fromChunks bss
24 -- | Class for responses that are fully loaded into memory
25 class AsMemoryResponse resp where
27 -- | Additional non-"amz" headers.
28 , sqOtherHeaders :: HTTP.RequestHeaders
29 -- | Request body (used with 'Post' and 'Put').
30+#if MIN_VERSION_http_conduit(2, 0, 0)
31+ , sqBody :: Maybe HTTP.RequestBody
33 , sqBody :: Maybe (HTTP.RequestBody (C.ResourceT IO))
35 -- | String to sign. Note that the string is already signed, this is passed mostly for debugging purposes.
36 , sqStringToSign :: B.ByteString
40 -- | Create a HTTP request from a 'SignedQuery' object.
41+#if MIN_VERSION_http_conduit(2, 0, 0)
42+queryToHttpRequest :: SignedQuery -> HTTP.Request
44 queryToHttpRequest :: SignedQuery -> HTTP.Request (C.ResourceT IO)
46 queryToHttpRequest SignedQuery{..}
49 HTTP.method = httpMethod sqMethod
50 , HTTP.secure = case sqProtocol of
52diff -ru orig/Aws/S3/Commands/GetObject.hs new/Aws/S3/Commands/GetObject.hs
53--- orig/Aws/S3/Commands/GetObject.hs 2013-12-04 07:33:52.794606590 +0200
54+++ new/Aws/S3/Commands/GetObject.hs 2013-12-04 07:33:51.000000000 +0200
56 import qualified Data.ByteString.Char8 as B8
57 import qualified Data.ByteString.Lazy as L
58 import qualified Data.Conduit as C
59+import qualified Data.Conduit.List as CL
61 import qualified Data.Text as T
62 import qualified Data.Text.Encoding as T
65 instance AsMemoryResponse GetObjectResponse where
66 type MemoryResponse GetObjectResponse = GetObjectMemoryResponse
67- loadToMemory (GetObjectResponse om x) = GetObjectMemoryResponse om <$> HTTP.lbsResponse x
68+ loadToMemory (GetObjectResponse om x) = do
69+ bss <- HTTP.responseBody x C.$$+- CL.consume
70+ return $ GetObjectMemoryResponse om x
71+ { HTTP.responseBody = L.fromChunks bss
73diff -ru orig/Aws/S3/Commands/PutObject.hs new/Aws/S3/Commands/PutObject.hs
74--- orig/Aws/S3/Commands/PutObject.hs 2013-12-04 07:33:52.794606590 +0200
75+++ new/Aws/S3/Commands/PutObject.hs 2013-12-04 07:33:51.000000000 +0200
78 module Aws.S3.Commands.PutObject
82 poAcl :: Maybe CannedAcl,
83 poStorageClass :: Maybe StorageClass,
84 poWebsiteRedirectLocation :: Maybe T.Text,
85+#if MIN_VERSION_http_conduit(2, 0, 0)
86+ poRequestBody :: HTTP.RequestBody,
88 poRequestBody :: HTTP.RequestBody (C.ResourceT IO),
90 poMetadata :: [(T.Text,T.Text)]
93+#if MIN_VERSION_http_conduit(2, 0, 0)
94+putObject :: Bucket -> T.Text -> HTTP.RequestBody -> PutObject
96 putObject :: Bucket -> T.Text -> HTTP.RequestBody (C.ResourceT IO) -> PutObject
98 putObject bucket obj body = PutObject obj bucket Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing Nothing body []
100 data PutObjectResponse
103 instance AsMemoryResponse PutObjectResponse where
104 type MemoryResponse PutObjectResponse = PutObjectResponse
105- loadToMemory = return
106\ No newline at end of file
107+ loadToMemory = return
108diff -ru orig/Aws/S3/Core.hs new/Aws/S3/Core.hs
109--- orig/Aws/S3/Core.hs 2013-12-04 07:33:52.794606590 +0200
110+++ new/Aws/S3/Core.hs 2013-12-04 07:33:51.000000000 +0200
113 module Aws.S3.Core where
117 , s3QContentMd5 :: Maybe MD5
118 , s3QAmzHeaders :: HTTP.RequestHeaders
119 , s3QOtherHeaders :: HTTP.RequestHeaders
120+#if MIN_VERSION_http_conduit(2, 0, 0)
121+ , s3QRequestBody :: Maybe HTTP.RequestBody
123 , s3QRequestBody :: Maybe (HTTP.RequestBody (C.ResourceT IO))
127 instance Show S3Query where
128diff -ru orig/aws.cabal new/aws.cabal
129--- orig/aws.cabal 2013-12-04 07:33:52.802606590 +0200
130+++ new/aws.cabal 2013-12-04 07:33:51.000000000 +0200
133 cryptohash >= 0.8 && < 0.12,
134 cryptohash-cryptoapi == 0.1.*,
135+ data-default == 0.5.*,
136 directory >= 1.0 && < 1.3,
137 failure >= 0.2.0.1 && < 0.3,
138 filepath >= 1.1 && < 1.4,
139- http-conduit >= 1.9 && < 1.10,
140+ http-conduit >= 1.9 && < 2.1,
141 http-types >= 0.7 && < 0.9,
142 lifted-base >= 0.1 && < 0.3,
143 monad-control >= 0.3,
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list