From 2aecf1210f2f6dd2c7836bfee087d1d4ca63fa63 Mon Sep 17 00:00:00 2001 From: wessels <> Date: Mon, 17 Aug 1998 22:38:07 +0000 Subject: [PATCH] moved clientAccessCheck() call to AFTER a block for non-GET requests to copy body bytes and maybe disable read handlers. This was done because in the experimental optimistic-IO code, the request is DONE after the clientAccessCheck call, and the request data structure has been freed, resulting in FMR's etc. It works here only because we have at least one select loop without optimistic IO before the request is complete. --- src/client_side.cc | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/client_side.cc b/src/client_side.cc index 86aafde929..b3a6fe6ab4 100644 --- a/src/client_side.cc +++ b/src/client_side.cc @@ -1,6 +1,6 @@ /* - * $Id: client_side.cc,v 1.378 1998/08/16 06:35:15 wessels Exp $ + * $Id: client_side.cc,v 1.379 1998/08/17 16:38:07 wessels Exp $ * * DEBUG: section 33 Client-side Routines * AUTHOR: Duane Wessels @@ -2101,7 +2101,6 @@ clientReadRequest(int fd, void *data) break; } http->request = requestLink(request); - clientAccessCheck(http); /* * break here for NON-GET because most likely there is a * reqeust body following and we don't want to parse it @@ -2120,12 +2119,14 @@ clientReadRequest(int fd, void *data) xmemmove(conn->in.buf, conn->in.buf + copy_len, conn->in.offset); } /* - * ick; cancel the read handler for NON-GET requests - * until this request is forwarded/resolved + * if we didn't get the full body now, then more will + * be arriving on the client socket. Lets cancel + * the read handler until this request gets forwarded. */ - commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0); - break; + if (request->body_sz < cont_len) + commSetSelect(fd, COMM_SELECT_READ, NULL, NULL, 0); } + clientAccessCheck(http); continue; /* while offset > 0 */ } else if (parser_return_code == 0) { /* -- 2.47.3