#include "instaweb_handler.h"
|
static const int | kContentLengthUnknown = -1 |
|
virtual bool | HandleWrite (const StringPiece &sp, MessageHandler *handler) |
|
virtual bool | HandleFlush (MessageHandler *handler) |
|
Links an apache request_rec* to an AsyncFetch, adding the ability to block based on a condition variable.
virtual bool net_instaweb::ApacheFetch::IsCachedResultValid |
( |
const ResponseHeaders & |
headers | ) |
|
|
virtual |
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.
- Todo:
- TODO(nikhilmadan): Consider making this virtual so that subclass authors are forced to look at this function.
Reimplemented from net_instaweb::AsyncFetch.
void net_instaweb::ApacheFetch::set_handle_error |
( |
bool |
x | ) |
|
|
inline |
When used for in-place resource optimization in mod_pagespeed, we have disabled fetching resources that are not in cache, otherwise we may wind up doing a loopback fetch to the same Apache server. So the CacheUrlAsyncFetcher will return a 501 or 404 but we do not want to send that to the client. So for ipro we suppress resporting errors in this flow.
- Todo:
- TODO(jmarantz): consider allowing serf fetches in ipro when running as a reverse-proxy.
void net_instaweb::ApacheFetch::set_is_proxy |
( |
bool |
x | ) |
|
|
inline |
By default ApacheFetch is not intended for proxying third party content. When it is to be used for proxying third party content, we must avoid sending a 'nosniff' header.
void net_instaweb::ApacheFetch::Wait |
( |
| ) |
|
Blocks indefinitely waiting for the proxy fetch to complete. Every 'blocking_fetch_timeout_ms', log a message so that if we get stuck there's noise in the logs, but we don't expect this to happen because underlying fetch/cache timeouts should fire.
Note that enforcing a timeout in this function makes debugging difficult.
The documentation for this class was generated from the following file: