happstack-server-7.6.1: Web related tools and services.

Safe HaskellNone
LanguageHaskell2010

Happstack.Server.Internal.Multipart

Synopsis

Documentation

spanS :: (ByteString -> Bool) -> ByteString -> (ByteString, ByteString) Source #

similar to the normal span function, except the predicate gets the whole rest of the lazy bytestring, not just one character.

TODO: this function has not been profiled.

type FileSaver Source #

Arguments

 = FilePath

tempdir

-> Int64

quota

-> FilePath

filename of field

-> ByteString

content to save

-> IO (Bool, Int64, FilePath)

truncated?, saved bytes, saved filename

simpleInput :: String -> Input Source #

Packs a string into an Input of type "text/plain"

defaultInputType :: ContentType Source #

The default content-type for variables.

isBoundary Source #

Arguments

:: ByteString

The boundary, without the initial dashes

-> ByteString 
-> Bool 

Check whether a string starts with two dashes followed by the given boundary string.

startsWithDashes :: ByteString -> Bool Source #

Checks whether a string starts with two dashes.

splitAtCRLF Source #

Arguments

:: ByteString

String to split.

-> Maybe (ByteString, ByteString)

Returns Nothing if there is no CRLF.

Split a string at the first CRLF. The CRLF is not included in any of the returned strings.