gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] r12572 - libmicrohttpd/doc


From: gnunet
Subject: [GNUnet-SVN] r12572 - libmicrohttpd/doc
Date: Mon, 16 Aug 2010 14:33:19 +0200

Author: grothoff
Date: 2010-08-16 14:33:19 +0200 (Mon, 16 Aug 2010)
New Revision: 12572

Modified:
   libmicrohttpd/doc/microhttpd.texi
Log:
document problem DV had

Modified: libmicrohttpd/doc/microhttpd.texi
===================================================================
--- libmicrohttpd/doc/microhttpd.texi   2010-08-16 11:50:43 UTC (rev 12571)
+++ libmicrohttpd/doc/microhttpd.texi   2010-08-16 12:33:19 UTC (rev 12572)
@@ -311,8 +311,29 @@
 @code{unsigned int}).  The default is @code{FD_SETSIZE - 4} (the
 maximum number of file descriptors supported by @code{select} minus
 four for @code{stdin}, @code{stdout}, @code{stderr} and the server
-socket).  In other words, the default is as large as possible.
+socket).  In other words, the default is as large as possible.  
 
+Note that if you set a low connection limit, you can easily get into
+trouble with browsers doing request pipelining.  For example, if your
+connection limit is ``1'', a browser may open a first connection to
+access your ``index.html'' file, keep it open but use a second 
+connection to retrieve CSS files, images and the like.  In fact, modern
+browsers are typically by default configured for up to 15 parallel
+connections to a single server.  If this happens, MHD will refuse to
+even accept the second connection until the first connection is
+closed --- which does not happen until timeout.  As a result, the
+browser will fail to render the page and seem to hang.  If you expect
+your server to operate close to the connection limit, you should 
+first consider using a lower timeout value and also possibly add
+a ``Connection: close'' header to your response to ensure that
+request pipelining is not used and connections are closed immediately
+after the request has completed:
address@hidden
+MHD_add_response_header (response,
+                         MHD_HTTP_HEADER_CONNECTION,
+                         "close");
address@hidden example
+
 @item MHD_OPTION_CONNECTION_TIMEOUT
 @cindex timeout
 After how many seconds of inactivity should a connection automatically




reply via email to

[Prev in Thread] Current Thread [Next in Thread]