templates/ERR_NO_RELAY \
templates/ERR_ONLY_IF_CACHED_MISS \
templates/ERR_PRECONDITION_FAILED \
+ templates/ERR_PROTOCOL_UNKNOWN \
templates/ERR_READ_ERROR \
templates/ERR_READ_TIMEOUT \
templates/ERR_SECURE_CONNECT_FAIL \
templates/ERR_UNSUP_REQ \
templates/ERR_URN_RESOLVE \
templates/ERR_WRITE_ERROR \
- templates/ERR_ZERO_SIZE_OBJECT \
- templates/ERR_PROTOCOL_UNKNOWN
+ templates/ERR_ZERO_SIZE_OBJECT
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html><head>
-<meta type="copyright" content="Copyright (C) 1996-2014 The Squid Software Foundation and contributors">
+<meta type="copyright" content="Copyright (C) 1996-2015 The Squid Software Foundation and contributors">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>ERROR: The requested URL could not be retrieved</title>
<style type="text/css"><!--
ACL::Prototype ACLSquidError::RegistryProtoype(&ACLSquidError::RegistryEntry_, "squid_error");
ACLStrategised<err_type> ACLSquidError::RegistryEntry_(new ACLSquidErrorData, ACLSquidErrorStrategy::Instance(), "squid_error");
+
/*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
}
ACLSquidErrorStrategy ACLSquidErrorStrategy::Instance_;
+
/*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
};
#endif /* SQUID_ACLSQUIDERROR_H */
+
/*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
/*
- * Copyright (C) 1996-2014 The Squid Software Foundation and contributors
+ * Copyright (C) 1996-2015 The Squid Software Foundation and contributors
*
* Squid software is distributed under GPLv2+ license and includes
* contributions from numerous individuals and organizations.
};
#endif //SQUID_ACLSQUIDERRORDATA_H
+
static void
parse_on_unsupported_protocol(acl_access **access)
{
- char *tm;
+ char *tm;
if ((tm = ConfigParser::NextToken()) == NULL) {
self_destruct();
return;
{
free_acl_access(access);
}
+
clientTunnelOnError(ConnStateData *conn, ClientSocketContext *context, HttpRequest *request, const HttpRequestMethod& method, err_type requestError, Http::StatusCode errStatusCode, const char *requestErrorBytes)
{
if (conn->port->flags.isIntercepted() &&
- Config.accessList.on_unsupported_protocol && conn->nrequests <= 1) {
+ Config.accessList.on_unsupported_protocol && conn->nrequests <= 1) {
ACLFilledChecklist checklist(Config.accessList.on_unsupported_protocol, request, NULL);
checklist.requestErrorType = requestError;
checklist.src_addr = conn->clientConnection->remote;
if (context)
context->removeFromConnectionList(conn);
Comm::SetSelect(conn->clientConnection->fd, COMM_SELECT_READ, NULL, NULL, 0);
-
+
SBuf preReadData;
if (conn->preservedClientData.length())
preReadData.append(conn->preservedClientData);
}
/**
- *
+ *
* \retval 1 on success
* \retval 0 when needs more data
* \retval -1 on error
if (!conn->spliceOnError(err))
conn->clientConnection->close();
return;
- }
+ }
if (bio->rBufData().contentSize() > 0)
conn->receivedFirstByte();
/* NOTE: pinning.pinned should be kept. This combined with fd == -1 at the end of a request indicates that the host
* connection has gone away */
}
+
/// stop parsing the request and create context for relaying error info
ClientSocketContext *abortRequestParsing(const char *const errUri);
- /// client data which may need to forward as-is to server after an
+ /// client data which may need to forward as-is to server after an
/// on_unsupported_protocol tunnel decision.
SBuf preservedClientData;
protected: