Page Speed Optimization Libraries
1.13.35.1
|
#include "http_dump_url_fetcher.h"
Public Member Functions | |
HttpDumpUrlFetcher (const StringPiece &root_dir, FileSystem *file_system, Timer *timer) | |
bool | GetFilename (const GoogleUrl &url, GoogleString *filename, MessageHandler *message_handler) |
Non-static version that uses the fetcher's root dir. | |
virtual void | Fetch (const GoogleString &url, MessageHandler *message_handler, AsyncFetch *fetch) |
This is a synchronous/blocking implementation. | |
bool | ParseFile (FileSystem::InputFile *file, ResponseHeaders *response_headers, Writer *response_writer, MessageHandler *handler) |
void | RespondError (ResponseHeaders *response_headers, Writer *response_writer, MessageHandler *handler) |
Helper function to return a generic error response. | |
void | set_print_urls (bool on) |
Print URLs each time they are fetched. | |
Public Member Functions inherited from net_instaweb::UrlAsyncFetcher | |
virtual bool | SupportsHttps () const |
virtual int64 | timeout_ms () |
virtual void | ShutDown () |
void | set_fetch_with_gzip (bool x) |
bool | fetch_with_gzip () const |
AsyncFetch * | EnableInflation (AsyncFetch *fetch) const |
Static Public Member Functions | |
static bool | GetFilenameFromUrl (const StringPiece &root_dir, const GoogleUrl &url, GoogleString *filename, MessageHandler *message_handler) |
Static Public Attributes | |
static const char | kGzipContentLengthAttribute [] |
Static Public Attributes inherited from net_instaweb::UrlAsyncFetcher | |
static const int64 | kUnspecifiedTimeout |
Additional Inherited Members | |
Protected Member Functions inherited from net_instaweb::UrlAsyncFetcher | |
UrlAsyncFetcher () | |
HttpDumpFetcher fetches raw HTTP dumps from the filesystem. These dumps could be compressed or chunked, the fetcher does not decompress or de-chunk them.
|
static |
Converts URL into filename the way that Latency Lab does. Note: root_dir_ must be standardized to have a / at end already.
bool net_instaweb::HttpDumpUrlFetcher::ParseFile | ( | FileSystem::InputFile * | file, |
ResponseHeaders * | response_headers, | ||
Writer * | response_writer, | ||
MessageHandler * | handler | ||
) |
Parse file into response_headers and response_writer as if it were bytes off the wire.
|
static |
When the slurped data is gzipped, but request headers are made that don't include 'gzip' in an Accept-Encodings header, then this fetcher inflates the gzipped output as it streams. It also captures the original gzipped size in this attribute in the response headers.