Google APIs Client Library for C++
|
Determines what is appropriate for scribes to record. More...
#include "client/transport/http_scribe.h"
Public Member Functions | |
HttpScribeCensor () | |
Standard constructor. | |
virtual | ~HttpScribeCensor () |
Standard destructor. | |
virtual string | GetCensoredUrl (const HttpRequest &request, bool *censored) const |
Returns a scribbed url for the request. | |
virtual string | GetCensoredRequestContent (const HttpRequest &request, int64 max_len, int64 *original_size, bool *censored) const |
Returns a scrubbed request payload. | |
virtual string | GetCensoredResponseBody (const HttpRequest &request, int64 max_len, int64 *original_size, bool *censored) const |
Returns a scrubbed responze payload. | |
virtual string | GetCensoredRequestHeaderValue (const HttpRequest &request, const StringPiece &name, const StringPiece &value, bool *censored) const |
Returns a censored request header value. | |
virtual string | GetCensoredResponseHeaderValue (const HttpRequest &request, const StringPiece &name, const StringPiece &value, bool *censored) const |
Returns a censored response header value. | |
const set< string > & | censored_url_prefixes () const |
Returns the set of censored URL prefixes. | |
set< string > * | mutable_censored_url_prefixes () |
Returns a mutable set of censored URL prefixes. | |
const set< string > & | censored_query_param_names () const |
Returns a set of censored query parameter names. | |
set< string > * | mutable_censored_query_param_names () |
Returns a mutable set of censored URL query parameters. | |
const set< string > & | censored_request_header_names () const |
Returns a set of censored HTTP request header names. | |
set< string > * | mutable_censored_request_header_names () |
Returns a mutable set of censored HTTP request header names. | |
const set< string > & | censored_response_header_names () const |
Returns a set of censored HTTP response header names. | |
set< string > * | mutable_censored_response_header_names () |
Returns a mutable set of censored HTTP reponse header names. | |
Protected Member Functions | |
string | GetCensoredUrlQuery (const ParsedUrl &parsed_url, bool *censored) const |
Censor the query part of a URL. |
Determines what is appropriate for scribes to record.
The base class performs standard censoring
HttpScribeCensor | ( | ) |
Standard constructor.
virtual ~HttpScribeCensor | ( | ) | [virtual] |
Standard destructor.
const set<string>& censored_query_param_names | ( | ) | const [inline] |
Returns a set of censored query parameter names.
const set<string>& censored_request_header_names | ( | ) | const [inline] |
Returns a set of censored HTTP request header names.
const set<string>& censored_response_header_names | ( | ) | const [inline] |
Returns a set of censored HTTP response header names.
const set<string>& censored_url_prefixes | ( | ) | const [inline] |
Returns the set of censored URL prefixes.
These include the protocol (e.g. https://accounts.google.com)
virtual string GetCensoredRequestContent | ( | const HttpRequest & | request, |
int64 | max_len, | ||
int64 * | original_size, | ||
bool * | censored | ||
) | const [virtual] |
Returns a scrubbed request payload.
The method should reset request->content_reader after reading the contents.
[in] | request | The request to censor. |
[in] | max_len | The maximum length of body to keep. |
[out] | original_size | The original uncensored size. |
[out] | censored | Set to true if the result was censored. |
virtual string GetCensoredRequestHeaderValue | ( | const HttpRequest & | request, |
const StringPiece & | name, | ||
const StringPiece & | value, | ||
bool * | censored | ||
) | const [virtual] |
Returns a censored request header value.
[in] | request | The request with the header. |
[in] | name | The request header name. |
[in] | value | The original value. |
[out] | censored | True if the value was censored. |
virtual string GetCensoredResponseBody | ( | const HttpRequest & | request, |
int64 | max_len, | ||
int64 * | original_size, | ||
bool * | censored | ||
) | const [virtual] |
Returns a scrubbed responze payload.
The method should reset response->body_reader after reading the contents.
[in] | request | The request with the response to censor. |
[in] | max_len | The maximum length of body to keep. |
[out] | original_size | The original uncensored size. |
[out] | censored | Set to true if the result was censored. |
virtual string GetCensoredResponseHeaderValue | ( | const HttpRequest & | request, |
const StringPiece & | name, | ||
const StringPiece & | value, | ||
bool * | censored | ||
) | const [virtual] |
Returns a censored response header value.
[in] | request | The request with response having the header. |
[in] | name | The response header name. |
[in] | value | The original value. |
[out] | censored | True if the value was censored. |
virtual string GetCensoredUrl | ( | const HttpRequest & | request, |
bool * | censored | ||
) | const [virtual] |
Returns a scribbed url for the request.
string GetCensoredUrlQuery | ( | const ParsedUrl & | parsed_url, |
bool * | censored | ||
) | const [protected] |
Censor the query part of a URL.
[in] | parsed_url | The parsed url to extract from. |
[out] | censored | Set to true if some values were censored. |
set<string>* mutable_censored_query_param_names | ( | ) | [inline] |
Returns a mutable set of censored URL query parameters.
You can add additional query parameter names into the set.
set<string>* mutable_censored_request_header_names | ( | ) | [inline] |
Returns a mutable set of censored HTTP request header names.
You can add additional request header names into the set.
set<string>* mutable_censored_response_header_names | ( | ) | [inline] |
Returns a mutable set of censored HTTP reponse header names.
You can add additional response header names into the set.
set<string>* mutable_censored_url_prefixes | ( | ) | [inline] |
Returns a mutable set of censored URL prefixes.
These include the protocol (e.g. https://accounts.google.com). You can add additional prefixes into the set.