21 using namespace XmlRpc;
28 bool deleteOnClose ) :
78 char *hp = (
char*)
_header.c_str();
79 char *ep = hp +
_header.length();
84 for (
char *cp = hp; (bp == 0) && (cp < ep); ++cp) {
85 if ((ep - cp > 16) && (strncasecmp(cp,
"Content-length: ", 16) == 0))
87 else if ((ep - cp > 12) && (strncasecmp(cp,
"Connection: ", 12) == 0))
89 else if ((ep - cp > 4) && (strncmp(cp,
"\r\n\r\n", 4) == 0))
91 else if ((ep - cp > 2) && (strncmp(cp,
"\n\n", 2) == 0))
101 XmlRpcUtil::error(
"XmlRpcServerConnection::readHeader: EOF while reading header");
110 XmlRpcUtil::error(
"XmlRpcServerConnection::readHeader: No Content-length specified");
127 if (
_header.find(
"HTTP/1.0") != std::string::npos) {
128 if (kp == 0 || strncasecmp(kp,
"keep-alive", 10) != 0)
131 if (kp != 0 && strncasecmp(kp,
"close", 5) == 0)
158 XmlRpcUtil::error(
"XmlRpcServerConnection::readRequest: EOF while reading request");