Functions | ||||
bool | parseHeader (HTTPHeaderMap &map, Array< String > &array, istream &istr) | |||
bool | parseHeader (HTTPHeaderMap &map, istream &istr) | |||
bool | buildMap (HTTPHeaderMap &map, istream &istr) | |||
String | date (void) | |||
Get the date (for http headers). | ||||
String | status2String (int code) | |||
Return a descriptive string associated with a HTTP status code. | ||||
String | getCounterStr () | |||
Returns a two digit sequence for header counting. | ||||
String | base64Decode (const String &arg) | |||
Decode Base64 encoded arg
| ||||
static int | char2val (char c) | |||
Array< char > | base64Decode (const char *src) | |||
Decode Base64 encoded arg. | ||||
String | base64Encode (const String &arg) | |||
Encode src in Base64
| ||||
String | base64Encode (const char *src) | |||
Encode src in Base64. | ||||
String | base64Encode (const UInt8 *src, size_t len) | |||
void | DigestCalcHA1 (const String &sAlg, const String &sUserName, const String &sRealm, const String &sPassword, const String &sNonce, const String &sCNonce, String &sSessionKey) | |||
void | DigestCalcResponse (const String &sHA1, const String &sNonce, const String &sNonceCount, const String &sCNonce, const String &sQop, const String &sMethod, const String &sDigestUri, const String &sHEntity, String &sResponse) | |||
bool | headerHasKey (const HTTPHeaderMap &headers, const String &key) | |||
Do the headers have a certain key? | ||||
String | getHeaderValue (const HTTPHeaderMap &headers, const String &key) | |||
Get a value (based on a key/value pair) from the http headers. | ||||
void | addHeader (Array< String > &headers, const String &key, const String &value) | |||
Add a HTTP header. | ||||
void | eatEntity (istream &istr) | |||
void | decodeBasicCreds (const String &info, String &name, String &password) | |||
Base64Decode a user name/password. | ||||
String | escapeCharForURL (char c) | |||
Apply the standard URI [RFC 2396, section 2] escaping mechanism to the char c, using the """ HEX HEX" convention). | ||||
OW_DEFINE_EXCEPTION_WITH_ID (UnescapeCharForURL) | ||||
char | digitToVal (char c) | |||
char | unescapeCharForURL (const char *str) | |||
Apply the standard URI [RFC 2396, section 2] unescaping mechanism to the String s, formatted in the """ HEX HEX" convention). | ||||
String | escapeForURL (const String &input) | |||
Apply the standard URI [RFC 2396, section 2] escaping mechanism to the string input, using the """ HEX HEX" convention). | ||||
String | unescapeForURL (const String &input) | |||
Apply the standard URI [RFC 2396, section 2] unescaping mechanism to the string input, using the """ HEX HEX" convention). | ||||
OW_HTTP_API bool | parseHeader (HTTPHeaderMap &map, Array< String > &array, std::istream &istr) | |||
Read from an input stream, and fill out a <String, String> map and String Array representing the status line. | ||||
OW_HTTP_API bool | parseHeader (HTTPHeaderMap &map, std::istream &istr) | |||
Read from in input stream, parse HTTP headers into a <String, String> map (this is called by parseHeader(map, array, istr)). | ||||
OW_HTTP_API void | eatEntity (std::istream &istr) | |||
Read from an input stream, until the end of the entity is reached. | ||||
OW_HTTP_API bool | buildMap (HTTPHeaderMap &map, std::istream &istr) | |||
OW_DECLARE_APIEXCEPTION (UnescapeCharForURL, OW_HTTP_API) | ||||
Variables | ||||
const char *const | Header_BypassLocker = "OW_BypassLocker" | |||
const char *const | HeaderValue_true = "true" | |||
const char *const | HeaderValue_false = "false" | |||
static HTTPCounter | theCounter | |||
static const char *const | Base64 | |||
static const char | Pad64 = '=' | |||
OW_HTTP_API const char *const | Header_BypassLocker | |||
OW_HTTP_API const char *const | HeaderValue_true | |||
OW_HTTP_API const char *const | HeaderValue_false |
|
Add a HTTP header.
Definition at line 656 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::Array< T >::begin(), OW_NAMESPACE::String::empty(), OW_NAMESPACE::Array< T >::end(), OW_NAMESPACE::Array< T >::push_back(), and OW_NAMESPACE::String::trim(). Referenced by OW_NAMESPACE::HTTPSvrConnection::addHeader(), OW_NAMESPACE::HTTPClient::addHeaderCommon(), OW_NAMESPACE::HTTPClient::addHeaderNew(), and OW_NAMESPACE::HTTPClient::addHeaderPersistent(). |
|
Decode Base64 encoded arg.
Definition at line 347 of file OW_HTTPUtils.cpp. References ch, char2val(), OW_NAMESPACE::AutoPtrVec< X >::get(), OW_THROW, and state. |
|
Decode Base64 encoded arg
Definition at line 270 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::String::c_str(). Referenced by decodeBasicCreds(). |
|
Definition at line 485 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::AutoPtrVec< X >::get(), i, and OW_THROW. |
|
Encode src in Base64.
Definition at line 479 of file OW_HTTPUtils.cpp. References base64Encode(). |
|
Encode src in Base64
Definition at line 474 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::String::c_str(), and OW_NAMESPACE::String::length(). Referenced by base64Encode(), and OW_NAMESPACE::HTTPClient::sendAuthorization(). |
|
|
|
Definition at line 99 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::String::getLine(), OW_NAMESPACE::String::isSpaces(), OW_NAMESPACE::String::length(), OW_NAMESPACE::String::ltrim(), and OW_NAMESPACE::String::rtrim(). Referenced by parseHeader(). |
|
Definition at line 275 of file OW_HTTPUtils.cpp. Referenced by base64Decode(). |
|
Get the date (for http headers).
Definition at line 148 of file OW_HTTPUtils.cpp. References OW_THROW, OW_NAMESPACE::DateTime::setToCurrent(), OW_NAMESPACE::Array< T >::size(), OW_NAMESPACE::String::tokenize(), and OW_NAMESPACE::DateTime::toString(). Referenced by OW_NAMESPACE::HTTPSvrConnection::run(). |
|
Base64Decode a user name/password.
Definition at line 684 of file OW_HTTPUtils.cpp. References base64Decode(), OW_NAMESPACE::String::indexOf(), name, OW_THROW, and OW_NAMESPACE::String::substring(). |
|
Definition at line 547 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::String::equalsIgnoreCase(), OW_NAMESPACE::MD5::getDigest(), OW_NAMESPACE::MD5HASHLEN, OW_NAMESPACE::String::toString(), OW_NAMESPACE::MD5::toString(), and OW_NAMESPACE::MD5::update(). |
|
Definition at line 578 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::String::equalsIgnoreCase(), and OW_NAMESPACE::MD5::update(). Referenced by OW_NAMESPACE::HTTPClient::sendAuthorization(). |
|
Definition at line 731 of file OW_HTTPUtils.cpp. Referenced by unescapeCharForURL(). |
|
Read from an input stream, until the end of the entity is reached. This is usefull when using a HTTPChunkedIStream or HTTPLenLimitIStream, and the XML parser (for instance), may not have read to the end of the entity.
|
|
Definition at line 676 of file OW_HTTPUtils.cpp. Referenced by OW_NAMESPACE::HTTPSvrConnection::cleanUpIStreams(), OW_NAMESPACE::HTTPClient::cleanUpIStreams(), OW_NAMESPACE::CIMXMLCIMOMHandle::doSendRequest(), and OW_NAMESPACE::HTTPClient::prepareForRetry(). |
|
Apply the standard URI [RFC 2396, section 2] escaping mechanism to the char c, using the """ HEX HEX" convention).
Definition at line 716 of file OW_HTTPUtils.cpp. Referenced by escapeForURL(). |
|
Apply the standard URI [RFC 2396, section 2] escaping mechanism to the string input, using the """ HEX HEX" convention).
Definition at line 748 of file OW_HTTPUtils.cpp. References escapeCharForURL(), i, and OW_NAMESPACE::String::length(). |
|
Returns a two digit sequence for header counting.
Definition at line 251 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::HTTPCounter::getNextCounter(), and theCounter. Referenced by OW_NAMESPACE::HTTPSvrConnection::beginPostResponse(), OW_NAMESPACE::HTTPSvrConnection::options(), and OW_NAMESPACE::HTTPClient::sendDataToServer(). |
|
Get a value (based on a key/value pair) from the http headers.
Definition at line 640 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::Map< Key, T, Compare >::end(), OW_NAMESPACE::Map< Key, T, Compare >::find(), i, OW_NAMESPACE::String::toLowerCase(), and OW_NAMESPACE::String::toString(). Referenced by OW_NAMESPACE::HTTPSvrConnection::getHeaderValue(), OW_NAMESPACE::HTTPClient::getHeaderValue(), OW_NAMESPACE::CIMXMLCIMOMHandle::getHTTPResponseHeader(), OW_NAMESPACE::BinaryCIMOMHandle::getHTTPResponseHeader(), and OW_NAMESPACE::HTTPClient::getResponseHeader(). |
|
Do the headers have a certain key?
Definition at line 624 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::Map< Key, T, Compare >::end(), OW_NAMESPACE::Map< Key, T, Compare >::find(), i, OW_NAMESPACE::String::toLowerCase(), and OW_NAMESPACE::String::toString(). Referenced by OW_NAMESPACE::CIMXMLCIMOMHandle::getHTTPResponseHeader(), OW_NAMESPACE::BinaryCIMOMHandle::getHTTPResponseHeader(), OW_NAMESPACE::HTTPClient::getResponseHeader(), OW_NAMESPACE::HTTPSvrConnection::headerHasKey(), and OW_NAMESPACE::HTTPClient::headerHasKey(). |
|
|
|
|
|
Read from in input stream, parse HTTP headers into a <String, String> map (this is called by parseHeader(map, array, istr)).
|
|
Read from an input stream, and fill out a <String, String> map and String Array representing the status line.
|
|
Definition at line 93 of file OW_HTTPUtils.cpp. References buildMap(). |
|
Definition at line 74 of file OW_HTTPUtils.cpp. References buildMap(), OW_NAMESPACE::String::getLine(), OW_NAMESPACE::String::isSpaces(), and OW_NAMESPACE::String::tokenize(). Referenced by OW_NAMESPACE::HTTPChunkedIStream::buildTrailerMap(), OW_NAMESPACE::HTTPClient::checkResponse(), and OW_NAMESPACE::HTTPSvrConnection::run(). |
|
|
Apply the standard URI [RFC 2396, section 2] unescaping mechanism to the String s, formatted in the """ HEX HEX" convention).
Definition at line 738 of file OW_HTTPUtils.cpp. References digitToVal(), and OW_THROW. Referenced by unescapeForURL(). |
|
Apply the standard URI [RFC 2396, section 2] unescaping mechanism to the string input, using the """ HEX HEX" convention).
Definition at line 782 of file OW_HTTPUtils.cpp. References OW_NAMESPACE::String::c_str(), OW_NAMESPACE::String::length(), and unescapeCharForURL(). |
|
Initial value:
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"
Definition at line 266 of file OW_HTTPUtils.cpp. |
|
Definition at line 69 of file OW_HTTPUtils.cpp. |
|
Definition at line 69 of file OW_HTTPUtils.cpp. |
|
Definition at line 71 of file OW_HTTPUtils.cpp. |
|
Definition at line 71 of file OW_HTTPUtils.cpp. |
|
Definition at line 70 of file OW_HTTPUtils.cpp. |
|
Definition at line 70 of file OW_HTTPUtils.cpp. |
|
Definition at line 268 of file OW_HTTPUtils.cpp. |
|
Definition at line 248 of file OW_HTTPUtils.cpp. Referenced by getCounterStr(). |