HTTPHeader *HTTPPacket::getHeader(const char *name)
{
	int nHeaders = getNHeaders();
	for (int n=0; n<nHeaders; n++) {
		HTTPHeader *header = getHeader(n);
		const char *headerName = header->getName();
		if (StringEqualsIgnoreCase(headerName, name) == true)
			return header;			
	}
	return NULL;
}
const char *HTTPPacket::getHeaderString(string &headerStr)
{
	int nHeaders = getNHeaders();
	headerStr = "";
	for (int n=0; n<nHeaders; n++) {
		HTTPHeader *header = getHeader(n);
		headerStr += header->getName();
		headerStr += ": ";
		headerStr += header->getValue();
		headerStr += HTTP::CRLF;
	}
	return headerStr.c_str();
}