Revision: 14763
Author: adrian.chadd
Date: Thu Aug 26 19:28:30 2010
Log: Flesh out what these functions do.


http://code.google.com/p/lusca-cache/source/detail?r=14763

Modified:
 /branches/LUSCA_HEAD/src/client_side_body.c

=======================================
--- /branches/LUSCA_HEAD/src/client_side_body.c Sat Feb 13 23:34:59 2010
+++ /branches/LUSCA_HEAD/src/client_side_body.c Thu Aug 26 19:28:30 2010
@@ -27,6 +27,27 @@
     }
 }

+/*!
+ * @function
+ *     clientEatRequestBody
+ *
+ * @abstract
+ *     Consume and discard request body data from the given
+ *     client connection.
+ *
+ * @discussion
+ *     This is called to eat all the request body data from a
+ *     client connection. This is used to begin aborting a
+ *     http request w/ a request body.
+ *
+ *     The eat body request handler will recursively call
+ *     itself until all incoming data is consumed. Subsequent
+ *     data which arrives on the client connection will be fed to
+ *     clientProcessBody() which will continue to consume
+ *     data until the end of the request.
+ *
+ * @param      http    client HTTP request to eat the request body of
+ */
 void
 clientEatRequestBody(clientHttpRequest * http)
 {
@@ -40,6 +61,30 @@
 }

 /* Called by clientReadRequest to process body content */
+/*!
+ * @function
+ *     clientProcessBody
+ *
+ * @abstract
+ *     Handle incoming request body data; call the request body
+ *     callback previously configured
+ *
+ * @discussion
+ *
+ *     clientProcessBody() assumes that conn->body.cbdata has been
+ *     set and has been cbdataRef()'ed. It will derefence the pointer
+ *     once the copying has completed and call the relevant callback
+ *     if needed.
+ *
+ *     clientProcessBody() assumes there is -some- data available.
+ *     It simply ignores processing if called with conn->in.offset == 0.
+ *     This means that conn->body.cbdata won't be unlocked. Calling
+ *     this function with conn.in.offset == 0 and not subsequently
+ *     deref'ing the cbdata will thus cause conn->body.cbdata
+ *     (likely a clientHttpRequest) to leak.
+ *
+ * @param      conn    The connection to handle request body data for
+ */
 void
 clientProcessBody(ConnStateData * conn)
 {

--
You received this message because you are subscribed to the Google Groups 
"lusca-commit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/lusca-commit?hl=en.

Reply via email to