Page Speed Optimization Libraries
1.8.31.2
|
#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. | |
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 [] |
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 bool net_instaweb::HttpDumpUrlFetcher::GetFilenameFromUrl | ( | const StringPiece & | root_dir, |
const GoogleUrl & | url, | ||
GoogleString * | filename, | ||
MessageHandler * | message_handler | ||
) | [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.
const char net_instaweb::HttpDumpUrlFetcher::kGzipContentLengthAttribute[] [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.