Page Speed Optimization Libraries  1.13.35.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
apache_writer.h
Go to the documentation of this file.
1 // Copyright 2013 Google Inc.
16 
17 #ifndef PAGESPEED_APACHE_APACHE_WRITER_H_
18 #define PAGESPEED_APACHE_APACHE_WRITER_H_
19 
25 
26 struct request_rec;
27 
28 namespace net_instaweb {
29 
30 class MessageHandler;
31 class ResponseHeaders;
32 
36 class ApacheWriter : public Writer {
37  public:
38  ApacheWriter(request_rec* r, ThreadSystem* thread_system);
39  virtual ~ApacheWriter();
40 
41  virtual bool Write(const StringPiece& str, MessageHandler* handler);
42  virtual bool Flush(MessageHandler* handler);
43 
52  void OutputHeaders(ResponseHeaders* response_headers);
53  void set_content_length(int64 x) { content_length_ = x; }
54 
58  disable_downstream_header_filters_ = x;
59  }
60 
64  void set_strip_cookies(bool x) {
65  strip_cookies_ = x;
66  }
67 
68  private:
69  request_rec* request_;
70  bool headers_out_;
71  bool disable_downstream_header_filters_;
72  bool strip_cookies_;
73  int64 content_length_;
74  ThreadSystem* thread_system_;
75  scoped_ptr<ThreadSystem::ThreadId> apache_request_thread_;
76 
77 
78 };
79 
80 }
81 
82 #endif
Read/write API for HTTP response headers.
Definition: response_headers.h:37
void set_disable_downstream_header_filters(bool x)
Definition: apache_writer.h:57
Definition: scoped_ptr.h:30
void set_strip_cookies(bool x)
Definition: apache_writer.h:64
Definition: apache_writer.h:36
Interface for writing bytes to an output stream.
Definition: writer.h:29
void OutputHeaders(ResponseHeaders *response_headers)
Definition: thread_system.h:40
Definition: message_handler.h:39