Mercurial > hg > orthanc
comparison Core/HttpServer/HttpOutput.h @ 1645:1558b3226b18
IHttpExceptionFormatter
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Thu, 24 Sep 2015 15:55:17 +0200 |
parents | d73124f6b439 |
children | 5cf2bd0abfa2 |
comparison
equal
deleted
inserted
replaced
1644:939b921b2c81 | 1645:1558b3226b18 |
---|---|
112 }; | 112 }; |
113 | 113 |
114 StateMachine stateMachine_; | 114 StateMachine stateMachine_; |
115 bool isDeflateAllowed_; | 115 bool isDeflateAllowed_; |
116 bool isGzipAllowed_; | 116 bool isGzipAllowed_; |
117 bool describeErrors_; | |
118 | 117 |
119 HttpCompression GetPreferredCompression(size_t bodySize) const; | 118 HttpCompression GetPreferredCompression(size_t bodySize) const; |
120 | 119 |
121 public: | 120 public: |
122 HttpOutput(IHttpOutputStream& stream, | 121 HttpOutput(IHttpOutputStream& stream, |
123 bool isKeepAlive) : | 122 bool isKeepAlive) : |
124 stateMachine_(stream, isKeepAlive), | 123 stateMachine_(stream, isKeepAlive), |
125 isDeflateAllowed_(false), | 124 isDeflateAllowed_(false), |
126 isGzipAllowed_(false), | 125 isGzipAllowed_(false) |
127 describeErrors_(true) | |
128 { | 126 { |
129 } | 127 } |
130 | 128 |
131 void SetDeflateAllowed(bool allowed) | 129 void SetDeflateAllowed(bool allowed) |
132 { | 130 { |
144 } | 142 } |
145 | 143 |
146 bool IsGzipAllowed() const | 144 bool IsGzipAllowed() const |
147 { | 145 { |
148 return isGzipAllowed_; | 146 return isGzipAllowed_; |
149 } | |
150 | |
151 void SetDescribeErrorsEnabled(bool enabled) | |
152 { | |
153 describeErrors_ = enabled; | |
154 } | |
155 | |
156 bool IsDescribeErrorsEnabled() const | |
157 { | |
158 return describeErrors_; | |
159 } | 147 } |
160 | 148 |
161 void SendStatus(HttpStatus status, | 149 void SendStatus(HttpStatus status, |
162 const char* message, | 150 const char* message, |
163 size_t messageSize); | 151 size_t messageSize); |