/*
- * $Id: client_side.cc,v 1.293 1998/04/24 23:47:38 wessels Exp $
+ * $Id: client_side.cc,v 1.294 1998/04/27 19:55:10 wessels Exp $
*
* DEBUG: section 33 Client-side Routines
* AUTHOR: Duane Wessels
size = 0;
}
conn->in.offset += size;
+ /* Skip leading (and trailing) whitespace */
+ while (conn->in.offset > 0 && isspace(conn->in.buf[0])) {
+ xmemmove(conn->in.buf, conn->in.buf + 1, conn->in.offset - 1);
+ conn->in.offset--;
+ }
conn->in.buf[conn->in.offset] = '\0'; /* Terminate the string */
while (conn->in.offset > 0) {
int nrequests;
/*
- * $Id: http.cc,v 1.266 1998/04/27 19:52:48 wessels Exp $
+ * $Id: http.cc,v 1.267 1998/04/27 19:54:01 wessels Exp $
*
* DEBUG: section 11 Hypertext Transfer Protocol (HTTP)
* AUTHOR: Harvest Derived
clen >>= 1;
IOStats.Http.read_hist[bin]++;
}
+ if (!httpState->reply_hdr && len > 0) {
+ /* Skip whitespace */
+ while (len > 0 && isspace(*buf))
+ xmemmove(buf, buf + 1, len--);
+ if (len == 0) {
+ /* Continue to read... */
+ commSetSelect(fd, COMM_SELECT_READ, httpReadReply, httpState, 0);
+ return;
+ }
+ }
if (len < 0) {
debug(50, 2) ("httpReadReply: FD %d: read failure: %s.\n",
fd, xstrerror());