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