diff options
Diffstat (limited to 'OpenSim/Tests/Common/Mock/TestHttpResponse.cs')
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestHttpResponse.cs | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/OpenSim/Tests/Common/Mock/TestHttpResponse.cs b/OpenSim/Tests/Common/Mock/TestHttpResponse.cs index ff47c10..190f6d5 100644 --- a/OpenSim/Tests/Common/Mock/TestHttpResponse.cs +++ b/OpenSim/Tests/Common/Mock/TestHttpResponse.cs | |||
@@ -33,9 +33,10 @@ using HttpServer; | |||
33 | 33 | ||
34 | namespace OpenSim.Tests.Common | 34 | namespace OpenSim.Tests.Common |
35 | { | 35 | { |
36 | /* | ||
36 | public class TestHttpResponse: IHttpResponse | 37 | public class TestHttpResponse: IHttpResponse |
37 | { | 38 | { |
38 | public Stream Body | 39 | public Stream Body |
39 | { | 40 | { |
40 | get { return _body; } | 41 | get { return _body; } |
41 | 42 | ||
@@ -43,14 +44,14 @@ namespace OpenSim.Tests.Common | |||
43 | } | 44 | } |
44 | private Stream _body; | 45 | private Stream _body; |
45 | 46 | ||
46 | public string ProtocolVersion | 47 | public string ProtocolVersion |
47 | { | 48 | { |
48 | get { return _protocolVersion; } | 49 | get { return _protocolVersion; } |
49 | set { _protocolVersion = value; } | 50 | set { _protocolVersion = value; } |
50 | } | 51 | } |
51 | private string _protocolVersion; | 52 | private string _protocolVersion; |
52 | 53 | ||
53 | public bool Chunked | 54 | public bool Chunked |
54 | { | 55 | { |
55 | get { return _chunked; } | 56 | get { return _chunked; } |
56 | 57 | ||
@@ -58,7 +59,7 @@ namespace OpenSim.Tests.Common | |||
58 | } | 59 | } |
59 | private bool _chunked; | 60 | private bool _chunked; |
60 | 61 | ||
61 | public ConnectionType Connection | 62 | public ConnectionType Connection |
62 | { | 63 | { |
63 | get { return _connection; } | 64 | get { return _connection; } |
64 | 65 | ||
@@ -66,7 +67,7 @@ namespace OpenSim.Tests.Common | |||
66 | } | 67 | } |
67 | private ConnectionType _connection; | 68 | private ConnectionType _connection; |
68 | 69 | ||
69 | public Encoding Encoding | 70 | public Encoding Encoding |
70 | { | 71 | { |
71 | get { return _encoding; } | 72 | get { return _encoding; } |
72 | 73 | ||
@@ -74,7 +75,7 @@ namespace OpenSim.Tests.Common | |||
74 | } | 75 | } |
75 | private Encoding _encoding; | 76 | private Encoding _encoding; |
76 | 77 | ||
77 | public int KeepAlive | 78 | public int KeepAlive |
78 | { | 79 | { |
79 | get { return _keepAlive; } | 80 | get { return _keepAlive; } |
80 | 81 | ||
@@ -82,7 +83,7 @@ namespace OpenSim.Tests.Common | |||
82 | } | 83 | } |
83 | private int _keepAlive; | 84 | private int _keepAlive; |
84 | 85 | ||
85 | public HttpStatusCode Status | 86 | public HttpStatusCode Status |
86 | { | 87 | { |
87 | get { return _status; } | 88 | get { return _status; } |
88 | 89 | ||
@@ -90,7 +91,7 @@ namespace OpenSim.Tests.Common | |||
90 | } | 91 | } |
91 | private HttpStatusCode _status; | 92 | private HttpStatusCode _status; |
92 | 93 | ||
93 | public string Reason | 94 | public string Reason |
94 | { | 95 | { |
95 | get { return _reason; } | 96 | get { return _reason; } |
96 | 97 | ||
@@ -98,7 +99,7 @@ namespace OpenSim.Tests.Common | |||
98 | } | 99 | } |
99 | private string _reason; | 100 | private string _reason; |
100 | 101 | ||
101 | public long ContentLength | 102 | public long ContentLength |
102 | { | 103 | { |
103 | get { return _contentLength; } | 104 | get { return _contentLength; } |
104 | 105 | ||
@@ -106,7 +107,7 @@ namespace OpenSim.Tests.Common | |||
106 | } | 107 | } |
107 | private long _contentLength; | 108 | private long _contentLength; |
108 | 109 | ||
109 | public string ContentType | 110 | public string ContentType |
110 | { | 111 | { |
111 | get { return _contentType; } | 112 | get { return _contentType; } |
112 | 113 | ||
@@ -114,19 +115,19 @@ namespace OpenSim.Tests.Common | |||
114 | } | 115 | } |
115 | private string _contentType; | 116 | private string _contentType; |
116 | 117 | ||
117 | public bool HeadersSent | 118 | public bool HeadersSent |
118 | { | 119 | { |
119 | get { return _headersSent; } | 120 | get { return _headersSent; } |
120 | } | 121 | } |
121 | private bool _headersSent; | 122 | private bool _headersSent; |
122 | 123 | ||
123 | public bool Sent | 124 | public bool Sent |
124 | { | 125 | { |
125 | get { return _sent; } | 126 | get { return _sent; } |
126 | } | 127 | } |
127 | private bool _sent; | 128 | private bool _sent; |
128 | 129 | ||
129 | public ResponseCookies Cookies | 130 | public ResponseCookies Cookies |
130 | { | 131 | { |
131 | get { return _cookies; } | 132 | get { return _cookies; } |
132 | } | 133 | } |
@@ -140,26 +141,26 @@ namespace OpenSim.Tests.Common | |||
140 | 141 | ||
141 | public void AddHeader(string name, string value) {} | 142 | public void AddHeader(string name, string value) {} |
142 | 143 | ||
143 | public void Send() | 144 | public void Send() |
144 | { | 145 | { |
145 | if (!_headersSent) SendHeaders(); | 146 | if (!_headersSent) SendHeaders(); |
146 | if (_sent) throw new InvalidOperationException("stuff already sent"); | 147 | if (_sent) throw new InvalidOperationException("stuff already sent"); |
147 | _sent = true; | 148 | _sent = true; |
148 | } | 149 | } |
149 | 150 | ||
150 | public void SendBody(byte[] buffer, int offset, int count) | 151 | public void SendBody(byte[] buffer, int offset, int count) |
151 | { | 152 | { |
152 | if (!_headersSent) SendHeaders(); | 153 | if (!_headersSent) SendHeaders(); |
153 | _sent = true; | 154 | _sent = true; |
154 | } | 155 | } |
155 | 156 | ||
156 | public void SendBody(byte[] buffer) | 157 | public void SendBody(byte[] buffer) |
157 | { | 158 | { |
158 | if (!_headersSent) SendHeaders(); | 159 | if (!_headersSent) SendHeaders(); |
159 | _sent = true; | 160 | _sent = true; |
160 | } | 161 | } |
161 | 162 | ||
162 | public void SendHeaders() | 163 | public void SendHeaders() |
163 | { | 164 | { |
164 | if (_headersSent) throw new InvalidOperationException("headers already sent"); | 165 | if (_headersSent) throw new InvalidOperationException("headers already sent"); |
165 | _headersSent = true; | 166 | _headersSent = true; |
@@ -168,4 +169,5 @@ namespace OpenSim.Tests.Common | |||
168 | public void Redirect(Uri uri) {} | 169 | public void Redirect(Uri uri) {} |
169 | public void Redirect(string url) {} | 170 | public void Redirect(string url) {} |
170 | } | 171 | } |
172 | */ | ||
171 | } \ No newline at end of file | 173 | } \ No newline at end of file |