On Tue, 11 Jul 2000, Wayne Smith wrote:
> On the error message:
>
> gcc -g -O2 -Wall -D_REENTRANT -I. -I../include -I../include -c -o
> client_side
> .o client_side.c
> client_side.c: In function `clientCheckContentLength':
> client_side.c:877: structure has no member named `content_length'
try this:
static int
clientCheckContentLength(request_t * r)
{
int cl = httpHeaderGetInt(&r->header, HDR_CONTENT_LENGTH);
/* We only require a content-length for "upload" methods */
switch (r->method) {
case METHOD_PUT:
case METHOD_POST:
/* PUT/POST requires a request entity */
return (cl >= 0);
case METHOD_GET:
case METHOD_HEAD:
/* We do not want to see a request entity on GET/HEAD requests */
return (cl <= 0);
default:
/* For other types of requests we don't care */
return 1;
}
/* NOT REACHED */
}
Received on Tue Jul 11 2000 - 11:03:20 MDT
This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:54:30 MST