TrafficMode flags; ///< flags indicating what type of traffic to expect via this port.
- unsigned int allow_direct:1; /**< Allow direct forwarding in accelerator mode */
- unsigned int vhost:1; /**< uses host header */
- unsigned int actAsOrigin:1; ///< update replies to conform with RFC 2616
- unsigned int ignore_cc:1; /**< Ignore request Cache-Control directives */
+ bool allow_direct; ///< Allow direct forwarding in accelerator mode
+ bool vhost; ///< uses host header
+ bool actAsOrigin; ///< update replies to conform with RFC 2616
+ bool ignore_cc; ///< Ignore request Cache-Control directives
- int vport; /* virtual port support, -1 for dynamic, >0 static*/
- bool connection_auth_disabled; /* Don't support connection oriented auth */
+ bool connection_auth_disabled; ///< Don't support connection oriented auth
+
+ int vport; ///< virtual port support. -1 if dynamic, >0 static
int disable_pmtu_discovery;
struct {
- unsigned int enabled;
unsigned int idle;
unsigned int interval;
unsigned int timeout;
+ bool enabled;
} tcp_keepalive;
/**
self_destruct();
}
s->flags.accelSurrogate = true;
- s->vhost = 1;
+ s->vhost = true;
} else if (strcmp(token, "transparent") == 0 || strcmp(token, "intercept") == 0) {
if (s->flags.accelSurrogate || s->flags.tproxyIntercept) {
debugs(3, DBG_CRITICAL, "FATAL: http(s)_port: Intercept mode requires its own interception port. It cannot be shared with other modes.");
debugs(3, DBG_CRITICAL, "WARNING: http(s)_port: vhost option is deprecated. Use 'accel' mode flag instead.");
}
s->flags.accelSurrogate = true;
- s->vhost = 1;
+ s->vhost = true;
} else if (strcmp(token, "no-vhost") == 0) {
if (!s->flags.accelSurrogate) {
debugs(3, DBG_IMPORTANT, "ERROR: http(s)_port: no-vhost option requires Acceleration mode flag.");
}
- s->vhost = 0;
+ s->vhost = false;
} else if (strcmp(token, "vport") == 0) {
if (!s->flags.accelSurrogate) {
debugs(3, DBG_CRITICAL, "FATAL: http(s)_port: vport option requires Acceleration mode flag.");
debugs(3, DBG_CRITICAL, "FATAL: http(s)_port: allow-direct option requires Acceleration mode flag.");
self_destruct();
}
- s->allow_direct = 1;
+ s->allow_direct = true;
} else if (strcmp(token, "act-as-origin") == 0) {
if (!s->flags.accelSurrogate) {
debugs(3, DBG_IMPORTANT, "ERROR: http(s)_port: act-as-origin option requires Acceleration mode flag.");
} else
- s->actAsOrigin = 1;
+ s->actAsOrigin = true;
} else if (strcmp(token, "ignore-cc") == 0) {
#if !USE_HTTP_VIOLATIONS
if (!s->flags.accelSurrogate) {
self_destruct();
}
#endif
- s->ignore_cc = 1;
+ s->ignore_cc = true;
} else if (strncmp(token, "name=", 5) == 0) {
safe_free(s->name);
s->name = xstrdup(token + 5);
self_destruct();
}
} else if (strcmp(token, "tcpkeepalive") == 0) {
- s->tcp_keepalive.enabled = 1;
+ s->tcp_keepalive.enabled = true;
} else if (strncmp(token, "tcpkeepalive=", 13) == 0) {
char *t = token + 13;
- s->tcp_keepalive.enabled = 1;
+ s->tcp_keepalive.enabled = true;
s->tcp_keepalive.idle = xatoui(t);
t = strchr(t, ',');
if (t) {