/*
- * $Id: HttpRequest.cc,v 1.71 2007/04/06 04:50:04 rousskov Exp $
+ * $Id: HttpRequest.cc,v 1.72 2007/04/16 17:43:27 rousskov Exp $
*
* DEBUG: section 73 HTTP Request
* AUTHOR: Duane Wessels
return *this;
}
+bool
+HttpRequest::bodyNibbled() const {
+ return body_pipe != NULL && body_pipe->consumedSize() > 0;
+}
const char *HttpRequest::packableURI(bool full_uri) const
{
/*
- * $Id: HttpRequest.h,v 1.25 2007/04/06 04:50:04 rousskov Exp $
+ * $Id: HttpRequest.h,v 1.26 2007/04/16 17:43:27 rousskov Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
virtual bool expectingBody(method_t unused, ssize_t&) const;
+ bool bodyNibbled() const; // the request has a [partially] consumed body
+
int prefixLen();
void swapOut(StoreEntry * e);
/*
- * $Id: forward.cc,v 1.156 2007/04/15 14:46:16 serassio Exp $
+ * $Id: forward.cc,v 1.157 2007/04/16 17:43:27 rousskov Exp $
*
* DEBUG: section 17 Request Forwarding
* AUTHOR: Duane Wessels
if (flags.dont_retry)
return false;
- if (request->flags.body_sent)
+ if (request->bodyNibbled())
return false;
return true;
if (origin_tries > 1)
return 0;
- if (request->flags.body_sent)
+ if (request->bodyNibbled())
return 0;
assert(fs);
/*
- * $Id: structs.h,v 1.554 2007/04/15 14:46:17 serassio Exp $
+ * $Id: structs.h,v 1.555 2007/04/16 17:43:27 rousskov Exp $
*
*
* SQUID Web Proxy Cache http://www.squid-cache.org/
struct request_flags
{
- request_flags():range(0),nocache(0),ims(0),auth(0),cachable(0),hierarchical(0),loopdetect(0),proxy_keepalive(0),proxying(0),refresh(0),redirected(0),need_validation(0),accelerated(0),transparent(0),internal(0),internalclient(0),body_sent(0),must_keepalive(0),destinationIPLookedUp_(0)
+ request_flags():range(0),nocache(0),ims(0),auth(0),cachable(0),hierarchical(0),loopdetect(0),proxy_keepalive(0),proxying(0),refresh(0),redirected(0),need_validation(0),accelerated(0),transparent(0),internal(0),internalclient(0),must_keepalive(0),destinationIPLookedUp_(0)
{
#if HTTP_VIOLATIONS
nocache_hack = 0;
unsigned int internalclient:
1;
-unsigned int body_sent:
- 1;
-
unsigned int must_keepalive:
1;