Changeset 33749 in project


Ignore:
Timestamp:
11/19/16 15:02:07 (10 months ago)
Author:
sjamaan
Message:

Document new http-client parameter and procedure.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • wiki/eggref/4/http-client

    r33507 r33749  
    238238==== Connection management
    239239
     240This egg tries to re-use connections that are marked as keep-alive, to
     241avoid unnecessary overhead in establishing new connections when making
     242multiple requests to the same server.  This is handled through a pool
     243of idle connections from which the request procedures take the oldest
     244active connection.
     245
     246<parameter>(max-idle-connections [count])</parameter>
     247
     248This controls the maximum allowed idle connections at any given time.
     249When a connection would be returned to the pool, the connection will
     250be discarded instead, if the maximum is exceeded.
     251
     252This value should always be well below the maximum number of available
     253file descriptors for your operating system.
     254
     255Defaults to {{32}}.
     256
     257
    240258<procedure>(close-connection! uri)</procedure>
    241259
    242260Close the connection to the server associated with the URI.
    243261
     262<procedure>(close-idle-connections!)</procedure>
     263
     264Close all remaining idle connections.  Note that connections that are
     265currently in use will still be returned to the connection pool after
     266their requests finish!
     267
    244268<procedure>(close-all-connections!)</procedure>
    245269
    246 Close all connections to all servers.
     270Deprecated alias for {{close-idle-connections!}}.
    247271
    248272==== Setting up custom server connections
     
    487511=== Changelog
    488512
     513* trunk Add {{max-idle-connections}} to avoid FD exhaustion (thanks to [[/users/alaric-blagrave-snellpym|Alaric]] for pointing out this issue).
    489514* 0.10 Do not read {{HTTP_PROXY}} if {{REQUEST_METHOD}} is present (running in a CGI script), to prevent "[[https://httpoxy.org|httpoxy]]" attack (CVE-2016-6287).
    490515* 0.9 Add support for custom connector procedures.  Thanks to Ryan Senior for suggesting support for https client certificates, which this makes possible.
Note: See TracChangeset for help on using the changeset viewer.