From: PHO Date: Mon, 31 Oct 2011 17:24:18 +0000 (+0900) Subject: Haddock comments X-Git-Url: http://git.cielonegro.org/gitweb.cgi?p=Lucu.git;a=commitdiff_plain;h=9b2a30d Haddock comments Ditz-issue: 8959dadc07db1bd363283dee401073f6e48dc7fa --- diff --git a/Network/HTTP/Lucu/MultipartForm.hs b/Network/HTTP/Lucu/MultipartForm.hs index edba0d5..a04b4a0 100644 --- a/Network/HTTP/Lucu/MultipartForm.hs +++ b/Network/HTTP/Lucu/MultipartForm.hs @@ -47,8 +47,11 @@ import Prelude.Unicode -- name. data FormData = FormData { + -- | @'Nothing'@ for non-file values. fdFileName ∷ !(Maybe Text) + -- | MIME Type of this value, defaulted to \"text/plain\". , fdMIMEType ∷ !MIMEType + -- | The form value. , fdContent ∷ !(LS.ByteString) } @@ -77,13 +80,13 @@ printContDispo d -- limitations: -- -- * Multiple files embedded as \"multipart/mixed\" within the --- \"multipart/form-data\" aren't decomposed. +-- \"multipart/form-data\" won't be decomposed. -- --- * \"Content-Transfer-Encoding\"s are always ignored. +-- * \"Content-Transfer-Encoding\" is always ignored. -- -- * RFC 2388 says that non-ASCII field names are encoded according -- to the method in RFC 2047 --- , but they aren't +-- , but they won't be -- decoded. parseMultipartFormData ∷ Ascii -- ^boundary → LS.ByteString -- ^input diff --git a/Network/HTTP/Lucu/Resource.hs b/Network/HTTP/Lucu/Resource.hs index 6463bc8..aee29d5 100644 --- a/Network/HTTP/Lucu/Resource.hs +++ b/Network/HTTP/Lucu/Resource.hs @@ -55,7 +55,7 @@ -- automatically completes it depending on the status code. (To be -- exact, such completion only occurs when the 'Resource' transits -- to this state without even declaring the \"Content-Type\" header --- field. See 'setContentType'.) +-- field. See: 'setContentType') -- -- [/Done/] Everything is over. A 'Resource' can do nothing for the -- HTTP interaction anymore. @@ -207,8 +207,8 @@ getRequestVersion = reqVersion <$> getRequest -- |This is an analogy of CGI PATH_INFO. 'getPathInfo' always returns -- @[]@ if the corresponding --- 'Network.HTTP.Lucu.Resource.Tree.ResourceDef' is not greedy. See --- 'getResourcePath'. +-- 'Network.HTTP.Lucu.Resource.Tree.ResourceDef' is not greedy. See: +-- 'getResourcePath' -- -- Note that the returned path components are URI-decoded. getPathInfo ∷ Resource [Strict.ByteString] @@ -578,7 +578,7 @@ getChunks' limit = go limit (∅) -- with \"400 Bad Request\". -- -- Note that there are currently a few limitations on parsing --- @multipart/form-data@. See 'parseMultipartFormData' +-- @multipart/form-data@. See: 'parseMultipartFormData' getForm ∷ Maybe Int → Resource [(Strict.ByteString, FormData)] getForm limit = do cTypeM ← getContentType @@ -678,7 +678,7 @@ setWWWAuthenticate = setHeader "WWW-Authenticate" ∘ printAuthChallenge -- |Write a chunk in 'Strict.ByteString' to the response body. You -- must first declare the response header \"Content-Type\" before --- applying this function. See 'setContentType'. +-- applying this function. See: 'setContentType' putChunk ∷ Strict.ByteString → Resource () putChunk = putBuilder ∘ BB.fromByteString @@ -686,7 +686,7 @@ putChunk = putBuilder ∘ BB.fromByteString -- can be safely applied to an infinitely long 'Lazy.ByteString'. -- -- Note that you must first declare the response header --- \"Content-Type\" before applying this function. See --- 'setContentType'. +-- \"Content-Type\" before applying this function. See: +-- 'setContentType' putChunks ∷ Lazy.ByteString → Resource () putChunks = putBuilder ∘ BB.fromLazyByteString diff --git a/Network/HTTP/Lucu/Resource/Internal.hs b/Network/HTTP/Lucu/Resource/Internal.hs index 0a1f89f..f43ec6c 100644 --- a/Network/HTTP/Lucu/Resource/Internal.hs +++ b/Network/HTTP/Lucu/Resource/Internal.hs @@ -361,8 +361,8 @@ deleteHeader name = liftIO ∘ atomically ∘ go =≪ getInteraction -- infinitely long stream of octets. -- -- Note that you must first declare the response header --- \"Content-Type\" before applying this function. See --- 'setContentType'. +-- \"Content-Type\" before applying this function. See: +-- 'setContentType' putBuilder ∷ Builder → Resource () putBuilder b = liftIO ∘ atomically ∘ go =≪ getInteraction where