From 0cd2504f94d9a3897910abb1307ccdc803f4eae4 Mon Sep 17 00:00:00 2001 From: Alexei Kosut Date: Thu, 28 Nov 1996 08:34:05 +0000 Subject: [PATCH] Update *_client_block documentation to match Roy's changes. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@77087 13f79535-47bb-0310-9956-ffa450edef68 --- docs/manual/misc/client_block_api.html | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/docs/manual/misc/client_block_api.html b/docs/manual/misc/client_block_api.html index 2d1779f292..0c2fcaa097 100644 --- a/docs/manual/misc/client_block_api.html +++ b/docs/manual/misc/client_block_api.html @@ -26,7 +26,7 @@ accomplished while remaining backwards-compatible.

The New API Functions

-   int setup_client_block (request_rec *);
+   int setup_client_block (request_rec *, int read_policy);
    int should_client_block (request_rec *);
    long get_client_block (request_rec *, char *buffer, int buffer_size);
 
@@ -35,7 +35,20 @@ accomplished while remaining backwards-compatible.

  • Call setup_client_block() near the beginning of the request handler. This will set up all the neccessary properties, and will return either OK, or an error code. If the latter, - the module should return that error code. + the module should return that error code. The second parameter + selects the policy to apply if the request message indicates a + body, and how a chunked + transfer-coding sho uld be interpreted. Choose one of +
    +    REQUEST_NO_BODY          Send 413 error if message has any body
    +    REQUEST_CHUNKED_ERROR    Send 411 error if body without Content-Length
    +    REQUEST_CHUNKED_DECHUNK  If chunked, remove the chunks for me.
    +    REQUEST_CHUNKED_PASS     Pass the chunks to me without removal.
    +
    + In order to use the last two options, the caller MUST provide a buffer + large enough to hold a chunk-size line, including any extensions. + +
  • When you are ready to possibly accept input, call should_client_block(). @@ -52,8 +65,8 @@ accomplished while remaining backwards-compatible.

    buffer and its size. It will put data into the buffer (not neccessarily the full buffer, in the case of chunked inputs), and return the length of - the input block. When it is done reading, it will return 0, and - the module should proceed. + the input block. When it is done reading, it will + return 0 if EOF, or -1 if there was an error. -- 2.40.0