Page Speed Optimization Libraries
1.13.35.1
|
#include "proxy_fetch.h"
Public Member Functions | |
void | set_trusted_input (bool trusted_input) |
Public Member Functions inherited from net_instaweb::SharedAsyncFetch | |
SharedAsyncFetch (AsyncFetch *base_fetch) | |
virtual const RequestContextPtr & | request_context () |
Public Member Functions inherited from net_instaweb::AsyncFetch | |
AsyncFetch (const RequestContextPtr &request_ctx) | |
void | HeadersComplete () |
void | Done (bool success) |
virtual bool | Write (const StringPiece &content, MessageHandler *handler) |
virtual bool | Flush (MessageHandler *handler) |
RequestHeaders * | request_headers () |
void | set_request_headers (RequestHeaders *headers) |
void | SetRequestHeadersTakingOwnership (RequestHeaders *headers) |
Same as above, but takes ownership. | |
const RequestHeaders * | request_headers () const |
ResponseHeaders * | response_headers () |
See doc for request_headers and set_request_headers. | |
void | set_response_headers (ResponseHeaders *headers) |
ResponseHeaders * | extra_response_headers () |
void | set_extra_response_headers (ResponseHeaders *headers) |
virtual void | Reset () |
bool | headers_complete () const |
bool | content_length_known () const |
int64 | content_length () const |
void | set_content_length (int64 x) |
GoogleString | LoggingString () |
virtual AbstractLogRecord * | log_record () |
void | FixCacheControlForGoogleCache () |
Public Member Functions inherited from net_instaweb::Writer | |
virtual bool | Dump (Writer *writer, MessageHandler *message_handler) |
Static Public Attributes | |
static const char | kCollectorConnectProxyFetchFinish [] |
static const char | kCollectorDetachFinish [] |
static const char | kCollectorDoneFinish [] |
static const char | kCollectorFinish [] |
static const char | kCollectorDetachStart [] |
static const char | kCollectorRequestHeadersCompleteFinish [] |
static const char | kHeadersSetupRaceAlarmQueued [] |
static const char | kHeadersSetupRaceDone [] |
static const char | kHeadersSetupRaceFlush [] |
static const char | kHeadersSetupRacePrefix [] |
static const char | kHeadersSetupRaceWait [] |
static const int | kTestSignalTimeoutMs = 200 |
Static Public Attributes inherited from net_instaweb::AsyncFetch | |
static const int | kContentLengthUnknown = -1 |
Protected Member Functions | |
virtual void | HandleHeadersComplete () |
protected interface from AsyncFetch. | |
virtual bool | HandleWrite (const StringPiece &content, MessageHandler *handler) |
virtual bool | HandleFlush (MessageHandler *handler) |
virtual void | HandleDone (bool success) |
virtual bool | IsCachedResultValid (const ResponseHeaders &headers) |
Protected Member Functions inherited from net_instaweb::SharedAsyncFetch | |
virtual bool | IsBackgroundFetch () const |
void | PropagateContentLength () |
Propagates any set_content_length from this to the base fetch. | |
Friends | |
class | ProxyFetchFactory |
class | ProxyFetchPropertyCallbackCollector |
class | MockProxyFetch |
Additional Inherited Members | |
Static Public Member Functions inherited from net_instaweb::AsyncFetch | |
static bool | IsGoogleCacheVia (StringPiece via_value) |
Manages a single fetch of an HTML or resource file from the original server. If it is an HTML file, it is rewritten. Fetch is initialized by calling ProxyFetchFactory::StartNewProxyFetch(). For fetching pagespeed rewritten resources, use ResourceFetch. This is only meant to be used by ProxyInterface.
Takes ownership of custom_options.
The ProxyFetch passes through non-HTML directly to base_writer.
For HTML, the sequence is this:
|
protectedvirtual |
Is the cache entry corresponding to headers valid? Default is that it is valid. Sub-classes can provide specific implementations, e.g., based on cache invalidation timestamp in domain specific options. Used by CacheUrlAsyncFetcher.
Reimplemented from net_instaweb::SharedAsyncFetch.
|
static |
These strings identify sync-points for reproducing races between PropertyCache lookup completion and Origin HTML Fetch completion.
|
static |
These strings identify sync-points for introducing races between PropertyCache lookup completion and HeadersComplete.
|
static |
Number of milliseconds to wait, in a test, for an event that we are hoping does not occur, specifically an inappropriate call to base_fetch()->HeadersComplete() while we are still mutating response headers in SetupForHtml.
This is used only for testing.