33 namespace OpenSim.Framework.Servers.HttpServer
48 public virtual string ContentType
52 return _httpResponse.ContentType;
57 _httpResponse.ContentType = value;
78 public long ContentLength
82 return _httpResponse.ContentLength;
87 _httpResponse.ContentLength = value;
94 public long ContentLength64
96 get {
return ContentLength; }
97 set { ContentLength = value; }
103 public Encoding ContentEncoding
107 return _httpResponse.Encoding;
112 _httpResponse.Encoding = value;
116 public bool KeepAlive
120 return _httpResponse.Connection == ConnectionType.KeepAlive;
126 _httpResponse.Connection = ConnectionType.KeepAlive;
128 _httpResponse.Connection = ConnectionType.Close;
137 public int KeepAliveTimeout
141 return _httpResponse.KeepAlive;
148 _httpResponse.Connection = ConnectionType.Close;
149 _httpResponse.KeepAlive = 0;
154 _httpResponse.Connection = ConnectionType.KeepAlive;
155 _httpResponse.KeepAlive = value;
166 public Stream OutputStream
170 return _httpResponse.Body;
174 public string ProtocolVersion
178 return _httpResponse.ProtocolVersion;
183 _httpResponse.ProtocolVersion = value;
194 return _httpResponse.Body;
201 public string RedirectLocation
206 _httpResponse.Redirect(value);
214 public bool SendChunked
218 return _httpResponse.Chunked;
223 _httpResponse.Chunked = value;
230 public virtual int StatusCode
234 return (
int)_httpResponse.Status;
239 _httpResponse.Status = (HttpStatusCode)value;
247 public string StatusDescription
251 return _httpResponse.Reason;
256 _httpResponse.Reason = value;
260 public bool ReuseContext
264 if (_httpClientContext != null)
266 return !_httpClientContext.EndWhenDone;
272 if (_httpClientContext != null)
274 _httpClientContext.EndWhenDone = !value;
280 private IHttpClientContext _httpClientContext;
286 _httpResponse = resp;
297 _httpResponse =
new HttpResponse(req.IHttpClientContext, req.IHttpRequest);
298 _httpClientContext = req.IHttpClientContext;
302 _httpResponse = resp;
303 _httpClientContext = clientContext;
315 _httpResponse.AddHeader(
key, value);
323 _httpResponse.Body.Flush();
326 _httpResponse.Connection = ConnectionType.Close;
327 _httpResponse.Chunked =
false;
329 _httpResponse.Send();
334 if (_httpClientContext != null)
335 _httpClientContext.Close();
OSHttpResponse is the OpenSim representation of an HTTP response.
IHttpResponse _httpResponse
OSHttpResponse(OSHttpRequest req)
Instantiate an OSHttpResponse object from an OSHttpRequest object. </summary Incoming OSHttpRequest t...
OSHttpResponse(HttpResponse resp, IHttpClientContext clientContext)
OpenSim.Region.ScriptEngine.Shared.LSL_Types.LSLString key
void AddHeader(string key, string value)
Add a header field and content to the response.
void Send()
Send the response back to the remote client
OSHttpResponse(IHttpResponse resp)