Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
net_instaweb::HTTPValueWriter Class Reference

#include "http_value_writer.h"

Public Member Functions

 HTTPValueWriter (HTTPValue *value, HTTPCache *cache)
 
void SetHeaders (ResponseHeaders *headers)
 
bool Write (const StringPiece &str, MessageHandler *handler)
 
bool has_buffered () const
 
bool CheckCanCacheElseClear (ResponseHeaders *headers)
 
bool CanCacheContent (const StringPiece &str) const
 

Detailed Description

Wrappper for buffering an HTTPValue. HTTPValueWriter ensures that an HTTPValue which cannot be eventually cached is not buffered.

Member Function Documentation

bool net_instaweb::HTTPValueWriter::CanCacheContent ( const StringPiece &  str) const

Checks if we can write the string to the HttpValue without going over limits.

bool net_instaweb::HTTPValueWriter::CheckCanCacheElseClear ( ResponseHeaders headers)

Checks if the http_value should be buffered or not depending on whether we can eventually cache it. It also clears the http_value if it can not be buffered. Note that this only checks the size constraints, not cache headers.


The documentation for this class was generated from the following file: