Page Speed Optimization Libraries  1.7.30.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions
net_instaweb::ReflectingTestFetcher Class Reference

#include "reflecting_test_fetcher.h"

Inheritance diagram for net_instaweb::ReflectingTestFetcher:
net_instaweb::UrlAsyncFetcher

List of all members.

Public Member Functions

virtual void Fetch (const GoogleString &url, MessageHandler *message_handler, AsyncFetch *fetch)

Detailed Description

A fetcher that reflects headers it gets back into response headers, and the URL inside body. We use it to test that we are setting proper headers when we are generating requests ourselves.


Member Function Documentation

virtual void net_instaweb::ReflectingTestFetcher::Fetch ( const GoogleString &  url,
MessageHandler *  message_handler,
AsyncFetch fetch 
) [inline, virtual]

Asynchronously fetch a URL, set the response headers and stream the contents to fetch and call fetch->Done() when the fetch finishes.

There is an unchecked contract that response_headers are set before the response_writer or callback are used. Caution, several implementations do not satisfy this contract (but should).

Todo:

TODO(sligocki): GoogleString -> GoogleUrl or at least StringPiece.

TODO(sligocki): Include the URL in the fetch, like the request headers.

Implements net_instaweb::UrlAsyncFetcher.


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines