httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Morgan <rmor...@covalent.net>
Subject Re: cvs commit: httpd-2.0/server protocol.c
Date Mon, 12 Nov 2001 22:29:18 GMT

It would be even better if ap_getline would return an apr_status_t rather
than the number of bytes read.  This would allow callers of ap_getline to
detect errors like timeouts, etc from within ap_getline.  Currently we just
return the number of bytes read, or -1 on error.

The length parameter could be passed into the function and modified like
is done in apr calls that return data.

Thoughts anyone?  I could put together a patch if others see this as a
useful feature.

-Ryan

On Wed, Nov 07, 2001 at 05:41:22AM -0000, dougm@apache.org wrote:
> dougm       01/11/06 21:41:22
> 
>   Modified:    include  http_protocol.h
>                server   protocol.c
>   Log:
>   ap_getline() is useful to modules outside of the core..
>   change declaration from AP_CORE_DECLARE to AP_DECLARE so it can be used
>   used outside the core
>   
>   Revision  Changes    Path
>   1.66      +1 -1      httpd-2.0/include/http_protocol.h
>   
>   Index: http_protocol.h
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/include/http_protocol.h,v
>   retrieving revision 1.65
>   retrieving revision 1.66
>   diff -u -r1.65 -r1.66
>   --- http_protocol.h	2001/09/28 13:48:43	1.65
>   +++ http_protocol.h	2001/11/07 05:41:22	1.66
>   @@ -526,7 +526,7 @@
>     */
>    AP_CORE_DECLARE(void) ap_parse_uri(request_rec *r, const char *uri);
>    
>   -AP_CORE_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
>   +AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold);
>    
>    /**
>     * Get the method number associated with the given string, assumed to
>   
>   
>   
>   1.51      +1 -1      httpd-2.0/server/protocol.c
>   
>   Index: protocol.c
>   ===================================================================
>   RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
>   retrieving revision 1.50
>   retrieving revision 1.51
>   diff -u -r1.50 -r1.51
>   --- protocol.c	2001/10/31 21:14:23	1.50
>   +++ protocol.c	2001/11/07 05:41:22	1.51
>   @@ -198,7 +198,7 @@
>     *        If no LF is detected on the last line due to a dropped connection 
>     *        or a full buffer, that's considered an error.
>     */
>   -AP_CORE_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold)
>   +AP_DECLARE(int) ap_getline(char *s, int n, request_rec *r, int fold)
>    {
>        char *pos = s;
>        char *last_char;
>   
>   
>   

Mime
View raw message