From 6ff4192069b98cee26939d156f952f4ee6a851f2 Mon Sep 17 00:00:00 2001 From: Robert James Kaes Date: Wed, 16 Apr 2003 16:37:59 +0000 Subject: Removed the remote_content_length field in the "conn" structure and replaced it with a smaller structure containing both the remote/server and the local/client content-length fields if they're present in the HTTP response headers. --- src/conns.c | 5 +++-- src/conns.h | 7 +++++-- 2 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/conns.c b/src/conns.c index 74590b1..8a0e038 100644 --- a/src/conns.c +++ b/src/conns.c @@ -1,4 +1,4 @@ -/* $Id: conns.c,v 1.14 2003-03-13 21:27:29 rjkaes Exp $ +/* $Id: conns.c,v 1.15 2003-04-16 16:37:59 rjkaes Exp $ * * Create and free the connection structure. One day there could be * other connection related tasks put here, but for now the header @@ -69,7 +69,8 @@ initialize_conn(int client_fd, const char* ipaddr, const char* string_addr) connptr->protocol.major = connptr->protocol.minor = 0; - connptr->remote_content_length = -1; + /* There is _no_ content length initially */ + connptr->content_length.server = connptr->content_length.client = -1; connptr->client_ip_addr = safestrdup(ipaddr); connptr->client_string_addr = safestrdup(string_addr); diff --git a/src/conns.h b/src/conns.h index 1357dc2..6e803d3 100644 --- a/src/conns.h +++ b/src/conns.h @@ -1,4 +1,4 @@ -/* $Id: conns.h,v 1.12 2003-03-13 21:27:29 rjkaes Exp $ +/* $Id: conns.h,v 1.13 2003-04-16 16:37:58 rjkaes Exp $ * * See 'conns.c' for a detailed description. * @@ -53,7 +53,10 @@ struct conn_s { char *error_string; /* A Content-Length value from the remote server */ - long remote_content_length; + struct { + long int server; + long int client; + } content_length; /* * Store the client's IP and hostname information -- cgit v1.2.3