diff options
author | Jeff Ames | 2008-08-18 00:39:10 +0000 |
---|---|---|
committer | Jeff Ames | 2008-08-18 00:39:10 +0000 |
commit | 6ef9d4da901a346c232458317cca6268da888e2e (patch) | |
tree | dd1d935b10f34f261839da9f9879c02322e8ede7 /OpenSim/Framework/Servers/OSHttpResponse.cs | |
parent | Update svn properties, minor formatting cleanup. (diff) | |
download | opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.zip opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.gz opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.bz2 opensim-SC_OLD-6ef9d4da901a346c232458317cca6268da888e2e.tar.xz |
Formatting cleanup.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/Servers/OSHttpResponse.cs | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/OpenSim/Framework/Servers/OSHttpResponse.cs b/OpenSim/Framework/Servers/OSHttpResponse.cs index eb7e400..21d1e2b 100644 --- a/OpenSim/Framework/Servers/OSHttpResponse.cs +++ b/OpenSim/Framework/Servers/OSHttpResponse.cs | |||
@@ -56,15 +56,15 @@ namespace OpenSim.Framework.Servers | |||
56 | /// </summary> | 56 | /// </summary> |
57 | /// <remarks> | 57 | /// <remarks> |
58 | /// Setting this property will also set IsContentTypeSet to | 58 | /// Setting this property will also set IsContentTypeSet to |
59 | /// true. | 59 | /// true. |
60 | /// </remarks> | 60 | /// </remarks> |
61 | public string ContentType | 61 | public string ContentType |
62 | { | 62 | { |
63 | get | 63 | get |
64 | { | 64 | { |
65 | if (HttpServer) | 65 | if (HttpServer) |
66 | return _httpResponse.ContentType; | 66 | return _httpResponse.ContentType; |
67 | else | 67 | else |
68 | return _httpListenerResponse.ContentType; | 68 | return _httpListenerResponse.ContentType; |
69 | } | 69 | } |
70 | set | 70 | set |
@@ -100,11 +100,11 @@ namespace OpenSim.Framework.Servers | |||
100 | /// </summary> | 100 | /// </summary> |
101 | public long ContentLength | 101 | public long ContentLength |
102 | { | 102 | { |
103 | get | 103 | get |
104 | { | 104 | { |
105 | if (HttpServer) | 105 | if (HttpServer) |
106 | return _httpResponse.ContentLength; | 106 | return _httpResponse.ContentLength; |
107 | else | 107 | else |
108 | return _httpListenerResponse.ContentLength64; | 108 | return _httpListenerResponse.ContentLength64; |
109 | } | 109 | } |
110 | set | 110 | set |
@@ -130,11 +130,11 @@ namespace OpenSim.Framework.Servers | |||
130 | /// </summary> | 130 | /// </summary> |
131 | public Encoding ContentEncoding | 131 | public Encoding ContentEncoding |
132 | { | 132 | { |
133 | get | 133 | get |
134 | { | 134 | { |
135 | if (HttpServer) | 135 | if (HttpServer) |
136 | return _httpResponse.Encoding; | 136 | return _httpResponse.Encoding; |
137 | else | 137 | else |
138 | return _httpListenerResponse.ContentEncoding; | 138 | return _httpListenerResponse.ContentEncoding; |
139 | } | 139 | } |
140 | 140 | ||
@@ -142,7 +142,7 @@ namespace OpenSim.Framework.Servers | |||
142 | { | 142 | { |
143 | if (HttpServer) | 143 | if (HttpServer) |
144 | _httpResponse.Encoding = value; | 144 | _httpResponse.Encoding = value; |
145 | else | 145 | else |
146 | _httpListenerResponse.ContentEncoding = value; | 146 | _httpListenerResponse.ContentEncoding = value; |
147 | } | 147 | } |
148 | } | 148 | } |
@@ -152,8 +152,8 @@ namespace OpenSim.Framework.Servers | |||
152 | /// </summary> | 152 | /// </summary> |
153 | public WebHeaderCollection Headers | 153 | public WebHeaderCollection Headers |
154 | { | 154 | { |
155 | get | 155 | get |
156 | { | 156 | { |
157 | if (HttpServer) | 157 | if (HttpServer) |
158 | return null; | 158 | return null; |
159 | else | 159 | else |
@@ -166,10 +166,10 @@ namespace OpenSim.Framework.Servers | |||
166 | /// </summary> | 166 | /// </summary> |
167 | public bool KeepAlive | 167 | public bool KeepAlive |
168 | { | 168 | { |
169 | get | 169 | get |
170 | { | 170 | { |
171 | if (HttpServer) | 171 | if (HttpServer) |
172 | return _httpResponse.Connection == ConnectionType.KeepAlive; | 172 | return _httpResponse.Connection == ConnectionType.KeepAlive; |
173 | else | 173 | else |
174 | return _httpListenerResponse.KeepAlive; | 174 | return _httpListenerResponse.KeepAlive; |
175 | } | 175 | } |
@@ -178,7 +178,7 @@ namespace OpenSim.Framework.Servers | |||
178 | { | 178 | { |
179 | if (HttpServer) | 179 | if (HttpServer) |
180 | _httpResponse.Connection = ConnectionType.KeepAlive; | 180 | _httpResponse.Connection = ConnectionType.KeepAlive; |
181 | else | 181 | else |
182 | _httpListenerResponse.KeepAlive = value; | 182 | _httpListenerResponse.KeepAlive = value; |
183 | } | 183 | } |
184 | } | 184 | } |
@@ -191,8 +191,8 @@ namespace OpenSim.Framework.Servers | |||
191 | /// </remarks> | 191 | /// </remarks> |
192 | public Stream OutputStream | 192 | public Stream OutputStream |
193 | { | 193 | { |
194 | get | 194 | get |
195 | { | 195 | { |
196 | if (HttpServer) | 196 | if (HttpServer) |
197 | return _httpResponse.Body; | 197 | return _httpResponse.Body; |
198 | else | 198 | else |
@@ -205,10 +205,10 @@ namespace OpenSim.Framework.Servers | |||
205 | /// </summary> | 205 | /// </summary> |
206 | public Stream Body | 206 | public Stream Body |
207 | { | 207 | { |
208 | get | 208 | get |
209 | { | 209 | { |
210 | if (HttpServer) | 210 | if (HttpServer) |
211 | return _httpResponse.Body; | 211 | return _httpResponse.Body; |
212 | throw new Exception("[OSHttpResponse] mixed .NET and HttpServer access"); | 212 | throw new Exception("[OSHttpResponse] mixed .NET and HttpServer access"); |
213 | } | 213 | } |
214 | } | 214 | } |
@@ -228,18 +228,18 @@ namespace OpenSim.Framework.Servers | |||
228 | } | 228 | } |
229 | } | 229 | } |
230 | 230 | ||
231 | 231 | ||
232 | /// <summary> | 232 | /// <summary> |
233 | /// Chunk transfers. | 233 | /// Chunk transfers. |
234 | /// </summary> | 234 | /// </summary> |
235 | public bool SendChunked | 235 | public bool SendChunked |
236 | { | 236 | { |
237 | get | 237 | get |
238 | { | 238 | { |
239 | if (HttpServer) | 239 | if (HttpServer) |
240 | return _httpResponse.Chunked; | 240 | return _httpResponse.Chunked; |
241 | else | 241 | else |
242 | return _httpListenerResponse.SendChunked; | 242 | return _httpListenerResponse.SendChunked; |
243 | } | 243 | } |
244 | 244 | ||
245 | set | 245 | set |
@@ -256,12 +256,12 @@ namespace OpenSim.Framework.Servers | |||
256 | /// </summary> | 256 | /// </summary> |
257 | public int StatusCode | 257 | public int StatusCode |
258 | { | 258 | { |
259 | get | 259 | get |
260 | { | 260 | { |
261 | if (HttpServer) | 261 | if (HttpServer) |
262 | return (int)_httpResponse.Status; | 262 | return (int)_httpResponse.Status; |
263 | else | 263 | else |
264 | return _httpListenerResponse.StatusCode; | 264 | return _httpListenerResponse.StatusCode; |
265 | } | 265 | } |
266 | 266 | ||
267 | set | 267 | set |
@@ -279,12 +279,12 @@ namespace OpenSim.Framework.Servers | |||
279 | /// </summary> | 279 | /// </summary> |
280 | public string StatusDescription | 280 | public string StatusDescription |
281 | { | 281 | { |
282 | get | 282 | get |
283 | { | 283 | { |
284 | if (HttpServer) | 284 | if (HttpServer) |
285 | return _httpResponse.Reason; | 285 | return _httpResponse.Reason; |
286 | else | 286 | else |
287 | return _httpListenerResponse.StatusDescription; | 287 | return _httpListenerResponse.StatusDescription; |
288 | } | 288 | } |
289 | 289 | ||
290 | set | 290 | set |
@@ -331,7 +331,7 @@ namespace OpenSim.Framework.Servers | |||
331 | /// object. | 331 | /// object. |
332 | /// </summary | 332 | /// </summary |
333 | /// <param name="req">Incoming OSHttpRequest to which we are | 333 | /// <param name="req">Incoming OSHttpRequest to which we are |
334 | /// replying</param> | 334 | /// replying</param> |
335 | public OSHttpResponse(OSHttpRequest req) | 335 | public OSHttpResponse(OSHttpRequest req) |
336 | { | 336 | { |
337 | _httpResponse = new HttpResponse(req.HttpClientContext, req.HttpRequest); | 337 | _httpResponse = new HttpResponse(req.HttpClientContext, req.HttpRequest); |
@@ -343,7 +343,7 @@ namespace OpenSim.Framework.Servers | |||
343 | /// <param name="key">string containing the header field | 343 | /// <param name="key">string containing the header field |
344 | /// name</param> | 344 | /// name</param> |
345 | /// <param name="value">string containing the header field | 345 | /// <param name="value">string containing the header field |
346 | /// value</param> | 346 | /// value</param> |
347 | public void AddHeader(string key, string value) | 347 | public void AddHeader(string key, string value) |
348 | { | 348 | { |
349 | if (HttpServer) | 349 | if (HttpServer) |
@@ -361,8 +361,8 @@ namespace OpenSim.Framework.Servers | |||
361 | { | 361 | { |
362 | _httpResponse.Body.Flush(); | 362 | _httpResponse.Body.Flush(); |
363 | _httpResponse.Send(); | 363 | _httpResponse.Send(); |
364 | } | 364 | } |
365 | else | 365 | else |
366 | { | 366 | { |
367 | OutputStream.Close(); | 367 | OutputStream.Close(); |
368 | } | 368 | } |