c      !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~                                  ! " # $ % & ' ()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab$cdefghijklmnopqrstuvwxyz{|}~cdefghijklmnqstucdefdefghhijjkllmnnqstuportable experimental!dominic.steinitz@blueyonder.co.uk BCut up a string into 72 char lines, each line terminated by CRLF. portable experimental!dominic.steinitz@blueyonder.co.uk Take [Octet] and return [Octet] according to the standard. H The length of the result is always 16 octets or 128 bits as required  by the standard. non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>?Streams should make layering of TLS protocol easier in future,  they allow reading/$writing to files etc for debugging, + they allow use of protocols other than TCP/IP  and they allow customisation. (Instances of this class should not trim - the input in any way, e.g. leave LF on line 3 endings etc. Unless that is exactly the behaviour ) you want from your twisted instances ;) <True => shutdown the connection when response has been read / end-of-stream  has been reached. >This is the type returned by many exported network functions.        non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com> crlf* is our beloved two-char line terminator. lf< is a tolerated line terminator, per RFC 2616 section 19.3. sp% lets you save typing one character. split delim ls# splits a list into two parts, the delim occurring % at the head of the second list. If delim isn't in ls, Nothing is  returned. trim str. removes leading and trailing whitespace from str.  trimL str+ removes leading whitespace (as defined by )  from str.  trimL str, removes trailing whitespace (as defined by )  from str. splitMany delim ls removes the delimiter delim from ls. readsOne f def str tries to  str , taking $ the first result and passing it to f . If the   doesn't succeed, return def. dropWhileTail p ls" chops off trailing elements from ls  until p returns False. chopAtDelim elt ls breaks up ls into two at first occurrence  of elt; elt is elided too. If elt does not occur, the second ) list is empty and the first is equal to ls.  non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>H HasHeaders= is a type class for types containing HTTP headers, allowing 7 you to write overloaded header manipulation functions  for both Request and Response data types, for instance. HTTP  HeaderName+ type, a Haskell data constructor for each - specification-defined header, prefixed with Hdr and CamelCased,  (i.e., eliding the -+ in the process.) Should you require using  a custom header, there's the  HdrCustom constructor which takes  a String argument. BEncoding HTTP header names differently, as Strings perhaps, is an 8 equally fine choice..no decidedly clear winner, but let's stick  with data constructors here. 1Allows for unrecognised or experimental headers. $MIME entity headers (for sub-parts)  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJThe Header data type pairs header names & values. KLMN4Header constructor as a function, hiding above rep. O headerMap@ is a straight assoc list for translating between header names  and values. PinsertHeader hdr val x- inserts a header with the given header name I and value. Does not check for existing headers with same name, allowing ! duplicates to be introduce (use R if you want to avoid this.) QinsertHeaderIfMissing hdr val x) adds the new header only if no previous  header with name hdr exists in x. RreplaceHeader hdr val o replaces the header hdr with the  value val, dropping any existing SinsertHeaders hdrs x appends multiple headers to x' s existing  set. TretrieveHeaders hdrNm x gets a list of headers with  hdrNm. UfindHeader hdrNm x looks up hdrNm in x, returning the first  header that matches, if any. VlookupHeader hdr hdrs# locates the first header matching hdr in the  list hdrs. W$parseHeader headerNameAndValueString tries to unscramble a   header: value pairing and returning it as a KJ. XparseHeaders hdrs, takes a sequence of strings holding header E information and parses them into a set of headers (preserving their C order in the input argument.) Handles header values split up over  multiple lines. H !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXHJKNLMIHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"! PQSTRUVWXOH4IHGFEDCBA@?>=<;:9876543210/.-,+*)('&%$#"!  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKKLMNOPQRSTUVWXnon-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>YCookie6 is the Haskell representation of HTTP cookie values. 3 See its relevant specs for authoritative details. Z[\]^_`acookieToHeader ck serialises a Cookie to an HTTP request header. bcookieMatch (domain,path) ck performs the standard cookie ' match wrt the given domain and path. c processCookieHeaders dom hdrs headerToCookies dom hdr acc YZ[\]^_`abc YZ[\]^_`bac YZ[\]^_`Z[\]^_`abc>Abstract representation of request and response buffer types. non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>dBufferOp encodes the I/,O operations of the underlying buffer over I a Handle in an (explicit) dictionary type. May not be needed, but gives I us flexibility in explicit overriding and wrapping up of these methods. JAlong with IO operations is an ad-hoc collection of functions for working E with these abstract buffers, as needed by the internals of the code ( that processes requests and responses. We supply three default BufferOp values, for String along with the  strict and lazy versions of  ByteString. To add others, provide BufferOp  definitions for efghijklmnopqrstThe  BufferType3 class encodes, in a mixed-mode way, the interface A that the library requires to operate over data embedded in HTTP ? requests and responses. That is, we use explicit dictionaries D for the operations, but overload the name of the dicts themselves. uvstrictBufferOp is the ed definition over  ByteStrings,  the non-lazy kind. w lazyBufferOp is the ed definition over  ByteStrings,  the non-strict kind. xstringBufferOp is the ed definition over Strings.  It is defined in terms of strictBufferOp operations,  unpacking/converting to String when needed. defghijklmnopqrstuvwxtudefghijklmnopqrsvwxdefghijklmnopqrsefghijklmnopqrstuuvwxnon-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>dyRequestNormalizer1 is the shape of a (pure) function that rewrites & a request into some normalized form. zNormalizeRequestOptions' brings together the various defaulting/normalization options  over s. Use & for the standard selection of option {|}~An HTTP Response.  The : instance of this type is used for message serialisation, B which means no body data is output, additionally the output will D show an HTTP version of 1.1 instead of the actual version returned  by a server.  RequestData. contains the head of a HTTP request; method, ! its URL along with the auxillary/supporting header data.  ResponseData* contains the head of a response payload; < HTTP response code, accompanying text description + header  fields. /For easy pattern matching, HTTP response codes xyz are  represented as (x,y,z). An HTTP Request.  The : instance of this type is used for message serialisation, % which means no body data is output. might need changing in future  1) to support  uri in OPTIONS request + 2) transparent support for both relative  &% absolute uris, although this should  already work (leave scheme & host parts empty). +The HTTP request method, to be used in the  object. = We are missing a few of the stranger methods, but these are - not really necessary until we add full TLS. #Parse the authority part of a URL.  RFC 1732, section 3.1:  4 //<user>:<password>@<host>:<port>/<url-path> @ Some or all of the parts "<user>:<password>@", ":<password>", 0 ":<port>", and "/<url-path>" may be excluded. 'mkRequest method uri' constructs a well formed 8 request for the given HTTP method and URI. It does not ; normalize the URI for the request _nor_ add the required : Host: header. That is done either explicitly by the user 8 or when requests are normalized prior to transmission. getRequestVersion req& returns the HTTP protocol version of  the request req. If Nothing, the default  can be assumed. setRequestVersion v req% returns a new request, identical to  req#, but with its HTTP version set to v. getResponseVersion rsp& returns the HTTP protocol version of  the response rsp. If Nothing, the default  can be  assumed. setResponseVersion v rsp& returns a new response, identical to  rsp#, but with its HTTP version set to v.  getAuth req9 fishes out the authority portion of the URL in a request's Host  header. normalizeRequest opts req- is the entry point to use to normalize your K request prior to transmission (or other use.) Normalization is controlled  via the NormalizeRequestOptions record. normalizeUserAgent ua x req augments the request req with  a User-Agent: ua header if req doesn't already have a  a  User-Agent: set. !normalizeConnectionClose opts req sets the header Connection: close # to indicate one-shot behavior iff  normDoClose is True. i.e., it then  _replaces_ any an existing  Connection: header in req. normalizeHostURI forProxy req" rewrites your request to have it G follow the expected formats by the receiving party (proxy or server.) 4Used when we know exactly how many bytes to expect. 'Used when nothing about data is known, . Unfortunately waiting for a socket closure ' causes bad behaviour. Here we just ( take data once and give up the rest. A necessary feature of HTTP/1.1 , Also the only transfer variety likely to  return any footers. 2Maybe in the future we will have a sensible thing 4 to do here, at that time we might want to change  the name. DRemove leading crlfs then call readTillEmpty2 (not required by RFC) 'Read lines until an empty line (CRLF), - also accepts a connection close as end of  input, which is not an HTTP/1.1 compliant * thing to do - so probably indicates an  error condition.  catchIO a hD handles IO action exceptions throughout codebase; version-specific  tweaks better go here. Uyz{|}~Uz{|}~yUyz{|}~{|}~ non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>5HStream overloads the use of s, letting you C overload the handle operations over the type that is communicated * across the handle. It comes in handy for  Network.HTTP Request  and Response#s as the payload representation isn't fixed, but overloaded. %The library comes with instances for  ByteStrings and String, but F should you want to plug in your own payload representation, defining  your own HStream) instance _should_ be all that it takes. The - newtype is a wrapper that allows us to make F connections an instance of the Stream class, without GHC extensions. D While this looks sort of like a generic reference to the transport = layer it is actually TCP specific, which can be seen in the  implementation of the 'Stream Connection' instance. openTCPPort uri port' establishes a connection to a remote  host, using / which possibly queries the DNS system, hence # may trigger a network connection. socketConnection, like openConnection but using a pre-existing . 4Checks both that the underlying Socket is connected 0 and that the connection peer matches the given ( host name (which is recorded locally). non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>!Allows stream logging. Refer to  below. Wraps a stream with logging I/O. 7 The first argument is a filename which is opened in  AppendMode. non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>)Exception handler for socket operations.  non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>& Algorithm# controls the digest algorithm to, MD5 or  MD5Session.  Authority5 specifies the HTTP Authentication method to use for  a given domain/realm; Basic or Digest.   withAuthority auth req( generates a credentials value from the auth , & in the context of the given request. iIf a client nonce was to be used then this function might need to be of type ... -> BrowserAction String  headerToChallenge base www_auth tries to convert the WWW-Authenticate header  www_auth into a  value.    "        )Sigbjorn Finne <sigbjorn.finne@gmail.com>  *HTTP proxies (or not) are represented via   , specifying if a + proxy should be used for the request (see Network.Browser.setProxy)  &Use the proxy given. Should be of the  form http://host:port, host,  host:port, or  http://host.  Additionally, an optional $ for authentication with the proxy. Don't use a proxy. envProxyString* locates proxy server settings by looking  up env variable  HTTP_PROXY! (or its lower-case equivalent.)  If no mapping found, returns Nothing.  proxyString tries to locate the user's proxy server setting. D Consults environment variable, and in case of Windows, by querying  the Registry (cf. registryProxyString.) fetchProxy flg4 gets the local proxy settings and parse the string  into a Proxy7 value. If you want to be informed of ill-formed proxy  configuration strings, supply True for flg. % Proxy settings are sourced from the  HTTP_PROXY environment variable, 7 and in the case of Windows platforms, by consulting IE/WinInet's proxy  setting in the Registry. parseProxy str) translates a proxy server string into a Proxy value;  returns Nothing if not well-formed. tidy up user portion, don't want the trailing @.         non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>  simpleHTTP: transmits a resource across a non-persistent connection. simpleHTTP_debug debugFile req behaves like  , but logs ' the HTTP operation via the debug file  debugFile. Like *, but acting on an already opened stream. sendHTTP hStream httpRequest transmits  httpRequest over  hStreamH, but does not alter the status of the connection, nor request it to be % closed upon receiving the response. *sendHTTP_notify hStream httpRequest action behaves like , but  lets you supply an IO action3 to execute once the request has been successfully L transmitted over the connection. Useful when you want to set up tracing of + request transmission and its performance. receiveHTTP hStream reads a  from the  hStream  respondHTTP hStream httpResponse transmits an HTTP  over  the  hStream+. It could be used to implement simple web 2 server interactions, performing the dual role to .  non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com> simpleHTTP req transmits the  req by opening a direct, non-persistent $ connection to the HTTP server that req+ is destined for, followed by transmitting ' it and gathering up the response as a  . Prior to sending the request,  it is normalized (via &). If you have to mediate the request R via an HTTP proxy, you will have to normalize the request yourself. Or switch to  using Network.Browser instead.  Examples: 7 simpleHTTP (getRequest "http://hackage.haskell.org/") < simpleHTTP (getRequest "http://hackage.haskell.org:8012/")  Identical to *, but acting on an already opened stream. sendHTTP hStream httpRequest transmits  httpRequest (after normalization) over  hStreamH, but does not alter the status of the connection, nor request it to be % closed upon receiving the response. *sendHTTP_notify hStream httpRequest action behaves like , but  lets you supply an IO action3 to execute once the request has been successfully L transmitted over the connection. Useful when you want to set up tracing of + request transmission and its performance. receiveHTTP hStream reads a  from the  hStream  respondHTTP hStream httpResponse transmits an HTTP  over  the  hStream+. It could be used to implement simple web 2 server interactions, performing the dual role to . getRequest urlString* is convenience constructor for basic GET s. If   urlString isn';t a syntactically valid URL, the function raises an error.  postRequest urlString% is convenience constructor for POST s. If   urlString isn';t a syntactically valid URL, the function raises an error. !getResponseBody response4 takes the response of a HTTP requesting action and $ tries to extricate the body of the  response. If the request action / returned an error, an IO exception is raised.  !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXyz{|}~ !  !  ! non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com> "FSimple way to transmit a resource across a non-persistent connection. #Like "*, but acting on an already opened stream. $%&HReceive and parse a HTTP request from the given Stream. Should be used ! for server side interactions. 'HVery simple function, send a HTTP response over the given stream. This 9 could be improved on to use different transfer types.  "#$%&'"#$%&'"#$%&'non-portable (not tested) experimental)Sigbjorn Finne <sigbjorn.finne@gmail.com>m()*++3 is the enumerated list of events that the browser 8 internals will report to a user-defined event handler. ,-./01 BrowserEvent; is the event record type that a user-defined handler, set  via _5, will be passed. It indicates various state changes * encountered in the processing of a given 7, along with timestamps  at which they occurred. 234567 RequestState8 is an internal tallying type keeping track of various I per-connection counters, like the number of authorization attempts and  forwards we've gone through. number of 401 responses so far number of redirects so far number of retries so far !whether to pre-empt 401 response 8 BrowserAction' is the IO monad, but carrying along a 9. 9 BrowserState1 is the (large) record type tracking the current  settings of the browser. :defaultCookieFilter* is the initial cookie acceptance filter. % It welcomes them all into the store :-) ;userCookieFilter* is a handy acceptance filter, asking the  user if he/3she is willing to accept an incoming cookie before  adding it to the store. < addCookie c: adds a cookie to the browser state, removing duplicates. =setCookies cookies& replaces the set of cookies known to  the browser to cookies). Useful when wanting to restore cookies  used across L invocations. > getCookies- returns the current set of cookies known to  the browser. ?setCookieFilter fn& sets the cookie acceptance filter to fn. @getCookieFilter/ returns the current cookie acceptance filter.  0Return authorities for a given domain and path.  Assumes dom is lower case AgetAuthorities return the current set of  Authoritys known  to the browser. BCDgetAuthorityGen) returns the current authority generator EsetAuthorityGen genAct sets the auth generator to genAct. FsetAllowBasicAuth onOff enables/$disables HTTP Basic Authentication. GHsetMaxAuthAttempts mbMax4 sets the maximum number of authentication attempts  to do. If Nothing, rever to default max. IgetMaxAuthAttempts+ returns the current max auth attempts. If Nothing,  the browser's default is used. JsetMaxErrorRetries mbMax( sets the maximum number of attempts at  transmitting a request. If Nothing, rever to default max. KgetMaxErrorRetries2 returns the current max number of error retries.   3Retrieve a likely looking authority for a Request.  *Asking the user to respond to a challenge L browse act% is the toplevel action to perform a 8.  Example use: %browse (request (getRequest yourURL)).  ,The default browser state has the settings Alter browser state MgetBrowserState, returns the current browser config. Useful  for restoring state across 8s. NwithBrowserAction st act performs act with 9 st. nextRequest act performs the browser action act as : the next request, i.e., setting up a new request context  before doing so. OLifts an IO action into the 8 monad. P setErrHandler! sets the IO action to call when 4 the browser reports running errors. To disable any  such, set it to const (return ()). Q setErrHandler! sets the IO action to call when : the browser chatters info on its running. To disable any  such, set it to const (return ()). RSTsetAllowRedirects onOff toggles the willingness to : follow redirects (HTTP responses with 3xx status codes). UgetAllowRedirects9 returns current setting of the do-chase-redirects flag. VsetMaxRedirects maxCount- sets the maxiumum number of forwarding hops L we are willing to jump through. A no-op if the count is negative; if zero, I the max is set to whatever default applies. Notice that setting the max  redirects count does not+ enable following of redirects itself; use  T to do so. WgetMaxRedirects9 returns the current setting for the max-redirect count.  If Nothing, the Network.Browser's default is used. X setProxy p will disable proxy usage if p is NoProxy.  If p is Proxy proxyURL mbAuth, then proxyURL is interpreted > as the URL of the proxy to use, possibly authenticating via   information in mbAuth. YgetProxy( returns the current proxy settings. If  the auto-proxy flag is set to True, getProxy will  perform the necessary ZsetCheckForProxy flg# sets the one-time check for proxy  flag to flg. If True$, the session will try to determine - the proxy server is locally configured. See   for details of how this done. [getCheckForProxy* returns the current check-proxy setting. & Notice that this may not be equal to True if the session has  set it to that via Z and subsequently performed C some HTTP protocol interactions. i.e., the flag return represents F whether a proxy will be checked for again before any future protocol  interactions. \setDebugLog mbFile turns off debug logging iff mbFile  is Nothing . If set to  Just fStem, logs of browser activity " is appended to files of the form fStem-url-authority, i.e.,  fStem8 is just the prefix for a set of log files, one per host/ authority. ]setUserAgent ua sets the current  User-Agent: string to ua. It P will be used if no explicit user agent header is found in subsequent requests. ^ getUserAgent returns the current  User-Agent: default string. _setEventHandler onBrowserEvent configures event handling.  If onBrowserEvent is Nothing , event handling is turned off;  setting it to  Just onEv causes the onEv IO action to be ? notified of browser events during the processing of a request  by the Browser pipeline. @The default number of hops we are willing not to go beyond for  request forwardings. ?The default number of error retries we are willing to perform. BThe default maximum HTTP Authentication attempts we will make for  a single request. .The default setting for auto-proxy detection. * You may change this within a session via setAutoProxyDetect. @ To avoid initial backwards compatibility issues, leave this as False. `request httpRequest tries to submit the   httpRequest + to some HTTP server (possibly going via a proxy, see X.) G Upon successful delivery, the URL where the response was fetched from  is returned along with the  itself. AInternal helper function, explicitly carrying along per-request  counts. -The internal request handling state machine. BMaximum number of open connections we are willing to have active. Return True: iff the package is able to handle requests and responses  over it. auriDefaultTo a b1 returns a URI that is consistent with the first  argument URI a, when read in the context of the second URI b. B If the second argument is not sufficient context for determining  a full URI then anarchy reins. bdYZ[\]^_`   ()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abh98  L`MNTUVW ABCDEFGJKHI?@:;YZ[\]^_`>=<PQ_123456+0/.-,7XYZ[\^]RSOba()*;())*+0/.-,,-./012345623456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`ab !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]]^_`abcdefghijklmnopqrstuvvwxyz{|}~                                                 !      ""#$%&'()**+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^__``aabbcdefghijklmnopqrstuvwxyz{|}~{ {    g                        HTTP-4000.1.2Network.StreamNetwork.HTTP.HeadersNetwork.HTTP.CookieNetwork.BufferTypeNetwork.HTTP.Base Network.TCPNetwork.StreamDebuggerNetwork.StreamSocketNetwork.HTTP.AuthNetwork.HTTP.ProxyNetwork.HTTP.HandleStream Network.HTTPNetwork.HTTP.StreamNetwork.BrowserNetwork.HTTP.MD5AuxNetwork.HTTP.Base64Network.HTTP.MD5Network.HTTP.UtilsStreamreadLine readBlock writeBlockclose closeOnEndResult ConnError ErrorMisc ErrorParse ErrorClosed ErrorResetfailMisc failParsefailWithbindEfmapE HeaderSetter HasHeaders getHeaders setHeaders HeaderName HdrCustomHdrContentTransferEncodingHdrLastModified HdrExpiresHdrETagHdrContentTypeHdrContentRange HdrContentMD5HdrContentLocationHdrContentLengthHdrContentLanguageHdrContentEncodingHdrContentBaseHdrAllowHdrWWWAuthenticate HdrWarningHdrVary HdrTrailerHdrTE HdrSetCookie HdrServer HdrRetryAfter HdrPublicHdrProxyAuthenticate HdrLocationHdrAge HdrUserAgent HdrRefererHdrRangeHdrProxyAuthorizationHdrMaxForwardsHdrIfUnmodifiedSince HdrIfRangeHdrIfNoneMatch HdrIfMatchHdrIfModifiedSinceHdrHostHdrFrom HdrExpect HdrCookieHdrAuthorizationHdrAcceptLanguageHdrAcceptEncodingHdrAcceptCharset HdrAcceptHdrVia HdrUpgradeHdrTransferEncoding HdrPragmaHdrDate HdrConnectionHdrCacheControlHeaderhdrNamehdrValuemkHeader headerMap insertHeaderinsertHeaderIfMissing replaceHeader insertHeadersretrieveHeaders findHeader lookupHeader parseHeader parseHeadersCookieMkCookieckDomainckNameckValueckPath ckComment ckVersioncookieToHeader cookieMatchprocessCookieHeadersBufferOpbuf_hGetbuf_hGetContentsbuf_hPut buf_hGetLine buf_empty buf_append buf_concat buf_fromStr buf_toStrbuf_snoc buf_splitAtbuf_spanbuf_isLineTerm buf_isEmpty BufferType bufferOpsstrictBufferOp lazyBufferOpstringBufferOpRequestNormalizerNormalizeRequestOptions normDoClose normForProxy normUserAgent normCustomsResponseNextStep DieHorribly ExpectEntityDoneRetryContinueResponserspCode rspReason rspHeadersrspBody RequestData ResponseData ResponseCodeRequestrqURIrqMethod rqHeadersrqBody HTTPResponse HTTPRequestResponse_StringRequest_String RequestMethodCustomCONNECTTRACEOPTIONSDELETEPOSTGETPUTHEAD URIAuthorityuserpasswordhostportparseURIAuthorityuriToAuthorityStringuriAuthToString uriAuthPort reqURIAuth httpVersionlibUAdefaultUserAgentdefaultGETRequestdefaultGETRequest_ mkRequestparseRequestHeadparseResponseHeadgetRequestVersionsetRequestVersiongetResponseVersionsetResponseVersion matchResponse urlDecode urlEncode urlEncodeVarsgetAuthnormalizeRequestURIdefaultNormalizeRequestOptionsnormalizeRequestsplitRequestURInormalizeHostHeader findConnCloselinearTransferhopefulTransferchunkedTransferuglyDeathTransferreadTillEmpty1readTillEmpty2catchIOcatchIO_responseParseErrorHStream openStreamopenSocketStream closeQuick StreamHooks hook_readLinehook_readBlockhook_writeBlock hook_close hook_name HandleStream ConnectionhstreamToConnection nullHookssetStreamHooksgetStreamHooks openTCPPortopenTCPConnectionsocketConnection isConnectedToisTCPConnectedToStreamDebugger debugStreamdebugByteStreamhandleSocketErrormyrecvQop QopAuthIntQopAuth Algorithm AlgMD5sessAlgMD5 Challenge ChalDigestchDomainchNoncechOpaquechStale chAlgorithmchQop ChalBasicchRealm Authority AuthDigestauNonce auAlgorithmauDomainauOpaqueauQop AuthBasicauRealm auUsername auPasswordauSite withAuthorityheaderToChallengeProxyNoProxynoProxy fetchProxy parseProxy simpleHTTPsimpleHTTP_debug simpleHTTP_sendHTTPsendHTTP_notify receiveHTTP respondHTTP getRequest postRequestgetResponseBodyFormFormVarBrowserEventTypeResponseFinish ResponseEnd RequestSentReuseConnectionOpenConnection BrowserEventbrowserTimestampbrowserRequestIDbrowserRequestURIbrowserEventType RequestID BrowserAction BrowserStatedefaultCookieFilteruserCookieFilter addCookie setCookies getCookiessetCookieFiltergetCookieFiltergetAuthoritiessetAuthorities addAuthoritygetAuthorityGensetAuthorityGensetAllowBasicAuthgetAllowBasicAuthsetMaxAuthAttemptsgetMaxAuthAttemptssetMaxErrorRetriesgetMaxErrorRetriesbrowsegetBrowserStatewithBrowserStateioAction setErrHandler setOutHandlerouterrsetAllowRedirectsgetAllowRedirectssetMaxRedirectsgetMaxRedirectssetProxygetProxysetCheckForProxygetCheckForProxy setDebugLog setUserAgent getUserAgentsetEventHandlerrequest uriDefaultTo formToRequestMD5get_nextlen_padfinishedWordListBoolListStrABCDRotationXYZZord64rotLmd5md5smd5imd5_main md5_do_block md5_roundmd5_inner_functionmd5_fmd5_gmd5_hmd5_i magic_numbersroundsabcd_to_stringdisplay_32bits_as_hexabcd_to_integerrev_numstring_to_word32sbools_to_word32slength_to_charsOctet encodeArray int4_char3 char3_int4enc1chop72 quadrupletsencdcdencodedecodehashcrlflfspsplittrimtrimLbase GHC.UnicodeisSpacetrimRsplitByreadsOne Text.Readread dropWhileTail chopAtDelimheaderToCookies quotedstringwordGHC.ShowShowGHC.Num* pURIAuthority pUserInfobefore orNothing rqMethodMaptoBufOps withVersiongetHttpVersionsetHttpVersiondropHttpVersion isHttpVersionnormalizeUserAgentnormalizeConnectionClosenormalizeHostURIchunkedTransferCConn ConnClosedMkConnconnSock connHandle connBuffer connInputconnHost connHooks connCloseEOFgetRef connHooks'network-2.3.0.8 Network.BSD getHostByNameopenTCPConnection_Network.SocketSocketsocketConnection_closeConnection readBlockBS readLineBS writeBlockBScloseItcloseEOFbufferGetBlockbufferPutBlockbufferReadLine onNonClosedDoDbgdebugStreamHooksreadBlockSocketreadLineSocketwriteBlockSocketstringToOctetsoctetsToString base64encodekdenvProxyString proxyStringregistryProxyString fixUserInfo uri2proxysendMainswitchResponsegetResponseHead headerName ifChunkeddebug httpLogFile RequestState reqDenies reqRedirects reqRetries reqStopOnDenyBAliftBSbsErrbsOut bsCookiesbsCookieFilterbsAuthorityGen bsAuthoritiesbsAllowRedirectsbsAllowBasicAuthbsMaxRedirectsbsMaxErrorRetriesbsMaxAuthAttemptsbsConnectionPool bsCheckProxybsProxybsDebugbsEvent bsRequestID bsUserAgent getCookiesFor getAuthFor pickChallengeanticipateChallengechallengeToAuthoritydefaultBrowserStatealterBSgetBS nextRequestnullRequestStatebuildBrowserEvent reportEventdefaultMaxRetriesdefaultMaxErrorRetriesdefaultMaxAuthAttemptsdefaultAutoProxyDetectrequest' dorequestupdateConnectionPool maxPoolSize handleCookies allowRedirectsupportedScheme