Page Speed Optimization Libraries
1.8.31.2
|
#include "async_fetch.h"
Public Member Functions | |
FallbackSharedAsyncFetch (AsyncFetch *base_fetch, HTTPValue *fallback, MessageHandler *handler) | |
void | set_fallback_responses_served (Variable *x) |
bool | serving_fallback () const |
Static Public Attributes | |
static const char | kStaleWarningHeaderValue [] |
Warning header to be added if a stale response is served. | |
Protected Member Functions | |
virtual void | HandleDone (bool success) |
virtual bool | HandleWrite (const StringPiece &content, MessageHandler *handler) |
virtual bool | HandleFlush (MessageHandler *handler) |
virtual void | HandleHeadersComplete () |
Creates a SharedAsyncFetch object using an existing AsyncFetch and a fallback value that is used in case the fetched response is an error. Note that in case the fetched response is an error and we have a non-empty fallback value, we completely ignore the fetched response. Also, note that this class gets deleted when HandleDone is called.