diff options
author | teravus | 2013-02-05 18:02:25 -0500 |
---|---|---|
committer | teravus | 2013-02-05 18:02:25 -0500 |
commit | 1dc09d8e8f4a6caa321d0227722af97ee4aeed6a (patch) | |
tree | 88bf751c1031c8a458e57c79c37804f983b43e42 /bin/HttpServer_OpenSim.xml | |
parent | Merge branch 'master' into JSONTCPClient (diff) | |
download | opensim-SC-1dc09d8e8f4a6caa321d0227722af97ee4aeed6a.zip opensim-SC-1dc09d8e8f4a6caa321d0227722af97ee4aeed6a.tar.gz opensim-SC-1dc09d8e8f4a6caa321d0227722af97ee4aeed6a.tar.bz2 opensim-SC-1dc09d8e8f4a6caa321d0227722af97ee4aeed6a.tar.xz |
We're not really done here.. but we're getting there. Socket Read is working.. Still have to do Header.ToBytes and compose a websocket frame with a payload.
Diffstat (limited to 'bin/HttpServer_OpenSim.xml')
-rw-r--r-- | bin/HttpServer_OpenSim.xml | 5802 |
1 files changed, 2901 insertions, 2901 deletions
diff --git a/bin/HttpServer_OpenSim.xml b/bin/HttpServer_OpenSim.xml index d31bcca..fa88fc7 100644 --- a/bin/HttpServer_OpenSim.xml +++ b/bin/HttpServer_OpenSim.xml | |||
@@ -4,922 +4,421 @@ | |||
4 | <name>HttpServer_OpenSim</name> | 4 | <name>HttpServer_OpenSim</name> |
5 | </assembly> | 5 | </assembly> |
6 | <members> | 6 | <members> |
7 | <member name="T:HttpServer.Sessions.IHttpSessionStore"> | 7 | <member name="T:HttpServer.RealmHandler"> |
8 | <summary> | ||
9 | A session store is used to store and load sessions on a media. | ||
10 | The default implementation (<see cref="T:HttpServer.Sessions.MemorySessionStore"/>) saves/retrieves sessions from memory. | ||
11 | </summary> | ||
12 | </member> | ||
13 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Create"> | ||
14 | <summary> | ||
15 | Creates a new http session with a generated id. | ||
16 | </summary> | ||
17 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object</returns> | ||
18 | </member> | ||
19 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Create(System.String)"> | ||
20 | <summary> | 8 | <summary> |
21 | Creates a new http session with a specific id | 9 | Delegate used to find a realm/domain. |
22 | </summary> | 10 | </summary> |
23 | <param name="id">Id used to identify the new cookie..</param> | 11 | <param name="domain"></param> |
24 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object.</returns> | 12 | <returns></returns> |
25 | <remarks> | 13 | <remarks> |
26 | Id should be generated by the store implementation if it's null or <see cref="F:System.String.Empty"/>. | 14 | Realms are used during HTTP Authentication |
27 | </remarks> | 15 | </remarks> |
16 | <seealso cref="T:HttpServer.Authentication.AuthenticationModule"/> | ||
17 | <seealso cref="T:HttpServer.Authentication.AuthenticationHandler"/> | ||
28 | </member> | 18 | </member> |
29 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Load(System.String)"> | 19 | <member name="T:HttpServer.HttpServer"> |
30 | <summary> | ||
31 | Load an existing session. | ||
32 | </summary> | ||
33 | <param name="sessionId">Session id (usually retrieved from a client side cookie).</param> | ||
34 | <returns>A session if found; otherwise null.</returns> | ||
35 | </member> | ||
36 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Save(HttpServer.Sessions.IHttpSession)"> | ||
37 | <summary> | ||
38 | Save an updated session to the store. | ||
39 | </summary> | ||
40 | <param name="session">Session id (usually retrieved from a client side cookie).</param> | ||
41 | <exception cref="T:System.ArgumentException">If Id property have not been specified.</exception> | ||
42 | </member> | ||
43 | <member name="M:HttpServer.Sessions.IHttpSessionStore.AddUnused(HttpServer.Sessions.IHttpSession)"> | ||
44 | <summary> | ||
45 | We use the flyweight pattern which reuses small objects | ||
46 | instead of creating new each time. | ||
47 | </summary> | ||
48 | <param name="session">Unused session that should be reused next time Create is called.</param> | ||
49 | </member> | ||
50 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Cleanup"> | ||
51 | <summary> | ||
52 | Remove expired sessions | ||
53 | </summary> | ||
54 | </member> | ||
55 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Remove(System.String)"> | ||
56 | <summary> | ||
57 | Remove a session | ||
58 | </summary> | ||
59 | <param name="sessionId">id of the session.</param> | ||
60 | </member> | ||
61 | <member name="P:HttpServer.Sessions.IHttpSessionStore.Item(System.String)"> | ||
62 | <summary> | ||
63 | Load a session from the store | ||
64 | </summary> | ||
65 | <param name="sessionId"></param> | ||
66 | <returns>null if session is not found.</returns> | ||
67 | </member> | ||
68 | <member name="P:HttpServer.Sessions.IHttpSessionStore.ExpireTime"> | ||
69 | <summary> | ||
70 | Number of minutes before a session expires. | ||
71 | </summary> | ||
72 | <value>Default time is 20 minutes.</value> | ||
73 | </member> | ||
74 | <member name="T:HttpServer.IHttpRequest"> | ||
75 | <summary> | ||
76 | Contains server side HTTP request information. | ||
77 | </summary> | ||
78 | </member> | ||
79 | <member name="M:HttpServer.IHttpRequest.AddHeader(System.String,System.String)"> | ||
80 | <summary> | ||
81 | Called during parsing of a <see cref="T:HttpServer.IHttpRequest"/>. | ||
82 | </summary> | ||
83 | <param name="name">Name of the header, should not be URL encoded</param> | ||
84 | <param name="value">Value of the header, should not be URL encoded</param> | ||
85 | <exception cref="T:HttpServer.Exceptions.BadRequestException">If a header is incorrect.</exception> | ||
86 | </member> | ||
87 | <member name="M:HttpServer.IHttpRequest.AddToBody(System.Byte[],System.Int32,System.Int32)"> | ||
88 | <summary> | 20 | <summary> |
89 | Add bytes to the body | 21 | A complete HTTP server, you need to add a module to it to be able to handle incoming requests. |
90 | </summary> | 22 | </summary> |
91 | <param name="bytes">buffer to read bytes from</param> | 23 | <example> |
92 | <param name="offset">where to start read</param> | 24 | <code> |
93 | <param name="length">number of bytes to read</param> | 25 | // this small example will add two web site modules, thus handling |
94 | <returns>Number of bytes actually read (same as length unless we got all body bytes).</returns> | 26 | // two different sites. In reality you should add Controller modules or something |
95 | <exception cref="T:System.InvalidOperationException">If body is not writable</exception> | 27 | // two the website modules to be able to handle different requests. |
96 | <exception cref="T:System.ArgumentNullException"><c>bytes</c> is null.</exception> | 28 | HttpServer server = new HttpServer(); |
97 | <exception cref="T:System.ArgumentOutOfRangeException"><c>offset</c> is out of range.</exception> | 29 | server.Add(new WebSiteModule("www.gauffin.com", "Gauffin Telecom AB")); |
30 | server.Add(new WebSiteModule("www.vapadi.se", "Remote PBX")); | ||
31 | |||
32 | // start regular http | ||
33 | server.Start(IPAddress.Any, 80); | ||
34 | |||
35 | // start https | ||
36 | server.Start(IPAddress.Any, 443, myCertificate); | ||
37 | </code> | ||
38 | </example> | ||
39 | <seealso cref="T:HttpServer.HttpModules.HttpModule"/> | ||
40 | <seealso cref="T:HttpServer.HttpModules.FileModule"/> | ||
41 | <seealso cref="T:HttpServer.HttpListener"/> | ||
98 | </member> | 42 | </member> |
99 | <member name="M:HttpServer.IHttpRequest.Clear"> | 43 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.IComponentProvider)"> |
100 | <summary> | 44 | <summary> |
101 | Clear everything in the request | 45 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
102 | </summary> | 46 | </summary> |
47 | <param name="provider">Used to get all components used in the server..</param> | ||
103 | </member> | 48 | </member> |
104 | <member name="M:HttpServer.IHttpRequest.DecodeBody(HttpServer.FormDecoders.FormDecoderProvider)"> | 49 | <member name="M:HttpServer.HttpServer.#ctor"> |
105 | <summary> | 50 | <summary> |
106 | Decode body into a form. | 51 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
107 | </summary> | 52 | </summary> |
108 | <param name="providers">A list with form decoders.</param> | ||
109 | <exception cref="T:System.IO.InvalidDataException">If body contents is not valid for the chosen decoder.</exception> | ||
110 | <exception cref="T:System.InvalidOperationException">If body is still being transferred.</exception> | ||
111 | </member> | 53 | </member> |
112 | <member name="M:HttpServer.IHttpRequest.SetCookies(HttpServer.RequestCookies)"> | 54 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider)"> |
113 | <summary> | 55 | <summary> |
114 | Sets the cookies. | 56 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
115 | </summary> | 57 | </summary> |
116 | <param name="cookies">The cookies.</param> | 58 | <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param> |
59 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> | ||
60 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> | ||
117 | </member> | 61 | </member> |
118 | <member name="M:HttpServer.IHttpRequest.CreateResponse(HttpServer.IHttpClientContext)"> | 62 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.Sessions.IHttpSessionStore)"> |
119 | <summary> | 63 | <summary> |
120 | Create a response object. | 64 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
121 | </summary> | 65 | </summary> |
122 | <param name="context">Context for the connected client.</param> | 66 | <param name="sessionStore">A session store is used to save and retrieve sessions</param> |
123 | <returns>A new <see cref="T:HttpServer.IHttpResponse"/>.</returns> | 67 | <seealso cref="T:HttpServer.Sessions.IHttpSessionStore"/> |
124 | </member> | 68 | </member> |
125 | <member name="P:HttpServer.IHttpRequest.AcceptTypes"> | 69 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.ILogWriter)"> |
126 | <summary> | 70 | <summary> |
127 | Gets kind of types accepted by the client. | 71 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
128 | </summary> | 72 | </summary> |
73 | <param name="logWriter">The log writer.</param> | ||
74 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
129 | </member> | 75 | </member> |
130 | <member name="P:HttpServer.IHttpRequest.Body"> | 76 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider,HttpServer.ILogWriter)"> |
131 | <summary> | 77 | <summary> |
132 | Gets or sets body stream. | 78 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
133 | </summary> | 79 | </summary> |
80 | <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param> | ||
81 | <param name="logWriter">The log writer.</param> | ||
82 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> | ||
83 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> | ||
84 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
134 | </member> | 85 | </member> |
135 | <member name="P:HttpServer.IHttpRequest.BodyIsComplete"> | 86 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider,HttpServer.Sessions.IHttpSessionStore,HttpServer.ILogWriter)"> |
136 | <summary> | 87 | <summary> |
137 | Gets whether the body is complete. | 88 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
138 | </summary> | 89 | </summary> |
90 | <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param> | ||
91 | <param name="sessionStore">A session store is used to save and retrieve sessions</param> | ||
92 | <param name="logWriter">The log writer.</param> | ||
93 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> | ||
94 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> | ||
95 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
96 | <seealso cref="T:HttpServer.Sessions.IHttpSessionStore"/> | ||
139 | </member> | 97 | </member> |
140 | <member name="P:HttpServer.IHttpRequest.Connection"> | 98 | <member name="M:HttpServer.HttpServer.Add(HttpServer.Rules.IRule)"> |
141 | <summary> | 99 | <summary> |
142 | Gets or sets kind of connection used for the session. | 100 | Adds the specified rule. |
143 | </summary> | 101 | </summary> |
102 | <param name="rule">The rule.</param> | ||
144 | </member> | 103 | </member> |
145 | <member name="P:HttpServer.IHttpRequest.ContentLength"> | 104 | <member name="M:HttpServer.HttpServer.Add(HttpServer.HttpModules.HttpModule)"> |
146 | <summary> | 105 | <summary> |
147 | Gets or sets number of bytes in the body. | 106 | Add a <see cref="T:HttpServer.HttpModules.HttpModule"/> to the server. |
148 | </summary> | 107 | </summary> |
108 | <param name="module">mode to add</param> | ||
149 | </member> | 109 | </member> |
150 | <member name="P:HttpServer.IHttpRequest.Cookies"> | 110 | <member name="M:HttpServer.HttpServer.DecodeBody(HttpServer.IHttpRequest)"> |
151 | <summary> | 111 | <summary> |
152 | Gets cookies that was sent with the request. | 112 | Decodes the request body. |
153 | </summary> | 113 | </summary> |
114 | <param name="request">The request.</param> | ||
115 | <exception cref="T:HttpServer.Exceptions.InternalServerException">Failed to decode form data.</exception> | ||
154 | </member> | 116 | </member> |
155 | <member name="P:HttpServer.IHttpRequest.Form"> | 117 | <member name="M:HttpServer.HttpServer.ErrorPage(HttpServer.IHttpResponse,System.Net.HttpStatusCode,System.String)"> |
156 | <summary> | 118 | <summary> |
157 | Gets form parameters. | 119 | Generate a HTTP error page (that will be added to the response body). |
120 | response status code is also set. | ||
158 | </summary> | 121 | </summary> |
122 | <param name="response">Response that the page will be generated in.</param> | ||
123 | <param name="error"><see cref="T:System.Net.HttpStatusCode"/>.</param> | ||
124 | <param name="body">response body contents.</param> | ||
159 | </member> | 125 | </member> |
160 | <member name="P:HttpServer.IHttpRequest.Headers"> | 126 | <member name="M:HttpServer.HttpServer.ErrorPage(HttpServer.IHttpResponse,HttpServer.Exceptions.HttpException)"> |
161 | <summary> | 127 | <summary> |
162 | Gets headers sent by the client. | 128 | Generate a HTTP error page (that will be added to the response body). |
129 | response status code is also set. | ||
163 | </summary> | 130 | </summary> |
131 | <param name="response">Response that the page will be generated in.</param> | ||
132 | <param name="err">exception.</param> | ||
164 | </member> | 133 | </member> |
165 | <member name="P:HttpServer.IHttpRequest.HttpVersion"> | 134 | <member name="M:HttpServer.HttpServer.GetRealm(HttpServer.IHttpRequest)"> |
166 | <summary> | 135 | <summary> |
167 | Gets or sets version of HTTP protocol that's used. | 136 | Realms are used by the <see cref="T:HttpServer.Authentication.AuthenticationModule"/>s. |
168 | </summary> | 137 | </summary> |
169 | <remarks> | 138 | <param name="request">HTTP request</param> |
170 | Probably <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/>. | 139 | <returns>domain/realm.</returns> |
171 | </remarks> | ||
172 | <seealso cref="T:HttpServer.HttpHelper"/> | ||
173 | </member> | 140 | </member> |
174 | <member name="P:HttpServer.IHttpRequest.IsAjax"> | 141 | <member name="M:HttpServer.HttpServer.HandleRequest(HttpServer.IHttpClientContext,HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
175 | <summary> | 142 | <summary> |
176 | Gets whether the request was made by Ajax (Asynchronous JavaScript) | 143 | Process an incoming request. |
177 | </summary> | 144 | </summary> |
145 | <param name="context">connection to client</param> | ||
146 | <param name="request">request information</param> | ||
147 | <param name="response">response that should be filled</param> | ||
148 | <param name="session">session information</param> | ||
178 | </member> | 149 | </member> |
179 | <member name="P:HttpServer.IHttpRequest.Method"> | 150 | <member name="M:HttpServer.HttpServer.OnClientDisconnected(HttpServer.IHttpClientContext,System.Net.Sockets.SocketError)"> |
180 | <summary> | 151 | <summary> |
181 | Gets or sets requested method. | 152 | Can be overloaded to implement stuff when a client have been connected. |
182 | </summary> | 153 | </summary> |
183 | <remarks> | 154 | <remarks> |
184 | Will always be in upper case. | 155 | Default implementation does nothing. |
185 | </remarks> | 156 | </remarks> |
186 | <see cref="P:HttpServer.IHttpRequest.Method"/> | 157 | <param name="client">client that disconnected</param> |
187 | </member> | 158 | <param name="error">disconnect reason</param> |
188 | <member name="P:HttpServer.IHttpRequest.Param"> | ||
189 | <summary> | ||
190 | Gets parameter from <see cref="P:HttpServer.IHttpRequest.QueryString"/> or <see cref="P:HttpServer.IHttpRequest.Form"/>. | ||
191 | </summary> | ||
192 | </member> | ||
193 | <member name="P:HttpServer.IHttpRequest.QueryString"> | ||
194 | <summary> | ||
195 | Gets variables sent in the query string | ||
196 | </summary> | ||
197 | </member> | ||
198 | <member name="P:HttpServer.IHttpRequest.Uri"> | ||
199 | <summary> | ||
200 | Gets or sets requested URI. | ||
201 | </summary> | ||
202 | </member> | 159 | </member> |
203 | <member name="P:HttpServer.IHttpRequest.UriParts"> | 160 | <member name="M:HttpServer.HttpServer.ProcessAuthentication(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
204 | <summary> | 161 | <summary> |
205 | Gets URI absolute path divided into parts. | 162 | Handle authentication |
206 | </summary> | 163 | </summary> |
207 | <example> | 164 | <param name="request"></param> |
208 | // URI is: http://gauffin.com/code/tiny/ | 165 | <param name="response"></param> |
209 | Console.WriteLine(request.UriParts[0]); // result: code | 166 | <param name="session"></param> |
210 | Console.WriteLine(request.UriParts[1]); // result: tiny | 167 | <returns>true if request can be handled; false if not.</returns> |
211 | </example> | 168 | <exception cref="T:HttpServer.Exceptions.BadRequestException">Invalid authorization header</exception> |
212 | <remarks> | ||
213 | If you're using controllers than the first part is controller name, | ||
214 | the second part is method name and the third part is Id property. | ||
215 | </remarks> | ||
216 | <seealso cref="P:HttpServer.IHttpRequest.Uri"/> | ||
217 | </member> | 169 | </member> |
218 | <member name="P:HttpServer.IHttpRequest.UriPath"> | 170 | <member name="M:HttpServer.HttpServer.RequestAuthentication(HttpServer.Authentication.AuthenticationModule,HttpServer.IHttpRequest,HttpServer.IHttpResponse)"> |
219 | <summary> | 171 | <summary> |
220 | Gets or sets path and query. | 172 | Will request authentication. |
221 | </summary> | 173 | </summary> |
222 | <see cref="P:HttpServer.IHttpRequest.Uri"/> | ||
223 | <remarks> | 174 | <remarks> |
224 | Are only used during request parsing. Cannot be set after "Host" header have been | 175 | Sends respond to client, nothing else can be done with the response after this. |
225 | added. | ||
226 | </remarks> | 176 | </remarks> |
177 | <param name="mod"></param> | ||
178 | <param name="request"></param> | ||
179 | <param name="response"></param> | ||
227 | </member> | 180 | </member> |
228 | <member name="T:HttpServer.IHttpContextHandler"> | 181 | <member name="M:HttpServer.HttpServer.OnRequest(System.Object,HttpServer.RequestEventArgs)"> |
229 | <summary> | ||
230 | Class that receives Requests from a <see cref="T:HttpServer.IHttpClientContext"/>. | ||
231 | </summary> | ||
232 | </member> | ||
233 | <member name="M:HttpServer.IHttpContextHandler.ClientDisconnected(HttpServer.IHttpClientContext,System.Net.Sockets.SocketError)"> | ||
234 | <summary> | ||
235 | Client have been disconnected. | ||
236 | </summary> | ||
237 | <param name="client">Client that was disconnected.</param> | ||
238 | <param name="error">Reason</param> | ||
239 | <see cref="T:HttpServer.IHttpClientContext"/> | ||
240 | </member> | ||
241 | <member name="M:HttpServer.IHttpContextHandler.RequestReceived(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> | ||
242 | <summary> | ||
243 | Invoked when a client context have received a new HTTP request | ||
244 | </summary> | ||
245 | <param name="client">Client that received the request.</param> | ||
246 | <param name="request">Request that was received.</param> | ||
247 | <see cref="T:HttpServer.IHttpClientContext"/> | ||
248 | </member> | ||
249 | <member name="T:HttpServer.Helpers.GetIdTitle"> | ||
250 | <summary> | ||
251 | Delegate used by <see cref="M:HttpServer.Helpers.FormHelper.Select(System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"/> to populate select options. | ||
252 | </summary> | ||
253 | <param name="obj">current object (for instance a User).</param> | ||
254 | <param name="id">Text that should be displayed in the value part of a <optiongt;-tag.</param> | ||
255 | <param name="title">Text shown in the select list.</param> | ||
256 | <example> | ||
257 | // Class that is going to be used in a SELECT-tag. | ||
258 | public class User | ||
259 | { | ||
260 | private readonly string _realName; | ||
261 | private readonly int _id; | ||
262 | public User(int id, string realName) | ||
263 | { | ||
264 | _id = id; | ||
265 | _realName = realName; | ||
266 | } | ||
267 | public string RealName | ||
268 | { | ||
269 | get { return _realName; } | ||
270 | } | ||
271 | |||
272 | public int Id | ||
273 | { | ||
274 | get { return _id; } | ||
275 | } | ||
276 | } | ||
277 | |||
278 | // Using an inline delegate to generate the select list | ||
279 | public void UserInlineDelegate() | ||
280 | { | ||
281 | List<User> items = new List<User>(); | ||
282 | items.Add(new User(1, "adam")); | ||
283 | items.Add(new User(2, "bertial")); | ||
284 | items.Add(new User(3, "david")); | ||
285 | string htmlSelect = Select("users", "users", items, delegate(object o, out object id, out object value) | ||
286 | { | ||
287 | User user = (User)o; | ||
288 | id = user.Id; | ||
289 | value = user.RealName; | ||
290 | }, 2, true); | ||
291 | } | ||
292 | |||
293 | // Using an method as delegate to generate the select list. | ||
294 | public void UseExternalDelegate() | ||
295 | { | ||
296 | List<User> items = new List<User>(); | ||
297 | items.Add(new User(1, "adam")); | ||
298 | items.Add(new User(2, "bertial")); | ||
299 | items.Add(new User(3, "david")); | ||
300 | string htmlSelect = Select("users", "users", items, UserOptions, 1, true); | ||
301 | } | ||
302 | |||
303 | // delegate returning id and title | ||
304 | public static void UserOptions(object o, out object id, out object title) | ||
305 | { | ||
306 | User user = (User)o; | ||
307 | id = user.Id; | ||
308 | value = user.RealName; | ||
309 | } /// </example> | ||
310 | </member> | ||
311 | <member name="T:HttpServer.Exceptions.ForbiddenException"> | ||
312 | <summary> | ||
313 | The server understood the request, but is refusing to fulfill it. | ||
314 | Authorization will not help and the request SHOULD NOT be repeated. | ||
315 | If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, | ||
316 | it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information | ||
317 | available to the client, the status code 404 (Not Found) can be used instead. | ||
318 | |||
319 | Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php | ||
320 | </summary> | ||
321 | </member> | ||
322 | <member name="T:HttpServer.Exceptions.HttpException"> | ||
323 | <summary> | ||
324 | All HTTP based exceptions will derive this class. | ||
325 | </summary> | ||
326 | </member> | ||
327 | <member name="M:HttpServer.Exceptions.HttpException.#ctor(System.Net.HttpStatusCode,System.String)"> | ||
328 | <summary> | ||
329 | Create a new HttpException | ||
330 | </summary> | ||
331 | <param name="code">http status code (sent in the response)</param> | ||
332 | <param name="message">error description</param> | ||
333 | </member> | ||
334 | <member name="M:HttpServer.Exceptions.HttpException.#ctor(System.Net.HttpStatusCode,System.String,System.Exception)"> | ||
335 | <summary> | ||
336 | Create a new HttpException | ||
337 | </summary> | ||
338 | <param name="code">http status code (sent in the response)</param> | ||
339 | <param name="message">error description</param> | ||
340 | <param name="inner">inner exception</param> | ||
341 | </member> | ||
342 | <member name="P:HttpServer.Exceptions.HttpException.HttpStatusCode"> | ||
343 | <summary> | ||
344 | status code to use in the response. | ||
345 | </summary> | ||
346 | </member> | ||
347 | <member name="M:HttpServer.Exceptions.ForbiddenException.#ctor(System.String)"> | ||
348 | <summary> | ||
349 | Initializes a new instance of the <see cref="T:HttpServer.Exceptions.ForbiddenException"/> class. | ||
350 | </summary> | ||
351 | <param name="errorMsg">error message</param> | ||
352 | </member> | ||
353 | <member name="T:HttpServer.Sessions.MemorySession"> | ||
354 | <summary> | ||
355 | A session stored in memory. | ||
356 | </summary> | ||
357 | </member> | ||
358 | <member name="T:HttpServer.Sessions.IHttpSession"> | ||
359 | <summary> | ||
360 | Interface for sessions | ||
361 | </summary> | ||
362 | </member> | ||
363 | <member name="M:HttpServer.Sessions.IHttpSession.Clear"> | ||
364 | <summary> | ||
365 | Remove everything from the session | ||
366 | </summary> | ||
367 | </member> | ||
368 | <member name="M:HttpServer.Sessions.IHttpSession.Clear(System.Boolean)"> | ||
369 | <summary> | ||
370 | Remove everything from the session | ||
371 | </summary> | ||
372 | <param name="expires">True if the session is cleared due to expiration</param> | ||
373 | </member> | ||
374 | <member name="P:HttpServer.Sessions.IHttpSession.Id"> | ||
375 | <summary> | ||
376 | Session id | ||
377 | </summary> | ||
378 | </member> | ||
379 | <member name="P:HttpServer.Sessions.IHttpSession.Item(System.String)"> | ||
380 | <summary> | ||
381 | Should | ||
382 | </summary> | ||
383 | <param name="name">Name of the session variable</param> | ||
384 | <returns>null if it's not set</returns> | ||
385 | <exception cref="T:System.Runtime.Serialization.SerializationException">If the object cant be serialized.</exception> | ||
386 | </member> | ||
387 | <member name="P:HttpServer.Sessions.IHttpSession.Accessed"> | ||
388 | <summary> | ||
389 | When the session was last accessed. | ||
390 | This property is touched by the http server each time the | ||
391 | session is requested. | ||
392 | </summary> | ||
393 | </member> | ||
394 | <member name="P:HttpServer.Sessions.IHttpSession.Count"> | ||
395 | <summary> | ||
396 | Number of session variables. | ||
397 | </summary> | ||
398 | </member> | ||
399 | <member name="E:HttpServer.Sessions.IHttpSession.BeforeClear"> | ||
400 | <summary> | ||
401 | Event triggered upon clearing the session | ||
402 | </summary> | ||
403 | </member> | ||
404 | <member name="M:HttpServer.Sessions.MemorySession.#ctor(System.String)"> | ||
405 | <summary> | 182 | <summary> |
406 | 183 | Received from a <see cref="T:HttpServer.IHttpClientContext"/> when a request have been parsed successfully. | |
407 | </summary> | 184 | </summary> |
408 | <param name="id">A unique id used by the sessions store to identify the session</param> | 185 | <param name="source"><see cref="T:HttpServer.IHttpClientContext"/> that received the request.</param> |
186 | <param name="args">The request.</param> | ||
409 | </member> | 187 | </member> |
410 | <member name="M:HttpServer.Sessions.MemorySession.SetId(System.String)"> | 188 | <member name="M:HttpServer.HttpServer.ProcessRequestWrapper(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> |
411 | <summary> | 189 | <summary> |
412 | Id | 190 | To be able to track request count. |
413 | </summary> | 191 | </summary> |
414 | <param name="id"></param> | 192 | <param name="context"></param> |
193 | <param name="request"></param> | ||
415 | </member> | 194 | </member> |
416 | <member name="M:HttpServer.Sessions.MemorySession.Clear"> | 195 | <member name="M:HttpServer.HttpServer.Start(System.Net.IPAddress,System.Int32)"> |
417 | <summary> | 196 | <summary> |
418 | Remove everything from the session | 197 | Start the web server using regular HTTP. |
419 | </summary> | 198 | </summary> |
199 | <param name="address">IP Address to listen on, use <c>IpAddress.Any </c>to accept connections on all IP addresses/network cards.</param> | ||
200 | <param name="port">Port to listen on. 80 can be a good idea =)</param> | ||
201 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | ||
202 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | ||
420 | </member> | 203 | </member> |
421 | <member name="M:HttpServer.Sessions.MemorySession.Clear(System.Boolean)"> | 204 | <member name="M:HttpServer.HttpServer.Start(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate)"> |
422 | <summary> | 205 | <summary> |
423 | Clears the specified expire. | 206 | Accept secure connections. |
424 | </summary> | 207 | </summary> |
425 | <param name="expires">True if the session is cleared due to expiration</param> | 208 | <param name="address">IP Address to listen on, use <see cref="F:System.Net.IPAddress.Any"/> to accept connections on all IP Addresses / network cards.</param> |
209 | <param name="port">Port to listen on. 80 can be a good idea =)</param> | ||
210 | <param name="certificate">Certificate to use</param> | ||
211 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | ||
212 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | ||
426 | </member> | 213 | </member> |
427 | <member name="M:HttpServer.Sessions.MemorySession.Dispose"> | 214 | <member name="M:HttpServer.HttpServer.Stop"> |
428 | <summary> | 215 | <summary> |
429 | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | 216 | shut down the server and listeners |
430 | </summary> | 217 | </summary> |
431 | <filterpriority>2</filterpriority> | ||
432 | </member> | 218 | </member> |
433 | <member name="P:HttpServer.Sessions.MemorySession.Id"> | 219 | <member name="M:HttpServer.HttpServer.WriteLog(HttpServer.LogPrio,System.String)"> |
434 | <summary> | 220 | <summary> |
435 | Session id | 221 | write an entry to the log file |
436 | </summary> | 222 | </summary> |
223 | <param name="prio">importance of the message</param> | ||
224 | <param name="message">log message</param> | ||
437 | </member> | 225 | </member> |
438 | <member name="P:HttpServer.Sessions.MemorySession.Item(System.String)"> | 226 | <member name="M:HttpServer.HttpServer.WriteLog(System.Object,HttpServer.LogPrio,System.String)"> |
439 | <summary> | 227 | <summary> |
440 | Should | 228 | write an entry to the log file |
441 | </summary> | 229 | </summary> |
442 | <param name="name">Name of the session variable</param> | 230 | <param name="source">object that wrote the message</param> |
443 | <returns>null if it's not set</returns> | 231 | <param name="prio">importance of the message</param> |
232 | <param name="message">log message</param> | ||
444 | </member> | 233 | </member> |
445 | <member name="P:HttpServer.Sessions.MemorySession.Accessed"> | 234 | <member name="P:HttpServer.HttpServer.Current"> |
446 | <summary> | 235 | <summary> |
447 | when the session was last accessed. | 236 | Server that is handling the current request. |
448 | </summary> | 237 | </summary> |
449 | <remarks> | 238 | <remarks> |
450 | Used to determine when the session should be removed. | 239 | Will be set as soon as a request arrives to the <see cref="T:HttpServer.HttpServer"/> object. |
451 | </remarks> | 240 | </remarks> |
452 | </member> | 241 | </member> |
453 | <member name="P:HttpServer.Sessions.MemorySession.Count"> | 242 | <member name="P:HttpServer.HttpServer.AuthenticationModules"> |
454 | <summary> | ||
455 | Number of values in the session | ||
456 | </summary> | ||
457 | </member> | ||
458 | <member name="P:HttpServer.Sessions.MemorySession.Changed"> | ||
459 | <summary> | ||
460 | Flag to indicate that the session have been changed | ||
461 | and should be saved into the session store. | ||
462 | </summary> | ||
463 | </member> | ||
464 | <member name="E:HttpServer.Sessions.MemorySession.BeforeClear"> | ||
465 | <summary> | ||
466 | Event triggered upon clearing the session | ||
467 | </summary> | ||
468 | </member> | ||
469 | <member name="T:HttpServer.ResponseCookie"> | ||
470 | <summary> | ||
471 | cookie being sent back to the browser. | ||
472 | </summary> | ||
473 | <seealso cref="T:HttpServer.ResponseCookie"/> | ||
474 | </member> | ||
475 | <member name="T:HttpServer.RequestCookie"> | ||
476 | <summary> | ||
477 | cookie sent by the client/browser | ||
478 | </summary> | ||
479 | <seealso cref="T:HttpServer.ResponseCookie"/> | ||
480 | </member> | ||
481 | <member name="M:HttpServer.RequestCookie.#ctor(System.String,System.String)"> | ||
482 | <summary> | ||
483 | Constructor. | ||
484 | </summary> | ||
485 | <param name="id">cookie identifier</param> | ||
486 | <param name="content">cookie content</param> | ||
487 | <exception cref="T:System.ArgumentNullException">id or content is null</exception> | ||
488 | <exception cref="T:System.ArgumentException">id is empty</exception> | ||
489 | </member> | ||
490 | <member name="M:HttpServer.RequestCookie.ToString"> | ||
491 | <summary> | ||
492 | Gets the cookie HTML representation. | ||
493 | </summary> | ||
494 | <returns>cookie string</returns> | ||
495 | </member> | ||
496 | <member name="P:HttpServer.RequestCookie.Name"> | ||
497 | <summary> | ||
498 | Gets the cookie identifier. | ||
499 | </summary> | ||
500 | </member> | ||
501 | <member name="P:HttpServer.RequestCookie.Value"> | ||
502 | <summary> | ||
503 | Cookie value. Set to null to remove cookie. | ||
504 | </summary> | ||
505 | </member> | ||
506 | <member name="M:HttpServer.ResponseCookie.#ctor(System.String,System.String,System.DateTime)"> | ||
507 | <summary> | ||
508 | Constructor. | ||
509 | </summary> | ||
510 | <param name="id">cookie identifier</param> | ||
511 | <param name="content">cookie content</param> | ||
512 | <param name="expiresAt">cookie expiration date. Use DateTime.MinValue for session cookie.</param> | ||
513 | <exception cref="T:System.ArgumentNullException">id or content is null</exception> | ||
514 | <exception cref="T:System.ArgumentException">id is empty</exception> | ||
515 | </member> | ||
516 | <member name="M:HttpServer.ResponseCookie.#ctor(System.String,System.String,System.DateTime,System.String,System.String)"> | ||
517 | <summary> | ||
518 | Create a new cookie | ||
519 | </summary> | ||
520 | <param name="name">name identifying the cookie</param> | ||
521 | <param name="value">cookie value</param> | ||
522 | <param name="expires">when the cookie expires. Setting DateTime.MinValue will delete the cookie when the session is closed.</param> | ||
523 | <param name="path">Path to where the cookie is valid</param> | ||
524 | <param name="domain">Domain that the cookie is valid for.</param> | ||
525 | </member> | ||
526 | <member name="M:HttpServer.ResponseCookie.#ctor(HttpServer.RequestCookie,System.DateTime)"> | ||
527 | <summary> | ||
528 | Create a new cookie | ||
529 | </summary> | ||
530 | <param name="cookie">Name and value will be used</param> | ||
531 | <param name="expires">when the cookie expires.</param> | ||
532 | </member> | ||
533 | <member name="M:HttpServer.ResponseCookie.ToString"> | ||
534 | <summary> | ||
535 | Gets the cookie HTML representation. | ||
536 | </summary> | ||
537 | <returns>cookie string</returns> | ||
538 | </member> | ||
539 | <member name="P:HttpServer.ResponseCookie.Expires"> | ||
540 | <summary> | ||
541 | When the cookie expires. | ||
542 | DateTime.MinValue means that the cookie expires when the session do so. | ||
543 | </summary> | ||
544 | </member> | ||
545 | <member name="P:HttpServer.ResponseCookie.Path"> | ||
546 | <summary> | ||
547 | Cookie is only valid under this path. | ||
548 | </summary> | ||
549 | </member> | ||
550 | <member name="T:HttpServer.IHttpClientContext"> | ||
551 | <summary> | ||
552 | Contains a connection to a browser/client. | ||
553 | </summary> | ||
554 | </member> | ||
555 | <member name="M:HttpServer.IHttpClientContext.Disconnect(System.Net.Sockets.SocketError)"> | ||
556 | <summary> | ||
557 | Disconnect from client | ||
558 | </summary> | ||
559 | <param name="error">error to report in the <see cref="E:HttpServer.IHttpClientContext.Disconnected"/> event.</param> | ||
560 | </member> | ||
561 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String,System.String,System.String)"> | ||
562 | <summary> | ||
563 | Send a response. | ||
564 | </summary> | ||
565 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> | ||
566 | <param name="statusCode">HTTP status code</param> | ||
567 | <param name="reason">reason for the status code.</param> | ||
568 | <param name="body">HTML body contents, can be null or empty.</param> | ||
569 | <param name="contentType">A content type to return the body as, i.e. 'text/html' or 'text/plain', defaults to 'text/html' if null or empty</param> | ||
570 | <exception cref="T:System.ArgumentException">If <paramref name="httpVersion"/> is invalid.</exception> | ||
571 | </member> | ||
572 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String)"> | ||
573 | <summary> | ||
574 | Send a response. | ||
575 | </summary> | ||
576 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> | ||
577 | <param name="statusCode">HTTP status code</param> | ||
578 | <param name="reason">reason for the status code.</param> | ||
579 | </member> | ||
580 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String)"> | ||
581 | <summary> | ||
582 | Send a response. | ||
583 | </summary> | ||
584 | <exception cref="T:System.ArgumentNullException"></exception> | ||
585 | </member> | ||
586 | <member name="M:HttpServer.IHttpClientContext.Send(System.Byte[])"> | ||
587 | <summary> | ||
588 | send a whole buffer | ||
589 | </summary> | ||
590 | <param name="buffer">buffer to send</param> | ||
591 | <exception cref="T:System.ArgumentNullException"></exception> | ||
592 | </member> | ||
593 | <member name="M:HttpServer.IHttpClientContext.Send(System.Byte[],System.Int32,System.Int32)"> | ||
594 | <summary> | ||
595 | Send data using the stream | ||
596 | </summary> | ||
597 | <param name="buffer">Contains data to send</param> | ||
598 | <param name="offset">Start position in buffer</param> | ||
599 | <param name="size">number of bytes to send</param> | ||
600 | <exception cref="T:System.ArgumentNullException"></exception> | ||
601 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> | ||
602 | </member> | ||
603 | <member name="M:HttpServer.IHttpClientContext.Close"> | ||
604 | <summary> | ||
605 | Closes the streams and disposes of the unmanaged resources | ||
606 | </summary> | ||
607 | </member> | ||
608 | <member name="P:HttpServer.IHttpClientContext.Secured"> | ||
609 | <summary> | 243 | <summary> |
610 | Using SSL or other encryption method. | 244 | Modules used for authentication. The module that is is added first is used as |
245 | the default authentication module. | ||
611 | </summary> | 246 | </summary> |
247 | <remarks>Use the corresponding property | ||
248 | in the <see cref="T:HttpServer.HttpModules.WebSiteModule"/> if you are using multiple websites.</remarks> | ||
612 | </member> | 249 | </member> |
613 | <member name="P:HttpServer.IHttpClientContext.IsSecured"> | 250 | <member name="P:HttpServer.HttpServer.FormDecoderProviders"> |
614 | <summary> | 251 | <summary> |
615 | Using SSL or other encryption method. | 252 | Form decoder providers are used to decode request body (which normally contains form data). |
616 | </summary> | 253 | </summary> |
617 | </member> | 254 | </member> |
618 | <member name="E:HttpServer.IHttpClientContext.Disconnected"> | 255 | <member name="P:HttpServer.HttpServer.ServerName"> |
619 | <summary> | 256 | <summary> |
620 | The context have been disconnected. | 257 | Server name sent in HTTP responses. |
621 | </summary> | 258 | </summary> |
622 | <remarks> | 259 | <remarks> |
623 | Event can be used to clean up a context, or to reuse it. | 260 | Do NOT include version in name, since it makes it |
261 | easier for hackers. | ||
624 | </remarks> | 262 | </remarks> |
625 | </member> | 263 | </member> |
626 | <member name="E:HttpServer.IHttpClientContext.RequestReceived"> | 264 | <member name="P:HttpServer.HttpServer.SessionCookieName"> |
627 | <summary> | ||
628 | A request have been received in the context. | ||
629 | </summary> | ||
630 | </member> | ||
631 | <member name="T:HttpServer.DisconnectedEventArgs"> | ||
632 | <summary> | ||
633 | A <see cref="T:HttpServer.IHttpClientContext"/> have been disconnected. | ||
634 | </summary> | ||
635 | </member> | ||
636 | <member name="M:HttpServer.DisconnectedEventArgs.#ctor(System.Net.Sockets.SocketError)"> | ||
637 | <summary> | ||
638 | Initializes a new instance of the <see cref="T:HttpServer.DisconnectedEventArgs"/> class. | ||
639 | </summary> | ||
640 | <param name="error">Reason to disconnection.</param> | ||
641 | </member> | ||
642 | <member name="P:HttpServer.DisconnectedEventArgs.Error"> | ||
643 | <summary> | ||
644 | Gets reason to why client disconnected. | ||
645 | </summary> | ||
646 | </member> | ||
647 | <member name="T:HttpServer.RequestEventArgs"> | ||
648 | <summary> | ||
649 | |||
650 | </summary> | ||
651 | </member> | ||
652 | <member name="M:HttpServer.RequestEventArgs.#ctor(HttpServer.IHttpRequest)"> | ||
653 | <summary> | ||
654 | Initializes a new instance of the <see cref="T:HttpServer.RequestEventArgs"/> class. | ||
655 | </summary> | ||
656 | <param name="request">The request.</param> | ||
657 | </member> | ||
658 | <member name="P:HttpServer.RequestEventArgs.Request"> | ||
659 | <summary> | ||
660 | Gets received request. | ||
661 | </summary> | ||
662 | </member> | ||
663 | <member name="T:HttpServer.HttpListenerBase"> | ||
664 | <summary> | ||
665 | Contains a listener that doesn't do anything with the connections. | ||
666 | </summary> | ||
667 | </member> | ||
668 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory)"> | ||
669 | <summary> | ||
670 | Listen for regular HTTP connections | ||
671 | </summary> | ||
672 | <param name="address">IP Address to accept connections on</param> | ||
673 | <param name="port">TCP Port to listen on, default HTTP port is 80.</param> | ||
674 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | ||
675 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | ||
676 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | ||
677 | </member> | ||
678 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate)"> | ||
679 | <summary> | ||
680 | Initializes a new instance of the <see cref="T:HttpServer.HttpListenerBase"/> class. | ||
681 | </summary> | ||
682 | <param name="address">IP Address to accept connections on</param> | ||
683 | <param name="port">TCP Port to listen on, default HTTPS port is 443</param> | ||
684 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | ||
685 | <param name="certificate">Certificate to use</param> | ||
686 | </member> | ||
687 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> | ||
688 | <summary> | ||
689 | Initializes a new instance of the <see cref="T:HttpServer.HttpListenerBase"/> class. | ||
690 | </summary> | ||
691 | <param name="address">IP Address to accept connections on</param> | ||
692 | <param name="port">TCP Port to listen on, default HTTPS port is 443</param> | ||
693 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | ||
694 | <param name="certificate">Certificate to use</param> | ||
695 | <param name="protocol">which HTTPS protocol to use, default is TLS.</param> | ||
696 | </member> | ||
697 | <member name="M:HttpServer.HttpListenerBase.OnAccept(System.IAsyncResult)"> | ||
698 | <exception cref="T:System.Exception"><c>Exception</c>.</exception> | ||
699 | </member> | ||
700 | <member name="M:HttpServer.HttpListenerBase.RetryBeginAccept"> | ||
701 | <summary> | 265 | <summary> |
702 | Will try to accept connections one more time. | 266 | Name of cookie where session id is stored. |
703 | </summary> | 267 | </summary> |
704 | <exception cref="T:System.Exception">If any exceptions is thrown.</exception> | ||
705 | </member> | 268 | </member> |
706 | <member name="M:HttpServer.HttpListenerBase.OnAcceptingSocket(System.Net.Sockets.Socket)"> | 269 | <member name="P:HttpServer.HttpServer.LogWriter"> |
707 | <summary> | 270 | <summary> |
708 | Can be used to create filtering of new connections. | 271 | Specified where logging should go. |
709 | </summary> | 272 | </summary> |
710 | <param name="socket">Accepted socket</param> | 273 | <seealso cref="T:HttpServer.NullLogWriter"/> |
711 | <returns>true if connection can be accepted; otherwise false.</returns> | 274 | <seealso cref="T:HttpServer.ConsoleLogWriter"/> |
275 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
712 | </member> | 276 | </member> |
713 | <member name="M:HttpServer.HttpListenerBase.Start(System.Int32)"> | 277 | <member name="P:HttpServer.HttpServer.BackLog"> |
714 | <summary> | 278 | <summary> |
715 | Start listen for new connections | 279 | Number of connections that can wait to be accepted by the server. |
716 | </summary> | 280 | </summary> |
717 | <param name="backlog">Number of connections that can stand in a queue to be accepted.</param> | 281 | <remarks>Default is 10.</remarks> |
718 | <exception cref="T:System.InvalidOperationException">Listener have already been started.</exception> | ||
719 | </member> | 282 | </member> |
720 | <member name="M:HttpServer.HttpListenerBase.Stop"> | 283 | <member name="P:HttpServer.HttpServer.MaxRequestCount"> |
721 | <summary> | 284 | <summary> |
722 | Stop the listener | 285 | Gets or sets maximum number of allowed simultaneous requests. |
723 | </summary> | 286 | </summary> |
724 | <exception cref="T:System.Net.Sockets.SocketException"></exception> | 287 | <remarks> |
288 | <para> | ||
289 | This property is useful in busy systems. The HTTP server | ||
290 | will start queuing new requests if this limit is hit, instead | ||
291 | of trying to process all incoming requests directly. | ||
292 | </para> | ||
293 | <para> | ||
294 | The default number if allowed simultaneous requests are 10. | ||
295 | </para> | ||
296 | </remarks> | ||
725 | </member> | 297 | </member> |
726 | <member name="P:HttpServer.HttpListenerBase.LogWriter"> | 298 | <member name="P:HttpServer.HttpServer.MaxQueueSize"> |
727 | <summary> | 299 | <summary> |
728 | Gives you a change to receive log entries for all internals of the HTTP library. | 300 | Gets or sets maximum number of requests queuing to be handled. |
729 | </summary> | 301 | </summary> |
730 | <remarks> | 302 | <remarks> |
731 | You may not switch log writer after starting the listener. | 303 | <para> |
304 | The WebServer will start turning requests away if response code | ||
305 | <see cref="F:System.Net.HttpStatusCode.ServiceUnavailable"/> to indicate that the server | ||
306 | is too busy to be able to handle the request. | ||
307 | </para> | ||
732 | </remarks> | 308 | </remarks> |
733 | </member> | 309 | </member> |
734 | <member name="P:HttpServer.HttpListenerBase.UseTraceLogs"> | 310 | <member name="E:HttpServer.HttpServer.RealmWanted"> |
735 | <summary> | 311 | <summary> |
736 | True if we should turn on trace logs. | 312 | Realms are used during HTTP authentication. |
313 | Default realm is same as server name. | ||
737 | </summary> | 314 | </summary> |
738 | </member> | 315 | </member> |
739 | <member name="E:HttpServer.HttpListenerBase.ExceptionThrown"> | 316 | <member name="E:HttpServer.HttpServer.ExceptionThrown"> |
740 | <summary> | 317 | <summary> |
741 | Catch exceptions not handled by the listener. | 318 | Let's to receive unhandled exceptions from the threads. |
742 | </summary> | 319 | </summary> |
743 | <remarks> | 320 | <remarks> |
744 | Exceptions will be thrown during debug mode if this event is not used, | 321 | Exceptions will be thrown during debug mode if this event is not used, |
745 | exceptions will be printed to console and suppressed during release mode. | 322 | exceptions will be printed to console and suppressed during release mode. |
746 | </remarks> | 323 | </remarks> |
747 | </member> | 324 | </member> |
748 | <member name="E:HttpServer.HttpListenerBase.RequestReceived"> | 325 | <member name="T:HttpServer.HttpModules.ResourceFileModule"> |
749 | <summary> | 326 | <summary> |
750 | A request have been received from a <see cref="T:HttpServer.IHttpClientContext"/>. | 327 | Serves files that are stored in embedded resources. |
751 | </summary> | 328 | </summary> |
752 | </member> | 329 | </member> |
753 | <member name="T:HttpServer.FormDecoders.MultipartDecoder"> | 330 | <member name="T:HttpServer.HttpModules.HttpModule"> |
754 | <summary> | 331 | <summary> |
755 | 332 | A HttpModule can be used to serve Uri's. The module itself | |
333 | decides if it should serve a Uri or not. In this way, you can | ||
334 | get a very flexible http application since you can let multiple modules | ||
335 | serve almost similar urls. | ||
756 | </summary> | 336 | </summary> |
757 | <remarks> | 337 | <remarks> |
758 | http://www.faqs.org/rfcs/rfc1867.html | 338 | Throw <see cref="T:HttpServer.Exceptions.UnauthorizedException"/> if you are using a <see cref="T:HttpServer.Authentication.AuthenticationModule"/> and want to prompt for user name/password. |
759 | </remarks> | 339 | </remarks> |
760 | </member> | 340 | </member> |
761 | <member name="T:HttpServer.FormDecoders.IFormDecoder"> | 341 | <member name="M:HttpServer.HttpModules.HttpModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
762 | <summary> | ||
763 | Interface for form content decoders. | ||
764 | </summary> | ||
765 | </member> | ||
766 | <member name="M:HttpServer.FormDecoders.IFormDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> | ||
767 | <summary> | ||
768 | |||
769 | </summary> | ||
770 | <param name="stream">Stream containing the content</param> | ||
771 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
772 | <param name="encoding">Stream enconding</param> | ||
773 | <returns>A http form, or null if content could not be parsed.</returns> | ||
774 | <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception> | ||
775 | </member> | ||
776 | <member name="M:HttpServer.FormDecoders.IFormDecoder.CanParse(System.String)"> | ||
777 | <summary> | ||
778 | Checks if the decoder can handle the mime type | ||
779 | </summary> | ||
780 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
781 | <returns>True if the decoder can parse the specified content type</returns> | ||
782 | </member> | ||
783 | <member name="F:HttpServer.FormDecoders.MultipartDecoder.MimeType"> | ||
784 | <summary> | ||
785 | multipart/form-data | ||
786 | </summary> | ||
787 | </member> | ||
788 | <member name="F:HttpServer.FormDecoders.MultipartDecoder.FormData"> | ||
789 | <summary> | ||
790 | form-data | ||
791 | </summary> | ||
792 | </member> | ||
793 | <member name="M:HttpServer.FormDecoders.MultipartDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> | ||
794 | <summary> | ||
795 | |||
796 | </summary> | ||
797 | <param name="stream">Stream containing the content</param> | ||
798 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
799 | <param name="encoding">Stream enconding</param> | ||
800 | <returns>A http form, or null if content could not be parsed.</returns> | ||
801 | <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception> | ||
802 | <exception cref="T:System.ArgumentNullException">If any parameter is null</exception> | ||
803 | </member> | ||
804 | <member name="M:HttpServer.FormDecoders.MultipartDecoder.CanParse(System.String)"> | ||
805 | <summary> | ||
806 | Checks if the decoder can handle the mime type | ||
807 | </summary> | ||
808 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
809 | <returns>True if the decoder can parse the specified content type</returns> | ||
810 | </member> | ||
811 | <member name="T:HttpServer.Exceptions.NotFoundException"> | ||
812 | <summary> | ||
813 | The requested resource was not found in the web server. | ||
814 | </summary> | ||
815 | </member> | ||
816 | <member name="M:HttpServer.Exceptions.NotFoundException.#ctor(System.String,System.Exception)"> | ||
817 | <summary> | ||
818 | Create a new exception | ||
819 | </summary> | ||
820 | <param name="message">message describing the error</param> | ||
821 | <param name="inner">inner exception</param> | ||
822 | </member> | ||
823 | <member name="M:HttpServer.Exceptions.NotFoundException.#ctor(System.String)"> | ||
824 | <summary> | ||
825 | Create a new exception | ||
826 | </summary> | ||
827 | <param name="message">message describing the error</param> | ||
828 | </member> | ||
829 | <member name="T:HttpServer.Authentication.AuthenticationHandler"> | ||
830 | <summary> | 342 | <summary> |
831 | Delegate used to let authentication modules authenticate the user name and password. | 343 | Method that process the url |
832 | </summary> | 344 | </summary> |
833 | <param name="realm">Realm that the user want to authenticate in</param> | 345 | <param name="request">Information sent by the browser about the request</param> |
834 | <param name="userName">User name specified by client</param> | 346 | <param name="response">Information that is being sent back to the client.</param> |
835 | <param name="token">Can either be user password or implementation specific token.</param> | 347 | <param name="session">Session used to </param> |
836 | <param name="login">object that will be stored in a session variable called <see cref="F:HttpServer.Authentication.AuthenticationModule.AuthenticationTag"/> if authentication was successful.</param> | 348 | <returns>true if this module handled the request.</returns> |
837 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">throw forbidden exception if too many attempts have been made.</exception> | ||
838 | <remarks> | ||
839 | <para> | ||
840 | Use <see cref="P:HttpServer.Authentication.DigestAuthentication.TokenIsHA1"/> to specify that the token is a HA1 token. (MD5 generated | ||
841 | string from realm, user name and password); Md5String(userName + ":" + realm + ":" + password); | ||
842 | </para> | ||
843 | </remarks> | ||
844 | </member> | 349 | </member> |
845 | <member name="T:HttpServer.Authentication.AuthenticationRequiredHandler"> | 350 | <member name="M:HttpServer.HttpModules.HttpModule.SetLogWriter(HttpServer.ILogWriter)"> |
846 | <summary> | 351 | <summary> |
847 | Let's you decide on a system level if authentication is required. | 352 | Set the log writer to use. |
848 | </summary> | 353 | </summary> |
849 | <param name="request">HTTP request from client</param> | 354 | <param name="writer">logwriter to use.</param> |
850 | <returns>true if user should be authenticated.</returns> | ||
851 | <remarks>throw <see cref="T:HttpServer.Exceptions.ForbiddenException"/> if no more attempts are allowed.</remarks> | ||
852 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">If no more attempts are allowed</exception> | ||
853 | </member> | 355 | </member> |
854 | <member name="T:HttpServer.Authentication.AuthenticationModule"> | 356 | <member name="M:HttpServer.HttpModules.HttpModule.Write(HttpServer.LogPrio,System.String)"> |
855 | <summary> | 357 | <summary> |
856 | Authentication modules are used to implement different | 358 | Log something. |
857 | kind of HTTP authentication. | ||
858 | </summary> | 359 | </summary> |
360 | <param name="prio">importance of log message</param> | ||
361 | <param name="message">message</param> | ||
859 | </member> | 362 | </member> |
860 | <member name="F:HttpServer.Authentication.AuthenticationModule.AuthenticationTag"> | 363 | <member name="P:HttpServer.HttpModules.HttpModule.AllowSecondaryProcessing"> |
861 | <summary> | 364 | <summary> |
862 | Tag used for authentication. | 365 | If true specifies that the module doesn't consume the processing of a request so that subsequent modules |
366 | can continue processing afterwards. Default is false. | ||
863 | </summary> | 367 | </summary> |
864 | </member> | 368 | </member> |
865 | <member name="M:HttpServer.Authentication.AuthenticationModule.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)"> | 369 | <member name="M:HttpServer.HttpModules.ResourceFileModule.#ctor"> |
866 | <summary> | 370 | <summary> |
867 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.AuthenticationModule"/> class. | 371 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.ResourceFileModule"/> class. |
372 | Runs <see cref="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"/> to make sure the basic mime types are available, they can be cleared later | ||
373 | through the use of <see cref="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"/> if desired. | ||
868 | </summary> | 374 | </summary> |
869 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | ||
870 | <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param> | ||
871 | </member> | 375 | </member> |
872 | <member name="M:HttpServer.Authentication.AuthenticationModule.#ctor(HttpServer.Authentication.AuthenticationHandler)"> | 376 | <member name="M:HttpServer.HttpModules.ResourceFileModule.#ctor(HttpServer.ILogWriter)"> |
873 | <summary> | 377 | <summary> |
874 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.AuthenticationModule"/> class. | 378 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.ResourceFileModule"/> class. |
379 | Runs <see cref="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"/> to make sure the basic mime types are available, they can be cleared later | ||
380 | through the use of <see cref="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"/> if desired. | ||
875 | </summary> | 381 | </summary> |
876 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | 382 | <param name="logWriter">The log writer to use when logging events</param> |
877 | </member> | 383 | </member> |
878 | <member name="M:HttpServer.Authentication.AuthenticationModule.CreateResponse(System.String,System.Object[])"> | 384 | <member name="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"> |
879 | <summary> | 385 | <summary> |
880 | Create a response that can be sent in the WWW-Authenticate header. | 386 | Mimtypes that this class can handle per default |
881 | </summary> | 387 | </summary> |
882 | <param name="realm">Realm that the user should authenticate in</param> | ||
883 | <param name="options">Array with optional options.</param> | ||
884 | <returns>A correct authentication request.</returns> | ||
885 | <exception cref="T:System.ArgumentNullException">If realm is empty or null.</exception> | ||
886 | </member> | 388 | </member> |
887 | <member name="M:HttpServer.Authentication.AuthenticationModule.Authenticate(System.String,System.String,System.String,System.Object[])"> | 389 | <member name="M:HttpServer.HttpModules.ResourceFileModule.AddResources(System.String,System.Reflection.Assembly,System.String)"> |
888 | <summary> | 390 | <summary> |
889 | An authentication response have been received from the web browser. | 391 | Loads resources from a namespace in the given assembly to an uri |
890 | Check if it's correct | ||
891 | </summary> | 392 | </summary> |
892 | <param name="authenticationHeader">Contents from the Authorization header</param> | 393 | <param name="toUri">The uri to map the resources to</param> |
893 | <param name="realm">Realm that should be authenticated</param> | 394 | <param name="fromAssembly">The assembly in which the resources reside</param> |
894 | <param name="httpVerb">GET/POST/PUT/DELETE etc.</param> | 395 | <param name="fromNamespace">The namespace from which to load the resources</param> |
895 | <param name="options">options to specific implementations</param> | 396 | <usage> |
896 | <returns>Authentication object that is stored for the request. A user class or something like that.</returns> | 397 | resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views"); |
897 | <exception cref="T:System.ArgumentException">if <paramref name="authenticationHeader"/> is invalid</exception> | 398 | |
898 | <exception cref="T:System.ArgumentNullException">If any of the parameters is empty or null.</exception> | 399 | will make ie the resource MyLib.Models.User.Views.stylesheet.css accessible via /user/stylesheet.css |
400 | </usage> | ||
401 | <returns>The amount of loaded files, giving you the possibility of making sure the resources needed gets loaded</returns> | ||
899 | </member> | 402 | </member> |
900 | <member name="M:HttpServer.Authentication.AuthenticationModule.CheckAuthentication(System.String,System.String,System.String@,System.Object@)"> | 403 | <member name="M:HttpServer.HttpModules.ResourceFileModule.CanHandle(HttpServer.IHttpRequest)"> |
901 | <summary> | 404 | <summary> |
902 | Used to invoke the authentication delegate that is used to lookup the user name/realm. | 405 | Returns true if the module can handle the request |
903 | </summary> | 406 | </summary> |
904 | <param name="realm">Realm (domain) that user want to authenticate in</param> | ||
905 | <param name="userName">User name</param> | ||
906 | <param name="password">Password used for validation. Some implementations got password in clear text, they are then sent to client.</param> | ||
907 | <param name="login">object that will be stored in the request to help you identify the user if authentication was successful.</param> | ||
908 | <returns>true if authentication was successful</returns> | ||
909 | </member> | 407 | </member> |
910 | <member name="M:HttpServer.Authentication.AuthenticationModule.AuthenticationRequired(HttpServer.IHttpRequest)"> | 408 | <member name="M:HttpServer.HttpModules.ResourceFileModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
911 | <summary> | 409 | <summary> |
912 | Determines if authentication is required. | 410 | Method that process the url |
913 | </summary> | 411 | </summary> |
914 | <param name="request">HTTP request from browser</param> | 412 | <param name="request">Information sent by the browser about the request</param> |
915 | <returns>true if user should be authenticated.</returns> | 413 | <param name="response">Information that is being sent back to the client.</param> |
916 | <remarks>throw <see cref="T:HttpServer.Exceptions.ForbiddenException"/> from your delegate if no more attempts are allowed.</remarks> | 414 | <param name="session">Session used to </param> |
917 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">If no more attempts are allowed</exception> | 415 | <returns>true if this module handled the request.</returns> |
918 | </member> | 416 | </member> |
919 | <member name="P:HttpServer.Authentication.AuthenticationModule.Name"> | 417 | <member name="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"> |
920 | <summary> | 418 | <summary> |
921 | name used in HTTP request. | 419 | List with all mime-type that are allowed. |
922 | </summary> | 420 | </summary> |
421 | <remarks>All other mime types will result in a Forbidden http status code.</remarks> | ||
923 | </member> | 422 | </member> |
924 | <member name="T:HttpServer.HttpInput"> | 423 | <member name="T:HttpServer.HttpInput"> |
925 | <summary> | 424 | <summary> |
@@ -1062,444 +561,216 @@ | |||
1062 | <param name="name"></param> | 561 | <param name="name"></param> |
1063 | <returns>Returns <see cref="F:HttpServer.HttpInputItem.Empty"/> if item was not found.</returns> | 562 | <returns>Returns <see cref="F:HttpServer.HttpInputItem.Empty"/> if item was not found.</returns> |
1064 | </member> | 563 | </member> |
1065 | <member name="T:HttpServer.Check"> | 564 | <member name="T:HttpServer.Exceptions.ForbiddenException"> |
1066 | <summary> | ||
1067 | Small design by contract implementation. | ||
1068 | </summary> | ||
1069 | </member> | ||
1070 | <member name="M:HttpServer.Check.NotEmpty(System.String,System.String)"> | ||
1071 | <summary> | ||
1072 | Check whether a parameter is empty. | ||
1073 | </summary> | ||
1074 | <param name="value">Parameter value</param> | ||
1075 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> | ||
1076 | <exception cref="T:System.ArgumentException">value is empty.</exception> | ||
1077 | </member> | ||
1078 | <member name="M:HttpServer.Check.Require(System.Object,System.String)"> | ||
1079 | <summary> | ||
1080 | Checks whether a parameter is null. | ||
1081 | </summary> | ||
1082 | <param name="value">Parameter value</param> | ||
1083 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> | ||
1084 | <exception cref="T:System.ArgumentNullException">value is null.</exception> | ||
1085 | </member> | ||
1086 | <member name="M:HttpServer.Check.Min(System.Int32,System.Object,System.String)"> | ||
1087 | <summary> | ||
1088 | Checks whether a parameter is null. | ||
1089 | </summary> | ||
1090 | <param name="minValue"></param> | ||
1091 | <param name="value">Parameter value</param> | ||
1092 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> | ||
1093 | <exception cref="T:System.ArgumentException">value is null.</exception> | ||
1094 | </member> | ||
1095 | <member name="T:HttpServer.Method"> | ||
1096 | <summary> | ||
1097 | Contains all HTTP Methods (according to the HTTP 1.1 specification) | ||
1098 | <para> | ||
1099 | See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html | ||
1100 | </para> | ||
1101 | </summary> | ||
1102 | </member> | ||
1103 | <member name="F:HttpServer.Method.Delete"> | ||
1104 | <summary> | ||
1105 | The DELETE method requests that the origin server delete the resource identified by the Request-URI. | ||
1106 | </summary> | ||
1107 | <remarks> | ||
1108 | <para> | ||
1109 | This method MAY be overridden by human intervention (or other means) on the origin server. | ||
1110 | The client cannot be guaranteed that the operation has been carried out, even if the status code | ||
1111 | returned from the origin server indicates that the action has been completed successfully. | ||
1112 | </para> | ||
1113 | <para> | ||
1114 | However, the server SHOULD NOT indicate success unless, at the time the response is given, | ||
1115 | it intends to delete the resource or move it to an inaccessible location. | ||
1116 | </para> | ||
1117 | <para> | ||
1118 | A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, | ||
1119 | 202 (Accepted) if the action has not yet been enacted, | ||
1120 | or 204 (No Content) if the action has been enacted but the response does not include an entity. | ||
1121 | </para> | ||
1122 | <para> | ||
1123 | If the request passes through a cache and the Request-URI identifies one or more currently cached entities, | ||
1124 | those entries SHOULD be treated as stale. Responses to this method are not cacheable. | ||
1125 | </para> | ||
1126 | </remarks> | ||
1127 | </member> | ||
1128 | <member name="F:HttpServer.Method.Get"> | ||
1129 | <summary> | ||
1130 | The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. | ||
1131 | </summary> | ||
1132 | <remarks> | ||
1133 | <para> | ||
1134 | If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the | ||
1135 | entity in the response and not the source text of the process, unless that text happens to be the output of the process. | ||
1136 | </para> | ||
1137 | <para> | ||
1138 | The semantics of the GET method change to a "conditional GET" if the request message includes an | ||
1139 | If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. | ||
1140 | A conditional GET method requests that the entity be transferred only under the circumstances described | ||
1141 | by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network | ||
1142 | usage by allowing cached entities to be refreshed without requiring multiple requests or transferring | ||
1143 | data already held by the client. | ||
1144 | </para> | ||
1145 | </remarks> | ||
1146 | </member> | ||
1147 | <member name="F:HttpServer.Method.Header"> | ||
1148 | <summary> | 565 | <summary> |
1149 | The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. | 566 | The server understood the request, but is refusing to fulfill it. |
1150 | </summary> | 567 | Authorization will not help and the request SHOULD NOT be repeated. |
1151 | <remarks> | 568 | If the request method was not HEAD and the server wishes to make public why the request has not been fulfilled, |
1152 | The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the | 569 | it SHOULD describe the reason for the refusal in the entity. If the server does not wish to make this information |
1153 | information sent in response to a GET request. This method can be used for obtaining meta information about | 570 | available to the client, the status code 404 (Not Found) can be used instead. |
1154 | the entity implied by the request without transferring the entity-body itself. | ||
1155 | 571 | ||
1156 | This method is often used for testing hypertext links for validity, accessibility, and recent modification. | 572 | Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php |
1157 | </remarks> | ||
1158 | </member> | ||
1159 | <member name="F:HttpServer.Method.Options"> | ||
1160 | <summary> | ||
1161 | <para>The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.</para> | ||
1162 | </summary> | 573 | </summary> |
1163 | <remarks> | ||
1164 | <para>This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.</para> | ||
1165 | </remarks> | ||
1166 | </member> | 574 | </member> |
1167 | <member name="F:HttpServer.Method.Post"> | 575 | <member name="T:HttpServer.Exceptions.HttpException"> |
1168 | <summary> | 576 | <summary> |
1169 | The POST method is used to request that the origin server accept the entity enclosed | 577 | All HTTP based exceptions will derive this class. |
1170 | in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. | ||
1171 | </summary> | 578 | </summary> |
1172 | <remarks> | ||
1173 | POST is designed to allow a uniform method to cover the following functions: | ||
1174 | <list type="bullet"> | ||
1175 | <item> | ||
1176 | Annotation of existing resources; | ||
1177 | </item><item> | ||
1178 | Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; | ||
1179 | </item><item> | ||
1180 | Providing a block of data, such as the result of submitting a form, to a data-handling process; | ||
1181 | </item><item> | ||
1182 | Extending a database through an append operation. | ||
1183 | </item> | ||
1184 | </list> | ||
1185 | <para> | ||
1186 | If a resource has been created on the origin server, the response SHOULD be 201 (Created) and | ||
1187 | contain an entity which describes the status of the request and refers to the new resource, and a | ||
1188 | Location header (see section 14.30). | ||
1189 | </para> | ||
1190 | <para> | ||
1191 | The action performed by the POST method might not result in a resource that can be identified by a URI. | ||
1192 | In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on | ||
1193 | whether or not the response includes an entity that describes the result. | ||
1194 | </para><para> | ||
1195 | Responses to this method are not cacheable, unless the response includes appropriate Cache-Control | ||
1196 | or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent | ||
1197 | to retrieve a cacheable resource. | ||
1198 | </para> | ||
1199 | </remarks> | ||
1200 | </member> | 579 | </member> |
1201 | <member name="F:HttpServer.Method.Put"> | 580 | <member name="M:HttpServer.Exceptions.HttpException.#ctor(System.Net.HttpStatusCode,System.String)"> |
1202 | <summary> | 581 | <summary> |
1203 | The PUT method requests that the enclosed entity be stored under the supplied Request-URI. | 582 | Create a new HttpException |
1204 | </summary> | 583 | </summary> |
1205 | <remarks> | 584 | <param name="code">http status code (sent in the response)</param> |
1206 | <list type="bullet"> | 585 | <param name="message">error description</param> |
1207 | <item> | ||
1208 | If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a | ||
1209 | modified version of the one residing on the origin server. | ||
1210 | </item><item> | ||
1211 | If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new | ||
1212 | resource by the requesting user agent, the origin server can create the resource with that URI. | ||
1213 | </item><item> | ||
1214 | If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. | ||
1215 | </item><item> | ||
1216 | If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to | ||
1217 | indicate successful completion of the request. | ||
1218 | </item><item> | ||
1219 | If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be | ||
1220 | given that reflects the nature of the problem. | ||
1221 | </item> | ||
1222 | </list> | ||
1223 | <para> | ||
1224 | The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not | ||
1225 | understand or implement and MUST return a 501 (Not Implemented) response in such cases. | ||
1226 | </para> | ||
1227 | </remarks> | ||
1228 | </member> | 586 | </member> |
1229 | <member name="F:HttpServer.Method.Trace"> | 587 | <member name="M:HttpServer.Exceptions.HttpException.#ctor(System.Net.HttpStatusCode,System.String,System.Exception)"> |
1230 | <summary> | 588 | <summary> |
1231 | The TRACE method is used to invoke a remote, application-layer loop- back of the request message. | 589 | Create a new HttpException |
1232 | </summary> | 590 | </summary> |
591 | <param name="code">http status code (sent in the response)</param> | ||
592 | <param name="message">error description</param> | ||
593 | <param name="inner">inner exception</param> | ||
1233 | </member> | 594 | </member> |
1234 | <member name="T:HttpServer.Methods"> | 595 | <member name="P:HttpServer.Exceptions.HttpException.HttpStatusCode"> |
1235 | <summary> | 596 | <summary> |
1236 | Contains all HTTP Methods (according to the HTTP 1.1 specification) | 597 | status code to use in the response. |
1237 | <para> | ||
1238 | See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html | ||
1239 | </para> | ||
1240 | </summary> | 598 | </summary> |
1241 | </member> | 599 | </member> |
1242 | <member name="F:HttpServer.Methods.Delete"> | 600 | <member name="M:HttpServer.Exceptions.ForbiddenException.#ctor(System.String)"> |
1243 | <summary> | 601 | <summary> |
1244 | The DELETE method requests that the origin server delete the resource identified by the Request-URI. | 602 | Initializes a new instance of the <see cref="T:HttpServer.Exceptions.ForbiddenException"/> class. |
1245 | </summary> | 603 | </summary> |
1246 | <remarks> | 604 | <param name="errorMsg">error message</param> |
1247 | <para> | ||
1248 | This method MAY be overridden by human intervention (or other means) on the origin server. | ||
1249 | The client cannot be guaranteed that the operation has been carried out, even if the status code | ||
1250 | returned from the origin server indicates that the action has been completed successfully. | ||
1251 | </para> | ||
1252 | <para> | ||
1253 | However, the server SHOULD NOT indicate success unless, at the time the response is given, | ||
1254 | it intends to delete the resource or move it to an inaccessible location. | ||
1255 | </para> | ||
1256 | <para> | ||
1257 | A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, | ||
1258 | 202 (Accepted) if the action has not yet been enacted, | ||
1259 | or 204 (No Content) if the action has been enacted but the response does not include an entity. | ||
1260 | </para> | ||
1261 | <para> | ||
1262 | If the request passes through a cache and the Request-URI identifies one or more currently cached entities, | ||
1263 | those entries SHOULD be treated as stale. Responses to this method are not cacheable. | ||
1264 | </para> | ||
1265 | </remarks> | ||
1266 | </member> | 605 | </member> |
1267 | <member name="F:HttpServer.Methods.Get"> | 606 | <member name="T:HttpServer.RequestCookies"> |
1268 | <summary> | 607 | <summary> |
1269 | The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. | 608 | This class is created as a wrapper, since there are two different cookie types in .Net (Cookie and HttpCookie). |
609 | The framework might switch class in the future and we dont want to have to replace all instances | ||
1270 | </summary> | 610 | </summary> |
1271 | <remarks> | ||
1272 | <para> | ||
1273 | If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the | ||
1274 | entity in the response and not the source text of the process, unless that text happens to be the output of the process. | ||
1275 | </para> | ||
1276 | <para> | ||
1277 | The semantics of the GET method change to a "conditional GET" if the request message includes an | ||
1278 | If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. | ||
1279 | A conditional GET method requests that the entity be transferred only under the circumstances described | ||
1280 | by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network | ||
1281 | usage by allowing cached entities to be refreshed without requiring multiple requests or transferring | ||
1282 | data already held by the client. | ||
1283 | </para> | ||
1284 | </remarks> | ||
1285 | </member> | 611 | </member> |
1286 | <member name="F:HttpServer.Methods.Header"> | 612 | <member name="M:HttpServer.RequestCookies.#ctor(System.String)"> |
1287 | <summary> | 613 | <summary> |
1288 | The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. | 614 | Let's copy all the cookies. |
1289 | </summary> | 615 | </summary> |
1290 | <remarks> | 616 | <param name="cookies">value from cookie header.</param> |
1291 | The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the | ||
1292 | information sent in response to a GET request. This method can be used for obtaining meta information about | ||
1293 | the entity implied by the request without transferring the entity-body itself. | ||
1294 | |||
1295 | This method is often used for testing hypertext links for validity, accessibility, and recent modification. | ||
1296 | </remarks> | ||
1297 | </member> | 617 | </member> |
1298 | <member name="F:HttpServer.Methods.Options"> | 618 | <member name="M:HttpServer.RequestCookies.Add(HttpServer.RequestCookie)"> |
1299 | <summary> | 619 | <summary> |
1300 | <para>The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.</para> | 620 | Adds a cookie in the collection. |
1301 | </summary> | 621 | </summary> |
1302 | <remarks> | 622 | <param name="cookie">cookie to add</param> |
1303 | <para>This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.</para> | 623 | <exception cref="T:System.ArgumentNullException">cookie is null</exception> |
1304 | </remarks> | ||
1305 | </member> | 624 | </member> |
1306 | <member name="F:HttpServer.Methods.Post"> | 625 | <member name="M:HttpServer.RequestCookies.GetEnumerator"> |
1307 | <summary> | 626 | <summary> |
1308 | The POST method is used to request that the origin server accept the entity enclosed | 627 | Gets a collection enumerator on the cookie list. |
1309 | in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. | ||
1310 | </summary> | 628 | </summary> |
1311 | <remarks> | 629 | <returns>collection enumerator</returns> |
1312 | POST is designed to allow a uniform method to cover the following functions: | ||
1313 | <list type="bullet"> | ||
1314 | <item> | ||
1315 | Annotation of existing resources; | ||
1316 | </item><item> | ||
1317 | Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; | ||
1318 | </item><item> | ||
1319 | Providing a block of data, such as the result of submitting a form, to a data-handling process; | ||
1320 | </item><item> | ||
1321 | Extending a database through an append operation. | ||
1322 | </item> | ||
1323 | </list> | ||
1324 | <para> | ||
1325 | If a resource has been created on the origin server, the response SHOULD be 201 (Created) and | ||
1326 | contain an entity which describes the status of the request and refers to the new resource, and a | ||
1327 | Location header (see section 14.30). | ||
1328 | </para> | ||
1329 | <para> | ||
1330 | The action performed by the POST method might not result in a resource that can be identified by a URI. | ||
1331 | In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on | ||
1332 | whether or not the response includes an entity that describes the result. | ||
1333 | </para><para> | ||
1334 | Responses to this method are not cacheable, unless the response includes appropriate Cache-Control | ||
1335 | or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent | ||
1336 | to retrieve a cacheable resource. | ||
1337 | </para> | ||
1338 | </remarks> | ||
1339 | </member> | 630 | </member> |
1340 | <member name="F:HttpServer.Methods.Put"> | 631 | <member name="M:HttpServer.RequestCookies.Clear"> |
1341 | <summary> | 632 | <summary> |
1342 | The PUT method requests that the enclosed entity be stored under the supplied Request-URI. | 633 | Remove all cookies. |
1343 | </summary> | 634 | </summary> |
1344 | <remarks> | ||
1345 | <list type="bullet"> | ||
1346 | <item> | ||
1347 | If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a | ||
1348 | modified version of the one residing on the origin server. | ||
1349 | </item><item> | ||
1350 | If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new | ||
1351 | resource by the requesting user agent, the origin server can create the resource with that URI. | ||
1352 | </item><item> | ||
1353 | If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. | ||
1354 | </item><item> | ||
1355 | If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to | ||
1356 | indicate successful completion of the request. | ||
1357 | </item><item> | ||
1358 | If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be | ||
1359 | given that reflects the nature of the problem. | ||
1360 | </item> | ||
1361 | </list> | ||
1362 | <para> | ||
1363 | The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not | ||
1364 | understand or implement and MUST return a 501 (Not Implemented) response in such cases. | ||
1365 | </para> | ||
1366 | </remarks> | ||
1367 | </member> | 635 | </member> |
1368 | <member name="F:HttpServer.Methods.Trace"> | 636 | <member name="M:HttpServer.RequestCookies.System#Collections#Generic#IEnumerable{HttpServer#RequestCookie}#GetEnumerator"> |
1369 | <summary> | 637 | <summary> |
1370 | The TRACE method is used to invoke a remote, application-layer loop- back of the request message. | 638 | Returns an enumerator that iterates through the collection. |
1371 | </summary> | 639 | </summary> |
640 | |||
641 | <returns> | ||
642 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | ||
643 | </returns> | ||
644 | <filterpriority>1</filterpriority> | ||
1372 | </member> | 645 | </member> |
1373 | <member name="T:HttpServer.LogPrio"> | 646 | <member name="M:HttpServer.RequestCookies.Remove(System.String)"> |
1374 | <summary> | 647 | <summary> |
1375 | Priority for log entries | 648 | Remove a cookie from the collection. |
1376 | </summary> | 649 | </summary> |
1377 | <seealso cref="T:HttpServer.ILogWriter"/> | 650 | <param name="cookieName">Name of cookie.</param> |
1378 | </member> | 651 | </member> |
1379 | <member name="F:HttpServer.LogPrio.Trace"> | 652 | <member name="P:HttpServer.RequestCookies.Count"> |
1380 | <summary> | 653 | <summary> |
1381 | Very detailed logs to be able to follow the flow of the program. | 654 | Gets the count of cookies in the collection. |
1382 | </summary> | 655 | </summary> |
1383 | </member> | 656 | </member> |
1384 | <member name="F:HttpServer.LogPrio.Debug"> | 657 | <member name="P:HttpServer.RequestCookies.Item(System.String)"> |
1385 | <summary> | 658 | <summary> |
1386 | Logs to help debug errors in the application | 659 | Gets the cookie of a given identifier (null if not existing). |
1387 | </summary> | 660 | </summary> |
1388 | </member> | 661 | </member> |
1389 | <member name="F:HttpServer.LogPrio.Info"> | 662 | <member name="T:HttpServer.IHttpClientContext"> |
1390 | <summary> | 663 | <summary> |
1391 | Information to be able to keep track of state changes etc. | 664 | Contains a connection to a browser/client. |
1392 | </summary> | 665 | </summary> |
1393 | </member> | 666 | </member> |
1394 | <member name="F:HttpServer.LogPrio.Warning"> | 667 | <member name="M:HttpServer.IHttpClientContext.Disconnect(System.Net.Sockets.SocketError)"> |
1395 | <summary> | 668 | <summary> |
1396 | Something did not go as we expected, but it's no problem. | 669 | Disconnect from client |
1397 | </summary> | 670 | </summary> |
671 | <param name="error">error to report in the <see cref="E:HttpServer.IHttpClientContext.Disconnected"/> event.</param> | ||
1398 | </member> | 672 | </member> |
1399 | <member name="F:HttpServer.LogPrio.Error"> | 673 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String,System.String,System.String)"> |
1400 | <summary> | 674 | <summary> |
1401 | Something that should not fail failed, but we can still keep | 675 | Send a response. |
1402 | on going. | ||
1403 | </summary> | 676 | </summary> |
677 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> | ||
678 | <param name="statusCode">HTTP status code</param> | ||
679 | <param name="reason">reason for the status code.</param> | ||
680 | <param name="body">HTML body contents, can be null or empty.</param> | ||
681 | <param name="contentType">A content type to return the body as, i.e. 'text/html' or 'text/plain', defaults to 'text/html' if null or empty</param> | ||
682 | <exception cref="T:System.ArgumentException">If <paramref name="httpVersion"/> is invalid.</exception> | ||
1404 | </member> | 683 | </member> |
1405 | <member name="F:HttpServer.LogPrio.Fatal"> | 684 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String)"> |
1406 | <summary> | 685 | <summary> |
1407 | Something failed, and we cannot handle it properly. | 686 | Send a response. |
1408 | </summary> | 687 | </summary> |
688 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> | ||
689 | <param name="statusCode">HTTP status code</param> | ||
690 | <param name="reason">reason for the status code.</param> | ||
1409 | </member> | 691 | </member> |
1410 | <member name="T:HttpServer.ILogWriter"> | 692 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String)"> |
1411 | <summary> | 693 | <summary> |
1412 | Interface used to write to log files. | 694 | Send a response. |
1413 | </summary> | 695 | </summary> |
696 | <exception cref="T:System.ArgumentNullException"></exception> | ||
1414 | </member> | 697 | </member> |
1415 | <member name="M:HttpServer.ILogWriter.Write(System.Object,HttpServer.LogPrio,System.String)"> | 698 | <member name="M:HttpServer.IHttpClientContext.Send(System.Byte[])"> |
1416 | <summary> | 699 | <summary> |
1417 | Write an entry to the log file. | 700 | send a whole buffer |
1418 | </summary> | 701 | </summary> |
1419 | <param name="source">object that is writing to the log</param> | 702 | <param name="buffer">buffer to send</param> |
1420 | <param name="priority">importance of the log message</param> | 703 | <exception cref="T:System.ArgumentNullException"></exception> |
1421 | <param name="message">the message</param> | ||
1422 | </member> | 704 | </member> |
1423 | <member name="T:HttpServer.ConsoleLogWriter"> | 705 | <member name="M:HttpServer.IHttpClientContext.Send(System.Byte[],System.Int32,System.Int32)"> |
1424 | <summary> | 706 | <summary> |
1425 | This class writes to the console. It colors the output depending on the logprio and includes a 3-level stacktrace (in debug mode) | 707 | Send data using the stream |
1426 | </summary> | 708 | </summary> |
1427 | <seealso cref="T:HttpServer.ILogWriter"/> | 709 | <param name="buffer">Contains data to send</param> |
710 | <param name="offset">Start position in buffer</param> | ||
711 | <param name="size">number of bytes to send</param> | ||
712 | <exception cref="T:System.ArgumentNullException"></exception> | ||
713 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> | ||
1428 | </member> | 714 | </member> |
1429 | <member name="F:HttpServer.ConsoleLogWriter.Instance"> | 715 | <member name="M:HttpServer.IHttpClientContext.Close"> |
1430 | <summary> | 716 | <summary> |
1431 | The actual instance of this class. | 717 | Closes the streams and disposes of the unmanaged resources |
1432 | </summary> | 718 | </summary> |
1433 | </member> | 719 | </member> |
1434 | <member name="M:HttpServer.ConsoleLogWriter.Write(System.Object,HttpServer.LogPrio,System.String)"> | 720 | <member name="P:HttpServer.IHttpClientContext.Secured"> |
1435 | <summary> | 721 | <summary> |
1436 | Logwriters the specified source. | 722 | Using SSL or other encryption method. |
1437 | </summary> | 723 | </summary> |
1438 | <param name="source">object that wrote the logentry.</param> | ||
1439 | <param name="prio">Importance of the log message</param> | ||
1440 | <param name="message">The message.</param> | ||
1441 | </member> | 724 | </member> |
1442 | <member name="M:HttpServer.ConsoleLogWriter.GetColor(HttpServer.LogPrio)"> | 725 | <member name="P:HttpServer.IHttpClientContext.IsSecured"> |
1443 | <summary> | 726 | <summary> |
1444 | Get color for the specified logprio | 727 | Using SSL or other encryption method. |
1445 | </summary> | 728 | </summary> |
1446 | <param name="prio">prio for the log entry</param> | ||
1447 | <returns>A <see cref="T:System.ConsoleColor"/> for the prio</returns> | ||
1448 | </member> | 729 | </member> |
1449 | <member name="T:HttpServer.NullLogWriter"> | 730 | <member name="E:HttpServer.IHttpClientContext.Disconnected"> |
1450 | <summary> | 731 | <summary> |
1451 | Default log writer, writes everything to null (nowhere). | 732 | The context have been disconnected. |
1452 | </summary> | 733 | </summary> |
1453 | <seealso cref="T:HttpServer.ILogWriter"/> | 734 | <remarks> |
735 | Event can be used to clean up a context, or to reuse it. | ||
736 | </remarks> | ||
1454 | </member> | 737 | </member> |
1455 | <member name="F:HttpServer.NullLogWriter.Instance"> | 738 | <member name="E:HttpServer.IHttpClientContext.RequestReceived"> |
1456 | <summary> | 739 | <summary> |
1457 | The logging instance. | 740 | A request have been received in the context. |
1458 | </summary> | 741 | </summary> |
1459 | </member> | 742 | </member> |
1460 | <member name="M:HttpServer.NullLogWriter.Write(System.Object,HttpServer.LogPrio,System.String)"> | 743 | <member name="T:HttpServer.DisconnectedEventArgs"> |
1461 | <summary> | 744 | <summary> |
1462 | Writes everything to null | 745 | A <see cref="T:HttpServer.IHttpClientContext"/> have been disconnected. |
1463 | </summary> | 746 | </summary> |
1464 | <param name="source">object that wrote the log entry.</param> | ||
1465 | <param name="prio">Importance of the log message</param> | ||
1466 | <param name="message">The message.</param> | ||
1467 | </member> | 747 | </member> |
1468 | <member name="T:HttpServer.IComponentProvider"> | 748 | <member name="M:HttpServer.DisconnectedEventArgs.#ctor(System.Net.Sockets.SocketError)"> |
1469 | <summary> | 749 | <summary> |
1470 | Inversion of control interface. | 750 | Initializes a new instance of the <see cref="T:HttpServer.DisconnectedEventArgs"/> class. |
1471 | </summary> | 751 | </summary> |
752 | <param name="error">Reason to disconnection.</param> | ||
1472 | </member> | 753 | </member> |
1473 | <member name="M:HttpServer.IComponentProvider.AddInstance``1(System.Object)"> | 754 | <member name="P:HttpServer.DisconnectedEventArgs.Error"> |
1474 | <summary> | 755 | <summary> |
1475 | Add a component instance | 756 | Gets reason to why client disconnected. |
1476 | </summary> | 757 | </summary> |
1477 | <typeparam name="T">Interface type</typeparam> | ||
1478 | <param name="instance">Instance to add</param> | ||
1479 | </member> | 758 | </member> |
1480 | <member name="M:HttpServer.IComponentProvider.Get``1"> | 759 | <member name="T:HttpServer.RequestEventArgs"> |
1481 | <summary> | 760 | <summary> |
1482 | Get a component. | 761 | |
1483 | </summary> | 762 | </summary> |
1484 | <typeparam name="T">Interface type</typeparam> | ||
1485 | <returns>Component if registered, otherwise null.</returns> | ||
1486 | <remarks> | ||
1487 | Component will get created if needed. | ||
1488 | </remarks> | ||
1489 | </member> | 763 | </member> |
1490 | <member name="M:HttpServer.IComponentProvider.Contains(System.Type)"> | 764 | <member name="M:HttpServer.RequestEventArgs.#ctor(HttpServer.IHttpRequest)"> |
1491 | <summary> | 765 | <summary> |
1492 | Checks if the specified component interface have been added. | 766 | Initializes a new instance of the <see cref="T:HttpServer.RequestEventArgs"/> class. |
1493 | </summary> | 767 | </summary> |
1494 | <param name="interfaceType"></param> | 768 | <param name="request">The request.</param> |
1495 | <returns>true if found; otherwise false.</returns> | ||
1496 | </member> | 769 | </member> |
1497 | <member name="M:HttpServer.IComponentProvider.Add``2"> | 770 | <member name="P:HttpServer.RequestEventArgs.Request"> |
1498 | <summary> | 771 | <summary> |
1499 | Add a component. | 772 | Gets received request. |
1500 | </summary> | 773 | </summary> |
1501 | <typeparam name="InterfaceType">Type being requested.</typeparam> | ||
1502 | <typeparam name="InstanceType">Type being created.</typeparam> | ||
1503 | </member> | 774 | </member> |
1504 | <member name="T:HttpServer.HttpParam"> | 775 | <member name="T:HttpServer.HttpParam"> |
1505 | <summary> | 776 | <summary> |
@@ -1555,55 +826,125 @@ | |||
1555 | <param name="name"></param> | 826 | <param name="name"></param> |
1556 | <returns>Item if found; otherwise HttpInputItem.EmptyLanguageNode</returns> | 827 | <returns>Item if found; otherwise HttpInputItem.EmptyLanguageNode</returns> |
1557 | </member> | 828 | </member> |
1558 | <member name="T:HttpServer.HttpForm"> | 829 | <member name="T:HttpServer.HttpFile"> |
1559 | <summary>Container for posted form data</summary> | 830 | <summary> |
831 | Container class for posted files | ||
832 | </summary> | ||
1560 | </member> | 833 | </member> |
1561 | <member name="F:HttpServer.HttpForm.EmptyForm"> | 834 | <member name="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String,System.String)"> |
1562 | <summary>Instance to help mark a non-initialized form</summary> | 835 | <summary> |
836 | Creates a container for a posted file | ||
837 | </summary> | ||
838 | <param name="name">The identifier of the post field</param> | ||
839 | <param name="filename">The file path</param> | ||
840 | <param name="contentType">The content type of the file</param> | ||
841 | <param name="uploadFilename">The name of the file uploaded</param> | ||
842 | <exception cref="T:System.ArgumentNullException">If any parameter is null or empty</exception> | ||
1563 | </member> | 843 | </member> |
1564 | <member name="M:HttpServer.HttpForm.#ctor"> | 844 | <member name="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String)"> |
1565 | <summary>Initializes a form container with the specified name</summary> | 845 | <summary> |
846 | Creates a container for a posted file <see cref="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String,System.String)"/> | ||
847 | </summary> | ||
848 | <exception cref="T:System.ArgumentNullException">If any parameter is null or empty</exception> | ||
1566 | </member> | 849 | </member> |
1567 | <member name="M:HttpServer.HttpForm.#ctor(HttpServer.HttpInput)"> | 850 | <member name="M:HttpServer.HttpFile.Finalize"> |
851 | <summary>Destructor disposing the file</summary> | ||
852 | </member> | ||
853 | <member name="M:HttpServer.HttpFile.Dispose(System.Boolean)"> | ||
1568 | <summary> | 854 | <summary> |
1569 | Makes a deep copy of the input | 855 | Deletes the temporary file |
1570 | </summary> | 856 | </summary> |
1571 | <param name="input">The input to copy</param> | 857 | <param name="disposing">True if manual dispose</param> |
1572 | </member> | 858 | </member> |
1573 | <member name="M:HttpServer.HttpForm.AddFile(HttpServer.HttpFile)"> | 859 | <member name="M:HttpServer.HttpFile.Dispose"> |
1574 | <summary> | 860 | <summary> |
1575 | Adds a file to the collection of posted files | 861 | Disposing interface, cleans up managed resources (the temporary file) and suppresses finalization |
1576 | </summary> | 862 | </summary> |
1577 | <param name="file">The file to add</param> | ||
1578 | <exception cref="T:System.ArgumentException">If the file is already added</exception> | ||
1579 | <exception cref="T:System.ArgumentNullException">If file is null</exception> | ||
1580 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
1581 | </member> | 863 | </member> |
1582 | <member name="M:HttpServer.HttpForm.ContainsFile(System.String)"> | 864 | <member name="P:HttpServer.HttpFile.Name"> |
1583 | <summary> | 865 | <summary> |
1584 | Checks if the form contains a specified file | 866 | The name/id of the file |
1585 | </summary> | 867 | </summary> |
1586 | <param name="name">Field name of the file parameter</param> | ||
1587 | <returns>True if the file exists</returns> | ||
1588 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
1589 | </member> | 868 | </member> |
1590 | <member name="M:HttpServer.HttpForm.GetFile(System.String)"> | 869 | <member name="P:HttpServer.HttpFile.Filename"> |
1591 | <summary> | 870 | <summary> |
1592 | Retrieves a file held by by the form | 871 | The full file path |
1593 | </summary> | 872 | </summary> |
1594 | <param name="name">The identifier of the file</param> | ||
1595 | <returns>The requested file or null if the file was not found</returns> | ||
1596 | <exception cref="T:System.ArgumentNullException">If name is null or empty</exception> | ||
1597 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
1598 | </member> | 873 | </member> |
1599 | <member name="M:HttpServer.HttpForm.Clear"> | 874 | <member name="P:HttpServer.HttpFile.UploadFilename"> |
1600 | <summary>Disposes all held HttpFile's and resets values</summary> | 875 | <summary> |
876 | The name of the uploaded file | ||
877 | </summary> | ||
1601 | </member> | 878 | </member> |
1602 | <member name="P:HttpServer.HttpForm.Files"> | 879 | <member name="P:HttpServer.HttpFile.ContentType"> |
1603 | <summary> | 880 | <summary> |
1604 | Retrieves the number of files added to the <see cref="T:HttpServer.HttpForm"/> | 881 | The type of file |
1605 | </summary> | 882 | </summary> |
1606 | <returns>0 if no files are added</returns> | 883 | </member> |
884 | <member name="T:HttpServer.FormDecoders.XmlDecoder"> | ||
885 | <summary> | ||
886 | This decoder converts XML documents to form items. | ||
887 | Each element becomes a subitem in the form, and each attribute becomes an item. | ||
888 | </summary> | ||
889 | <example> | ||
890 | // xml: <hello id="1">something<world id="2">data</world></hello> | ||
891 | // result: | ||
892 | // form["hello"].Value = "something" | ||
893 | // form["hello"]["id"].Value = 1 | ||
894 | // form["hello"]["world]["id"].Value = 1 | ||
895 | // form["hello"]["world"].Value = "data" | ||
896 | </example> | ||
897 | <remarks> | ||
898 | The original xml document is stored in form["__xml__"].Value. | ||
899 | </remarks> | ||
900 | </member> | ||
901 | <member name="T:HttpServer.FormDecoders.IFormDecoder"> | ||
902 | <summary> | ||
903 | Interface for form content decoders. | ||
904 | </summary> | ||
905 | </member> | ||
906 | <member name="M:HttpServer.FormDecoders.IFormDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> | ||
907 | <summary> | ||
908 | |||
909 | </summary> | ||
910 | <param name="stream">Stream containing the content</param> | ||
911 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
912 | <param name="encoding">Stream enconding</param> | ||
913 | <returns>A http form, or null if content could not be parsed.</returns> | ||
914 | <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception> | ||
915 | </member> | ||
916 | <member name="M:HttpServer.FormDecoders.IFormDecoder.CanParse(System.String)"> | ||
917 | <summary> | ||
918 | Checks if the decoder can handle the mime type | ||
919 | </summary> | ||
920 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
921 | <returns>True if the decoder can parse the specified content type</returns> | ||
922 | </member> | ||
923 | <member name="M:HttpServer.FormDecoders.XmlDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> | ||
924 | <summary> | ||
925 | |||
926 | </summary> | ||
927 | <param name="stream">Stream containing the content</param> | ||
928 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
929 | <param name="encoding">Stream encoding</param> | ||
930 | Note: contentType and encoding are not used? | ||
931 | <returns>A http form, or null if content could not be parsed.</returns> | ||
932 | <exception cref="T:System.IO.InvalidDataException"></exception> | ||
933 | </member> | ||
934 | <member name="M:HttpServer.FormDecoders.XmlDecoder.TraverseNode(HttpServer.IHttpInput,System.Xml.XmlNode)"> | ||
935 | <summary> | ||
936 | Recursive function that will go through an xml element and store it's content | ||
937 | to the form item. | ||
938 | </summary> | ||
939 | <param name="item">(parent) Item in form that content should be added to.</param> | ||
940 | <param name="node">Node that should be parsed.</param> | ||
941 | </member> | ||
942 | <member name="M:HttpServer.FormDecoders.XmlDecoder.CanParse(System.String)"> | ||
943 | <summary> | ||
944 | Checks if the decoder can handle the mime type | ||
945 | </summary> | ||
946 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
947 | <returns>True if the decoder can parse the specified content type</returns> | ||
1607 | </member> | 948 | </member> |
1608 | <member name="T:HttpServer.Helpers.ObjectForm"> | 949 | <member name="T:HttpServer.Helpers.ObjectForm"> |
1609 | <summary> | 950 | <summary> |
@@ -1722,405 +1063,397 @@ | |||
1722 | </summary> | 1063 | </summary> |
1723 | <returns>html</returns> | 1064 | <returns>html</returns> |
1724 | </member> | 1065 | </member> |
1725 | <member name="T:HttpServer.FormDecoders.FormDecoderProvider"> | 1066 | <member name="T:HttpServer.FormDecoders.MultipartDecoder"> |
1726 | <summary> | ||
1727 | This provider is used to let us implement any type of form decoding we want without | ||
1728 | having to rewrite anything else in the server. | ||
1729 | </summary> | ||
1730 | </member> | ||
1731 | <member name="M:HttpServer.FormDecoders.FormDecoderProvider.Decode(System.String,System.IO.Stream,System.Text.Encoding)"> | ||
1732 | <summary> | 1067 | <summary> |
1733 | 1068 | ||
1734 | </summary> | 1069 | </summary> |
1735 | <param name="contentType">Should contain boundary and type, as in: multipart/form-data; boundary=---------------------------230051238959</param> | 1070 | <remarks> |
1736 | <param name="stream">Stream containing form data.</param> | 1071 | http://www.faqs.org/rfcs/rfc1867.html |
1737 | <param name="encoding">Encoding used when decoding the stream</param> | 1072 | </remarks> |
1738 | <returns><see cref="F:HttpServer.HttpInput.Empty"/> if no parser was found.</returns> | ||
1739 | <exception cref="T:System.ArgumentException">If stream is null or not readable.</exception> | ||
1740 | <exception cref="T:System.IO.InvalidDataException">If stream contents cannot be decoded properly.</exception> | ||
1741 | </member> | 1073 | </member> |
1742 | <member name="M:HttpServer.FormDecoders.FormDecoderProvider.Add(HttpServer.FormDecoders.IFormDecoder)"> | 1074 | <member name="F:HttpServer.FormDecoders.MultipartDecoder.MimeType"> |
1743 | <summary> | 1075 | <summary> |
1744 | Add a decoder. | 1076 | multipart/form-data |
1745 | </summary> | 1077 | </summary> |
1746 | <param name="decoder"></param> | ||
1747 | <exception cref="T:System.ArgumentNullException"></exception> | ||
1748 | </member> | 1078 | </member> |
1749 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.Count"> | 1079 | <member name="F:HttpServer.FormDecoders.MultipartDecoder.FormData"> |
1750 | <summary> | 1080 | <summary> |
1751 | Number of added decoders. | 1081 | form-data |
1752 | </summary> | 1082 | </summary> |
1753 | </member> | 1083 | </member> |
1754 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.Decoders"> | 1084 | <member name="M:HttpServer.FormDecoders.MultipartDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> |
1755 | <summary> | 1085 | <summary> |
1756 | Use with care. | 1086 | |
1757 | </summary> | 1087 | </summary> |
1088 | <param name="stream">Stream containing the content</param> | ||
1089 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
1090 | <param name="encoding">Stream enconding</param> | ||
1091 | <returns>A http form, or null if content could not be parsed.</returns> | ||
1092 | <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception> | ||
1093 | <exception cref="T:System.ArgumentNullException">If any parameter is null</exception> | ||
1758 | </member> | 1094 | </member> |
1759 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.DefaultDecoder"> | 1095 | <member name="M:HttpServer.FormDecoders.MultipartDecoder.CanParse(System.String)"> |
1760 | <summary> | 1096 | <summary> |
1761 | Decoder used for unknown content types. | 1097 | Checks if the decoder can handle the mime type |
1762 | </summary> | 1098 | </summary> |
1099 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
1100 | <returns>True if the decoder can parse the specified content type</returns> | ||
1763 | </member> | 1101 | </member> |
1764 | <member name="T:HttpServer.ExceptionHandler"> | 1102 | <member name="T:HttpServer.Exceptions.BadRequestException"> |
1765 | <summary> | 1103 | <summary> |
1766 | We dont want to let the server to die due to exceptions thrown in worker threads. | 1104 | The request could not be understood by the server due to malformed syntax. |
1767 | therefore we use this delegate to give you a change to handle uncaught exceptions. | 1105 | The client SHOULD NOT repeat the request without modifications. |
1106 | |||
1107 | Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php | ||
1768 | </summary> | 1108 | </summary> |
1769 | <param name="source">Class that the exception was thrown in.</param> | ||
1770 | <param name="exception">Exception</param> | ||
1771 | <remarks> | ||
1772 | Server will throw a InternalServerException in release version if you dont | ||
1773 | handle this delegate. | ||
1774 | </remarks> | ||
1775 | </member> | 1109 | </member> |
1776 | <member name="T:HttpServer.HttpClientContext"> | 1110 | <member name="M:HttpServer.Exceptions.BadRequestException.#ctor(System.String)"> |
1777 | <summary> | 1111 | <summary> |
1778 | Contains a connection to a browser/client. | 1112 | Create a new bad request exception. |
1779 | </summary> | 1113 | </summary> |
1780 | <remarks> | 1114 | <param name="errMsg">reason to why the request was bad.</param> |
1781 | Remember to <see cref="M:HttpServer.HttpClientContext.Start"/> after you have hooked the <see cref="E:HttpServer.HttpClientContext.RequestReceived"/> event. | ||
1782 | </remarks> | ||
1783 | TODO: Maybe this class should be broken up into HttpClientChannel and HttpClientContext? | ||
1784 | </member> | 1115 | </member> |
1785 | <member name="M:HttpServer.HttpClientContext.#ctor(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,HttpServer.IRequestParserFactory,System.Int32,System.Net.Sockets.Socket)"> | 1116 | <member name="M:HttpServer.Exceptions.BadRequestException.#ctor(System.String,System.Exception)"> |
1786 | <summary> | 1117 | <summary> |
1787 | Initializes a new instance of the <see cref="T:HttpServer.HttpClientContext"/> class. | 1118 | Create a new bad request exception. |
1788 | </summary> | 1119 | </summary> |
1789 | <param name="secured">true if the connection is secured (SSL/TLS)</param> | 1120 | <param name="errMsg">reason to why the request was bad.</param> |
1790 | <param name="remoteEndPoint">client that connected.</param> | 1121 | <param name="inner">inner exception</param> |
1791 | <param name="stream">Stream used for communication</param> | ||
1792 | <param name="parserFactory">Used to create a <see cref="T:HttpServer.IHttpRequestParser"/>.</param> | ||
1793 | <param name="bufferSize">Size of buffer to use when reading data. Must be at least 4096 bytes.</param> | ||
1794 | <exception cref="T:System.Net.Sockets.SocketException">If <see cref="M:System.Net.Sockets.Socket.BeginReceive(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags,System.AsyncCallback,System.Object)"/> fails</exception> | ||
1795 | <exception cref="T:System.ArgumentException">Stream must be writable and readable.</exception> | ||
1796 | </member> | 1122 | </member> |
1797 | <member name="M:HttpServer.HttpClientContext.OnBodyBytesReceived(System.Object,HttpServer.Parser.BodyEventArgs)"> | 1123 | <member name="T:HttpServer.ResponseCookies"> |
1798 | <summary> | 1124 | <summary> |
1799 | Process incoming body bytes. | 1125 | Cookies that should be set. |
1800 | </summary> | 1126 | </summary> |
1801 | <param name="sender"><see cref="T:HttpServer.IHttpRequestParser"/></param> | ||
1802 | <param name="e">Bytes</param> | ||
1803 | </member> | 1127 | </member> |
1804 | <member name="M:HttpServer.HttpClientContext.OnHeaderReceived(System.Object,HttpServer.Parser.HeaderEventArgs)"> | 1128 | <member name="M:HttpServer.ResponseCookies.Add(HttpServer.ResponseCookie)"> |
1805 | <summary> | 1129 | <summary> |
1806 | 1130 | Adds a cookie in the collection. | |
1807 | </summary> | 1131 | </summary> |
1808 | <param name="sender"></param> | 1132 | <param name="cookie">cookie to add</param> |
1809 | <param name="e"></param> | 1133 | <exception cref="T:System.ArgumentNullException">cookie is null</exception> |
1810 | </member> | 1134 | </member> |
1811 | <member name="M:HttpServer.HttpClientContext.Start"> | 1135 | <member name="M:HttpServer.ResponseCookies.Add(HttpServer.RequestCookie,System.DateTime)"> |
1812 | <summary> | 1136 | <summary> |
1813 | Start reading content. | 1137 | Copy a request cookie |
1814 | </summary> | 1138 | </summary> |
1815 | <remarks> | 1139 | <param name="cookie"></param> |
1816 | Make sure to call base.Start() if you override this method. | 1140 | <param name="expires">When the cookie should expire</param> |
1817 | </remarks> | ||
1818 | </member> | 1141 | </member> |
1819 | <member name="M:HttpServer.HttpClientContext.Cleanup"> | 1142 | <member name="M:HttpServer.ResponseCookies.GetEnumerator"> |
1820 | <summary> | 1143 | <summary> |
1821 | Clean up context. | 1144 | Gets a collection enumerator on the cookie list. |
1822 | </summary> | 1145 | </summary> |
1823 | <remarks> | 1146 | <returns>collection enumerator</returns> |
1824 | Make sure to call base.Cleanup() if you override the method. | ||
1825 | </remarks> | ||
1826 | </member> | 1147 | </member> |
1827 | <member name="M:HttpServer.HttpClientContext.Disconnect(System.Net.Sockets.SocketError)"> | 1148 | <member name="M:HttpServer.ResponseCookies.Clear"> |
1828 | <summary> | 1149 | <summary> |
1829 | Disconnect from client | 1150 | Remove all cookies |
1830 | </summary> | 1151 | </summary> |
1831 | <param name="error">error to report in the <see cref="E:HttpServer.HttpClientContext.Disconnected"/> event.</param> | ||
1832 | </member> | 1152 | </member> |
1833 | <member name="M:HttpServer.HttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String,System.String,System.String)"> | 1153 | <member name="M:HttpServer.ResponseCookies.System#Collections#Generic#IEnumerable{HttpServer#ResponseCookie}#GetEnumerator"> |
1834 | <summary> | 1154 | <summary> |
1835 | Send a response. | 1155 | Returns an enumerator that iterates through the collection. |
1836 | </summary> | 1156 | </summary> |
1837 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> | 1157 | |
1838 | <param name="statusCode">HTTP status code</param> | 1158 | <returns> |
1839 | <param name="reason">reason for the status code.</param> | 1159 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. |
1840 | <param name="body">HTML body contents, can be null or empty.</param> | 1160 | </returns> |
1841 | <param name="contentType">A content type to return the body as, i.e. 'text/html' or 'text/plain', defaults to 'text/html' if null or empty</param> | 1161 | <filterpriority>1</filterpriority> |
1842 | <exception cref="T:System.ArgumentException">If <paramref name="httpVersion"/> is invalid.</exception> | ||
1843 | </member> | 1162 | </member> |
1844 | <member name="M:HttpServer.HttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String)"> | 1163 | <member name="P:HttpServer.ResponseCookies.Count"> |
1845 | <summary> | 1164 | <summary> |
1846 | Send a response. | 1165 | Gets the count of cookies in the collection. |
1847 | </summary> | 1166 | </summary> |
1848 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> | ||
1849 | <param name="statusCode">HTTP status code</param> | ||
1850 | <param name="reason">reason for the status code.</param> | ||
1851 | </member> | 1167 | </member> |
1852 | <member name="M:HttpServer.HttpClientContext.Respond(System.String)"> | 1168 | <member name="P:HttpServer.ResponseCookies.Item(System.String)"> |
1853 | <summary> | 1169 | <summary> |
1854 | Send a response. | 1170 | Gets the cookie of a given identifier (null if not existing). |
1855 | </summary> | 1171 | </summary> |
1856 | <exception cref="T:System.ArgumentNullException"></exception> | ||
1857 | </member> | 1172 | </member> |
1858 | <member name="M:HttpServer.HttpClientContext.Send(System.Byte[])"> | 1173 | <member name="T:HttpServer.ResponseCookie"> |
1859 | <summary> | 1174 | <summary> |
1860 | send a whole buffer | 1175 | cookie being sent back to the browser. |
1861 | </summary> | 1176 | </summary> |
1862 | <param name="buffer">buffer to send</param> | 1177 | <seealso cref="T:HttpServer.ResponseCookie"/> |
1863 | <exception cref="T:System.ArgumentNullException"></exception> | ||
1864 | </member> | 1178 | </member> |
1865 | <member name="M:HttpServer.HttpClientContext.Send(System.Byte[],System.Int32,System.Int32)"> | 1179 | <member name="T:HttpServer.RequestCookie"> |
1866 | <summary> | 1180 | <summary> |
1867 | Send data using the stream | 1181 | cookie sent by the client/browser |
1868 | </summary> | 1182 | </summary> |
1869 | <param name="buffer">Contains data to send</param> | 1183 | <seealso cref="T:HttpServer.ResponseCookie"/> |
1870 | <param name="offset">Start position in buffer</param> | ||
1871 | <param name="size">number of bytes to send</param> | ||
1872 | <exception cref="T:System.ArgumentNullException"></exception> | ||
1873 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> | ||
1874 | </member> | 1184 | </member> |
1875 | <member name="E:HttpServer.HttpClientContext.Cleaned"> | 1185 | <member name="M:HttpServer.RequestCookie.#ctor(System.String,System.String)"> |
1876 | <summary> | 1186 | <summary> |
1877 | This context have been cleaned, which means that it can be reused. | 1187 | Constructor. |
1878 | </summary> | 1188 | </summary> |
1189 | <param name="id">cookie identifier</param> | ||
1190 | <param name="content">cookie content</param> | ||
1191 | <exception cref="T:System.ArgumentNullException">id or content is null</exception> | ||
1192 | <exception cref="T:System.ArgumentException">id is empty</exception> | ||
1879 | </member> | 1193 | </member> |
1880 | <member name="E:HttpServer.HttpClientContext.Started"> | 1194 | <member name="M:HttpServer.RequestCookie.ToString"> |
1881 | <summary> | 1195 | <summary> |
1882 | Context have been started (a new client have connected) | 1196 | Gets the cookie HTML representation. |
1883 | </summary> | 1197 | </summary> |
1198 | <returns>cookie string</returns> | ||
1884 | </member> | 1199 | </member> |
1885 | <member name="P:HttpServer.HttpClientContext.CurrentRequest"> | 1200 | <member name="P:HttpServer.RequestCookie.Name"> |
1886 | <summary> | 1201 | <summary> |
1887 | Overload to specify own type. | 1202 | Gets the cookie identifier. |
1888 | </summary> | 1203 | </summary> |
1889 | <remarks> | ||
1890 | Must be specified before the context is being used. | ||
1891 | </remarks> | ||
1892 | </member> | 1204 | </member> |
1893 | <member name="P:HttpServer.HttpClientContext.Secured"> | 1205 | <member name="P:HttpServer.RequestCookie.Value"> |
1894 | <summary> | 1206 | <summary> |
1895 | Using SSL or other encryption method. | 1207 | Cookie value. Set to null to remove cookie. |
1896 | </summary> | 1208 | </summary> |
1897 | </member> | 1209 | </member> |
1898 | <member name="P:HttpServer.HttpClientContext.IsSecured"> | 1210 | <member name="M:HttpServer.ResponseCookie.#ctor(System.String,System.String,System.DateTime)"> |
1899 | <summary> | 1211 | <summary> |
1900 | Using SSL or other encryption method. | 1212 | Constructor. |
1901 | </summary> | 1213 | </summary> |
1214 | <param name="id">cookie identifier</param> | ||
1215 | <param name="content">cookie content</param> | ||
1216 | <param name="expiresAt">cookie expiration date. Use DateTime.MinValue for session cookie.</param> | ||
1217 | <exception cref="T:System.ArgumentNullException">id or content is null</exception> | ||
1218 | <exception cref="T:System.ArgumentException">id is empty</exception> | ||
1902 | </member> | 1219 | </member> |
1903 | <member name="P:HttpServer.HttpClientContext.LogWriter"> | 1220 | <member name="M:HttpServer.ResponseCookie.#ctor(System.String,System.String,System.DateTime,System.String,System.String)"> |
1904 | <summary> | 1221 | <summary> |
1905 | Specify which logger to use. | 1222 | Create a new cookie |
1906 | </summary> | 1223 | </summary> |
1224 | <param name="name">name identifying the cookie</param> | ||
1225 | <param name="value">cookie value</param> | ||
1226 | <param name="expires">when the cookie expires. Setting DateTime.MinValue will delete the cookie when the session is closed.</param> | ||
1227 | <param name="path">Path to where the cookie is valid</param> | ||
1228 | <param name="domain">Domain that the cookie is valid for.</param> | ||
1907 | </member> | 1229 | </member> |
1908 | <member name="P:HttpServer.HttpClientContext.Stream"> | 1230 | <member name="M:HttpServer.ResponseCookie.#ctor(HttpServer.RequestCookie,System.DateTime)"> |
1909 | <summary> | 1231 | <summary> |
1910 | Gets or sets the network stream. | 1232 | Create a new cookie |
1911 | </summary> | 1233 | </summary> |
1234 | <param name="cookie">Name and value will be used</param> | ||
1235 | <param name="expires">when the cookie expires.</param> | ||
1912 | </member> | 1236 | </member> |
1913 | <member name="P:HttpServer.HttpClientContext.RemoteAddress"> | 1237 | <member name="M:HttpServer.ResponseCookie.ToString"> |
1914 | <summary> | 1238 | <summary> |
1915 | Gets or sets IP address that the client connected from. | 1239 | Gets the cookie HTML representation. |
1916 | </summary> | 1240 | </summary> |
1241 | <returns>cookie string</returns> | ||
1917 | </member> | 1242 | </member> |
1918 | <member name="P:HttpServer.HttpClientContext.RemotePort"> | 1243 | <member name="P:HttpServer.ResponseCookie.Expires"> |
1919 | <summary> | 1244 | <summary> |
1920 | Gets or sets port that the client connected from. | 1245 | When the cookie expires. |
1246 | DateTime.MinValue means that the cookie expires when the session do so. | ||
1921 | </summary> | 1247 | </summary> |
1922 | </member> | 1248 | </member> |
1923 | <member name="E:HttpServer.HttpClientContext.Disconnected"> | 1249 | <member name="P:HttpServer.ResponseCookie.Path"> |
1924 | <summary> | 1250 | <summary> |
1925 | The context have been disconnected. | 1251 | Cookie is only valid under this path. |
1926 | </summary> | 1252 | </summary> |
1927 | <remarks> | ||
1928 | Event can be used to clean up a context, or to reuse it. | ||
1929 | </remarks> | ||
1930 | </member> | 1253 | </member> |
1931 | <member name="E:HttpServer.HttpClientContext.RequestReceived"> | 1254 | <member name="T:HttpServer.IComponentProvider"> |
1932 | <summary> | 1255 | <summary> |
1933 | A request have been received in the context. | 1256 | Inversion of control interface. |
1934 | </summary> | 1257 | </summary> |
1935 | </member> | 1258 | </member> |
1936 | <member name="T:HttpServer.Helpers.XmlHelper"> | 1259 | <member name="M:HttpServer.IComponentProvider.AddInstance``1(System.Object)"> |
1937 | <summary> | 1260 | <summary> |
1938 | Helpers to make XML handling easier | 1261 | Add a component instance |
1939 | </summary> | 1262 | </summary> |
1263 | <typeparam name="T">Interface type</typeparam> | ||
1264 | <param name="instance">Instance to add</param> | ||
1940 | </member> | 1265 | </member> |
1941 | <member name="M:HttpServer.Helpers.XmlHelper.Serialize(System.Object)"> | 1266 | <member name="M:HttpServer.IComponentProvider.Get``1"> |
1942 | <summary> | 1267 | <summary> |
1943 | Serializes object to XML. | 1268 | Get a component. |
1944 | </summary> | 1269 | </summary> |
1945 | <param name="value">object to serialize.</param> | 1270 | <typeparam name="T">Interface type</typeparam> |
1946 | <returns>XML</returns> | 1271 | <returns>Component if registered, otherwise null.</returns> |
1947 | <remarks> | 1272 | <remarks> |
1948 | Removes name spaces and adds indentation | 1273 | Component will get created if needed. |
1949 | </remarks> | 1274 | </remarks> |
1950 | </member> | 1275 | </member> |
1951 | <member name="M:HttpServer.Helpers.XmlHelper.Deserialize``1(System.String)"> | 1276 | <member name="M:HttpServer.IComponentProvider.Contains(System.Type)"> |
1952 | <summary> | ||
1953 | Create an object from a XML string | ||
1954 | </summary> | ||
1955 | <typeparam name="T">Type of object</typeparam> | ||
1956 | <param name="xml">XML string</param> | ||
1957 | <returns>object</returns> | ||
1958 | </member> | ||
1959 | <member name="T:HttpServer.FormDecoders.UrlDecoder"> | ||
1960 | <summary> | 1277 | <summary> |
1961 | Can handle application/x-www-form-urlencoded | 1278 | Checks if the specified component interface have been added. |
1962 | </summary> | 1279 | </summary> |
1280 | <param name="interfaceType"></param> | ||
1281 | <returns>true if found; otherwise false.</returns> | ||
1963 | </member> | 1282 | </member> |
1964 | <member name="M:HttpServer.FormDecoders.UrlDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> | 1283 | <member name="M:HttpServer.IComponentProvider.Add``2"> |
1965 | <summary> | 1284 | <summary> |
1285 | Add a component. | ||
1966 | </summary> | 1286 | </summary> |
1967 | <param name="stream">Stream containing the content</param> | 1287 | <typeparam name="InterfaceType">Type being requested.</typeparam> |
1968 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | 1288 | <typeparam name="InstanceType">Type being created.</typeparam> |
1969 | <param name="encoding">Stream encoding</param> | ||
1970 | <returns> | ||
1971 | A HTTP form, or null if content could not be parsed. | ||
1972 | </returns> | ||
1973 | <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception> | ||
1974 | </member> | 1289 | </member> |
1975 | <member name="M:HttpServer.FormDecoders.UrlDecoder.CanParse(System.String)"> | 1290 | <member name="T:HttpServer.HttpListenerBase"> |
1976 | <summary> | 1291 | <summary> |
1977 | Checks if the decoder can handle the mime type | 1292 | Contains a listener that doesn't do anything with the connections. |
1978 | </summary> | 1293 | </summary> |
1979 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
1980 | <returns>True if the decoder can parse the specified content type</returns> | ||
1981 | </member> | 1294 | </member> |
1982 | <member name="T:HttpServer.ClientAcceptedEventArgs"> | 1295 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory)"> |
1983 | <summary> | 1296 | <summary> |
1984 | Invoked when a client have been accepted by the <see cref="T:HttpServer.HttpListener"/> | 1297 | Listen for regular HTTP connections |
1985 | </summary> | 1298 | </summary> |
1986 | <remarks> | 1299 | <param name="address">IP Address to accept connections on</param> |
1987 | Can be used to revoke incoming connections | 1300 | <param name="port">TCP Port to listen on, default HTTP port is 80.</param> |
1988 | </remarks> | 1301 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> |
1302 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | ||
1303 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | ||
1989 | </member> | 1304 | </member> |
1990 | <member name="M:HttpServer.ClientAcceptedEventArgs.#ctor(System.Net.Sockets.Socket)"> | 1305 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate)"> |
1991 | <summary> | 1306 | <summary> |
1992 | Initializes a new instance of the <see cref="T:HttpServer.ClientAcceptedEventArgs"/> class. | 1307 | Initializes a new instance of the <see cref="T:HttpServer.HttpListenerBase"/> class. |
1993 | </summary> | 1308 | </summary> |
1994 | <param name="socket">The socket.</param> | 1309 | <param name="address">IP Address to accept connections on</param> |
1310 | <param name="port">TCP Port to listen on, default HTTPS port is 443</param> | ||
1311 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | ||
1312 | <param name="certificate">Certificate to use</param> | ||
1995 | </member> | 1313 | </member> |
1996 | <member name="M:HttpServer.ClientAcceptedEventArgs.Revoke"> | 1314 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> |
1997 | <summary> | 1315 | <summary> |
1998 | Client may not be handled. | 1316 | Initializes a new instance of the <see cref="T:HttpServer.HttpListenerBase"/> class. |
1999 | </summary> | 1317 | </summary> |
1318 | <param name="address">IP Address to accept connections on</param> | ||
1319 | <param name="port">TCP Port to listen on, default HTTPS port is 443</param> | ||
1320 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | ||
1321 | <param name="certificate">Certificate to use</param> | ||
1322 | <param name="protocol">which HTTPS protocol to use, default is TLS.</param> | ||
2000 | </member> | 1323 | </member> |
2001 | <member name="P:HttpServer.ClientAcceptedEventArgs.Socket"> | 1324 | <member name="M:HttpServer.HttpListenerBase.OnAccept(System.IAsyncResult)"> |
2002 | <summary> | 1325 | <exception cref="T:System.Exception"><c>Exception</c>.</exception> |
2003 | Accepted socket. | ||
2004 | </summary> | ||
2005 | </member> | 1326 | </member> |
2006 | <member name="P:HttpServer.ClientAcceptedEventArgs.Revoked"> | 1327 | <member name="M:HttpServer.HttpListenerBase.RetryBeginAccept"> |
2007 | <summary> | 1328 | <summary> |
2008 | Client should be revoked. | 1329 | Will try to accept connections one more time. |
2009 | </summary> | 1330 | </summary> |
1331 | <exception cref="T:System.Exception">If any exceptions is thrown.</exception> | ||
2010 | </member> | 1332 | </member> |
2011 | <member name="T:HttpServer.Sessions.HttpSessionClearedArgs"> | 1333 | <member name="M:HttpServer.HttpListenerBase.OnAcceptingSocket(System.Net.Sockets.Socket)"> |
2012 | <summary> | 1334 | <summary> |
2013 | Arguments sent when a <see cref="T:HttpServer.Sessions.IHttpSession"/> is cleared | 1335 | Can be used to create filtering of new connections. |
2014 | </summary> | 1336 | </summary> |
1337 | <param name="socket">Accepted socket</param> | ||
1338 | <returns>true if connection can be accepted; otherwise false.</returns> | ||
2015 | </member> | 1339 | </member> |
2016 | <member name="M:HttpServer.Sessions.HttpSessionClearedArgs.#ctor(System.Boolean)"> | 1340 | <member name="M:HttpServer.HttpListenerBase.Start(System.Int32)"> |
2017 | <summary> | 1341 | <summary> |
2018 | Instantiates the arguments for the event | 1342 | Start listen for new connections |
2019 | </summary> | 1343 | </summary> |
2020 | <param name="expired">True if the session is cleared due to expiration</param> | 1344 | <param name="backlog">Number of connections that can stand in a queue to be accepted.</param> |
1345 | <exception cref="T:System.InvalidOperationException">Listener have already been started.</exception> | ||
2021 | </member> | 1346 | </member> |
2022 | <member name="P:HttpServer.Sessions.HttpSessionClearedArgs.Expired"> | 1347 | <member name="M:HttpServer.HttpListenerBase.Stop"> |
2023 | <summary> | 1348 | <summary> |
2024 | Returns true if the session is cleared due to expiration | 1349 | Stop the listener |
2025 | </summary> | 1350 | </summary> |
1351 | <exception cref="T:System.Net.Sockets.SocketException"></exception> | ||
2026 | </member> | 1352 | </member> |
2027 | <member name="T:HttpServer.Sessions.HttpSessionClearedHandler"> | 1353 | <member name="P:HttpServer.HttpListenerBase.LogWriter"> |
2028 | <summary> | 1354 | <summary> |
2029 | Delegate for when a IHttpSession is cleared | 1355 | Gives you a change to receive log entries for all internals of the HTTP library. |
2030 | </summary> | 1356 | </summary> |
2031 | <param name="session"><see cref="T:HttpServer.Sessions.IHttpSession"/> this is being cleared.</param> | 1357 | <remarks> |
2032 | <param name="args">Arguments for the clearing</param> | 1358 | You may not switch log writer after starting the listener. |
1359 | </remarks> | ||
2033 | </member> | 1360 | </member> |
2034 | <member name="T:HttpServer.Parser.HeaderEventArgs"> | 1361 | <member name="P:HttpServer.HttpListenerBase.UseTraceLogs"> |
2035 | <summary> | 1362 | <summary> |
2036 | Event arguments used when a new header have been parsed. | 1363 | True if we should turn on trace logs. |
2037 | </summary> | 1364 | </summary> |
2038 | </member> | 1365 | </member> |
2039 | <member name="M:HttpServer.Parser.HeaderEventArgs.#ctor(System.String,System.String)"> | 1366 | <member name="E:HttpServer.HttpListenerBase.ExceptionThrown"> |
2040 | <summary> | 1367 | <summary> |
2041 | Initializes a new instance of the <see cref="T:HttpServer.Parser.HeaderEventArgs"/> class. | 1368 | Catch exceptions not handled by the listener. |
2042 | </summary> | 1369 | </summary> |
2043 | <param name="name">Name of header.</param> | 1370 | <remarks> |
2044 | <param name="value">Header value.</param> | 1371 | Exceptions will be thrown during debug mode if this event is not used, |
1372 | exceptions will be printed to console and suppressed during release mode. | ||
1373 | </remarks> | ||
2045 | </member> | 1374 | </member> |
2046 | <member name="M:HttpServer.Parser.HeaderEventArgs.#ctor"> | 1375 | <member name="E:HttpServer.HttpListenerBase.RequestReceived"> |
2047 | <summary> | 1376 | <summary> |
2048 | Initializes a new instance of the <see cref="T:HttpServer.Parser.HeaderEventArgs"/> class. | 1377 | A request have been received from a <see cref="T:HttpServer.IHttpClientContext"/>. |
2049 | </summary> | 1378 | </summary> |
2050 | </member> | 1379 | </member> |
2051 | <member name="P:HttpServer.Parser.HeaderEventArgs.Name"> | 1380 | <member name="T:HttpServer.HttpListener"> |
2052 | <summary> | 1381 | <summary> |
2053 | Gets or sets header name. | 1382 | New implementation of the HTTP listener. |
2054 | </summary> | 1383 | </summary> |
1384 | <remarks> | ||
1385 | Use the <c>Create</c> methods to create a default listener. | ||
1386 | </remarks> | ||
2055 | </member> | 1387 | </member> |
2056 | <member name="P:HttpServer.Parser.HeaderEventArgs.Value"> | 1388 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory)"> |
2057 | <summary> | 1389 | <summary> |
2058 | Gets or sets header value. | 1390 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. |
2059 | </summary> | 1391 | </summary> |
1392 | <param name="address">IP Address to accept connections on</param> | ||
1393 | <param name="port">TCP Port to listen on, default HTTP port is 80.</param> | ||
1394 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | ||
1395 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | ||
1396 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | ||
2060 | </member> | 1397 | </member> |
2061 | <member name="T:HttpServer.Helpers.ResourceManager"> | 1398 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate)"> |
2062 | <summary>Class to handle loading of resource files</summary> | ||
2063 | </member> | ||
2064 | <member name="M:HttpServer.Helpers.ResourceManager.#ctor"> | ||
2065 | <summary> | 1399 | <summary> |
2066 | Initializes a new instance of the <see cref="T:HttpServer.Helpers.ResourceManager"/> class. | 1400 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. |
2067 | </summary> | 1401 | </summary> |
1402 | <param name="address">The address.</param> | ||
1403 | <param name="port">The port.</param> | ||
1404 | <param name="factory">The factory.</param> | ||
1405 | <param name="certificate">The certificate.</param> | ||
2068 | </member> | 1406 | </member> |
2069 | <member name="M:HttpServer.Helpers.ResourceManager.#ctor(HttpServer.ILogWriter)"> | 1407 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> |
2070 | <summary> | 1408 | <summary> |
2071 | Initializes a new instance of the <see cref="T:HttpServer.Helpers.ResourceManager"/> class. | 1409 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. |
2072 | </summary> | 1410 | </summary> |
2073 | <param name="writer">logger.</param> | 1411 | <param name="address">The address.</param> |
1412 | <param name="port">The port.</param> | ||
1413 | <param name="factory">The factory.</param> | ||
1414 | <param name="certificate">The certificate.</param> | ||
1415 | <param name="protocol">The protocol.</param> | ||
2074 | </member> | 1416 | </member> |
2075 | <member name="M:HttpServer.Helpers.ResourceManager.LoadResources(System.String,System.Reflection.Assembly,System.String)"> | 1417 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32)"> |
2076 | <summary> | 1418 | <summary> |
2077 | Loads resources from a namespace in the given assembly to an URI | 1419 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. |
2078 | </summary> | 1420 | </summary> |
2079 | <param name="toUri">The URI to map the resources to</param> | 1421 | <param name="address">Address that the listener should accept connections on.</param> |
2080 | <param name="fromAssembly">The assembly in which the resources reside</param> | 1422 | <param name="port">Port that listener should accept connections on.</param> |
2081 | <param name="fromNamespace">The namespace from which to load the resources</param> | 1423 | <returns>Created HTTP listener.</returns> |
2082 | <usage> | ||
2083 | <code> | ||
2084 | resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views"); | ||
2085 | </code> | ||
2086 | Will make the resource MyLib.Models.User.Views.list.Haml accessible via /user/list.haml or /user/list/ | ||
2087 | </usage> | ||
2088 | <returns>The amount of loaded files, giving you the possibility of making sure the resources needed gets loaded</returns> | ||
2089 | <exception cref="T:System.InvalidOperationException">If a resource has already been mapped to an uri</exception> | ||
2090 | </member> | 1424 | </member> |
2091 | <member name="M:HttpServer.Helpers.ResourceManager.GetResourceStream(System.String)"> | 1425 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate)"> |
2092 | <summary> | 1426 | <summary> |
2093 | Retrieves a stream for the specified resource path if loaded otherwise null | 1427 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. |
2094 | </summary> | 1428 | </summary> |
2095 | <param name="path">Path to the resource to retrieve a stream for</param> | 1429 | <param name="address">Address that the listener should accept connections on.</param> |
2096 | <returns>A stream or null if the resource couldn't be found</returns> | 1430 | <param name="port">Port that listener should accept connections on.</param> |
1431 | <param name="certificate">Certificate to use</param> | ||
1432 | <returns>Created HTTP listener.</returns> | ||
2097 | </member> | 1433 | </member> |
2098 | <member name="M:HttpServer.Helpers.ResourceManager.GetFiles(System.String)"> | 1434 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> |
2099 | <summary> | 1435 | <summary> |
2100 | Fetch all files from the resource that matches the specified arguments. | 1436 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. |
2101 | </summary> | 1437 | </summary> |
2102 | <param name="path">The path to the resource to extract</param> | 1438 | <param name="address">Address that the listener should accept connections on.</param> |
2103 | <returns> | 1439 | <param name="port">Port that listener should accept connections on.</param> |
2104 | a list of files if found; or an empty array if no files are found. | 1440 | <param name="certificate">Certificate to use</param> |
2105 | </returns> | 1441 | <param name="protocol">which HTTPS protocol to use, default is TLS.</param> |
2106 | <exception cref="T:System.ArgumentException">Search path must end with an asterisk for finding arbitrary files</exception> | 1442 | <returns>Created HTTP listener.</returns> |
2107 | </member> | 1443 | </member> |
2108 | <member name="M:HttpServer.Helpers.ResourceManager.GetFiles(System.String,System.String)"> | 1444 | <member name="M:HttpServer.HttpListener.OnAcceptingSocket(System.Net.Sockets.Socket)"> |
2109 | <summary> | 1445 | <summary> |
2110 | Fetch all files from the resource that matches the specified arguments. | 1446 | Can be used to create filtering of new connections. |
2111 | </summary> | 1447 | </summary> |
2112 | <param name="path">Where the file should reside.</param> | 1448 | <param name="socket">Accepted socket</param> |
2113 | <param name="filename">Files to check</param> | ||
2114 | <returns> | 1449 | <returns> |
2115 | a list of files if found; or an empty array if no files are found. | 1450 | true if connection can be accepted; otherwise false. |
2116 | </returns> | 1451 | </returns> |
2117 | </member> | 1452 | </member> |
2118 | <member name="M:HttpServer.Helpers.ResourceManager.ContainsResource(System.String)"> | 1453 | <member name="E:HttpServer.HttpListener.Accepted"> |
2119 | <summary> | 1454 | <summary> |
2120 | Returns whether or not the loader has an instance of the file requested | 1455 | A client have been accepted, but not handled, by the listener. |
2121 | </summary> | 1456 | </summary> |
2122 | <param name="filename">The name of the template/file</param> | ||
2123 | <returns>True if the loader can provide the file</returns> | ||
2124 | </member> | 1457 | </member> |
2125 | <member name="T:HttpServer.Rules.RedirectRule"> | 1458 | <member name="T:HttpServer.Rules.RedirectRule"> |
2126 | <summary> | 1459 | <summary> |
@@ -2200,50 +1533,6 @@ | |||
2200 | <c>true</c> means that a redirect response is sent to the client. | 1533 | <c>true</c> means that a redirect response is sent to the client. |
2201 | </remarks> | 1534 | </remarks> |
2202 | </member> | 1535 | </member> |
2203 | <member name="T:HttpServer.RequestQueue"> | ||
2204 | <summary> | ||
2205 | Used to queue incoming requests. | ||
2206 | </summary> | ||
2207 | </member> | ||
2208 | <member name="M:HttpServer.RequestQueue.#ctor(HttpServer.ProcessRequestHandler)"> | ||
2209 | <summary> | ||
2210 | Initializes a new instance of the <see cref="T:HttpServer.RequestQueue"/> class. | ||
2211 | </summary> | ||
2212 | <param name="handler">Called when a request should be processed.</param> | ||
2213 | </member> | ||
2214 | <member name="M:HttpServer.RequestQueue.QueueThread"> | ||
2215 | <summary> | ||
2216 | Used to process queued requests. | ||
2217 | </summary> | ||
2218 | </member> | ||
2219 | <member name="P:HttpServer.RequestQueue.MaxRequestCount"> | ||
2220 | <summary> | ||
2221 | Gets or sets maximum number of allowed simultaneous requests. | ||
2222 | </summary> | ||
2223 | </member> | ||
2224 | <member name="P:HttpServer.RequestQueue.MaxQueueSize"> | ||
2225 | <summary> | ||
2226 | Gets or sets maximum number of requests queuing to be handled. | ||
2227 | </summary> | ||
2228 | </member> | ||
2229 | <member name="P:HttpServer.RequestQueue.CurrentRequestCount"> | ||
2230 | <summary> | ||
2231 | Specifies how many requests the HTTP server is currently processing. | ||
2232 | </summary> | ||
2233 | </member> | ||
2234 | <member name="T:HttpServer.RequestQueue.QueueItem"> | ||
2235 | <summary> | ||
2236 | Used two queue incoming requests to avoid | ||
2237 | thread starvation. | ||
2238 | </summary> | ||
2239 | </member> | ||
2240 | <member name="T:HttpServer.ProcessRequestHandler"> | ||
2241 | <summary> | ||
2242 | Method used to process a queued request | ||
2243 | </summary> | ||
2244 | <param name="context">Context that the request was received from.</param> | ||
2245 | <param name="request">Request to process.</param> | ||
2246 | </member> | ||
2247 | <member name="T:HttpServer.Parser.HttpRequestParser"> | 1536 | <member name="T:HttpServer.Parser.HttpRequestParser"> |
2248 | <summary> | 1537 | <summary> |
2249 | Parses a HTTP request directly from a stream | 1538 | Parses a HTTP request directly from a stream |
@@ -2380,516 +1669,349 @@ | |||
2380 | A header have been received. | 1669 | A header have been received. |
2381 | </summary> | 1670 | </summary> |
2382 | </member> | 1671 | </member> |
2383 | <member name="T:HttpServer.IHttpResponse"> | 1672 | <member name="T:HttpServer.IHttpRequest"> |
2384 | <summary> | ||
2385 | Response that is sent back to the web browser / client. | ||
2386 | |||
2387 | A response can be sent if different ways. The easiest one is | ||
2388 | to just fill the Body stream with content, everything else | ||
2389 | will then be taken care of by the framework. The default content-type | ||
2390 | is text/html, you should change it if you send anything else. | ||
2391 | |||
2392 | The second and slighty more complex way is to send the response | ||
2393 | as parts. Start with sending the header using the SendHeaders method and | ||
2394 | then you can send the body using SendBody method, but do not forget | ||
2395 | to set ContentType and ContentLength before doing so. | ||
2396 | </summary> | ||
2397 | <example> | ||
2398 | public void MyHandler(IHttpRequest request, IHttpResponse response) | ||
2399 | { | ||
2400 | |||
2401 | } | ||
2402 | </example> | ||
2403 | </member> | ||
2404 | <member name="M:HttpServer.IHttpResponse.AddHeader(System.String,System.String)"> | ||
2405 | <summary> | ||
2406 | Add another header to the document. | ||
2407 | </summary> | ||
2408 | <param name="name">Name of the header, case sensitive, use lower cases.</param> | ||
2409 | <param name="value">Header values can span over multiple lines as long as each line starts with a white space. New line chars should be \r\n</param> | ||
2410 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
2411 | <exception cref="T:System.ArgumentException">If value conditions have not been met.</exception> | ||
2412 | <remarks>Adding any header will override the default ones and those specified by properties.</remarks> | ||
2413 | </member> | ||
2414 | <member name="M:HttpServer.IHttpResponse.Send"> | ||
2415 | <summary> | ||
2416 | Send headers and body to the browser. | ||
2417 | </summary> | ||
2418 | <exception cref="T:System.InvalidOperationException">If content have already been sent.</exception> | ||
2419 | </member> | ||
2420 | <member name="M:HttpServer.IHttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)"> | ||
2421 | <summary> | ||
2422 | Make sure that you have specified ContentLength and sent the headers first. | ||
2423 | </summary> | ||
2424 | <param name="buffer"></param> | ||
2425 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | ||
2426 | <see cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
2427 | <param name="offset">offest of first byte to send</param> | ||
2428 | <param name="count">number of bytes to send.</param> | ||
2429 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | ||
2430 | <seealso cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
2431 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
2432 | is recommended for larger files to keep the memory usage low.</remarks> | ||
2433 | </member> | ||
2434 | <member name="M:HttpServer.IHttpResponse.SendBody(System.Byte[])"> | ||
2435 | <summary> | ||
2436 | Make sure that you have specified ContentLength and sent the headers first. | ||
2437 | </summary> | ||
2438 | <param name="buffer"></param> | ||
2439 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | ||
2440 | <see cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
2441 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | ||
2442 | <seealso cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
2443 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
2444 | is recommended for larger files to keep the memory usage low.</remarks> | ||
2445 | </member> | ||
2446 | <member name="M:HttpServer.IHttpResponse.SendHeaders"> | ||
2447 | <summary> | ||
2448 | Send headers to the client. | ||
2449 | </summary> | ||
2450 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
2451 | <seealso cref="M:HttpServer.IHttpResponse.AddHeader(System.String,System.String)"/> | ||
2452 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | ||
2453 | <seealso cref="M:HttpServer.IHttpResponse.SendBody(System.Byte[])"/> | ||
2454 | </member> | ||
2455 | <member name="M:HttpServer.IHttpResponse.Redirect(System.Uri)"> | ||
2456 | <summary> | ||
2457 | Redirect client to somewhere else using the 302 status code. | ||
2458 | </summary> | ||
2459 | <param name="uri">Destination of the redirect</param> | ||
2460 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
2461 | <remarks>You can not do anything more with the request when a redirect have been done. This should be your last | ||
2462 | action.</remarks> | ||
2463 | </member> | ||
2464 | <member name="M:HttpServer.IHttpResponse.Redirect(System.String)"> | ||
2465 | <summary> | ||
2466 | redirect to somewhere | ||
2467 | </summary> | ||
2468 | <param name="url">where the redirect should go</param> | ||
2469 | <remarks> | ||
2470 | No body are allowed when doing redirects. | ||
2471 | </remarks> | ||
2472 | </member> | ||
2473 | <member name="P:HttpServer.IHttpResponse.Body"> | ||
2474 | <summary> | ||
2475 | The body stream is used to cache the body contents | ||
2476 | before sending everything to the client. It's the simplest | ||
2477 | way to serve documents. | ||
2478 | </summary> | ||
2479 | </member> | ||
2480 | <member name="P:HttpServer.IHttpResponse.ProtocolVersion"> | ||
2481 | <summary> | 1673 | <summary> |
2482 | Defines the version of the HTTP Response for applications where it's required | 1674 | Contains server side HTTP request information. |
2483 | for this to be forced. | ||
2484 | </summary> | 1675 | </summary> |
2485 | </member> | 1676 | </member> |
2486 | <member name="P:HttpServer.IHttpResponse.Chunked"> | 1677 | <member name="M:HttpServer.IHttpRequest.AddHeader(System.String,System.String)"> |
2487 | <summary> | 1678 | <summary> |
2488 | The chunked encoding modifies the body of a message in order to | 1679 | Called during parsing of a <see cref="T:HttpServer.IHttpRequest"/>. |
2489 | transfer it as a series of chunks, each with its own size indicator, | ||
2490 | followed by an OPTIONAL trailer containing entity-header fields. This | ||
2491 | allows dynamically produced content to be transferred along with the | ||
2492 | information necessary for the recipient to verify that it has | ||
2493 | received the full message. | ||
2494 | </summary> | 1680 | </summary> |
1681 | <param name="name">Name of the header, should not be URL encoded</param> | ||
1682 | <param name="value">Value of the header, should not be URL encoded</param> | ||
1683 | <exception cref="T:HttpServer.Exceptions.BadRequestException">If a header is incorrect.</exception> | ||
2495 | </member> | 1684 | </member> |
2496 | <member name="P:HttpServer.IHttpResponse.Connection"> | 1685 | <member name="M:HttpServer.IHttpRequest.AddToBody(System.Byte[],System.Int32,System.Int32)"> |
2497 | <summary> | 1686 | <summary> |
2498 | Kind of connection | 1687 | Add bytes to the body |
2499 | </summary> | 1688 | </summary> |
1689 | <param name="bytes">buffer to read bytes from</param> | ||
1690 | <param name="offset">where to start read</param> | ||
1691 | <param name="length">number of bytes to read</param> | ||
1692 | <returns>Number of bytes actually read (same as length unless we got all body bytes).</returns> | ||
1693 | <exception cref="T:System.InvalidOperationException">If body is not writable</exception> | ||
1694 | <exception cref="T:System.ArgumentNullException"><c>bytes</c> is null.</exception> | ||
1695 | <exception cref="T:System.ArgumentOutOfRangeException"><c>offset</c> is out of range.</exception> | ||
2500 | </member> | 1696 | </member> |
2501 | <member name="P:HttpServer.IHttpResponse.Encoding"> | 1697 | <member name="M:HttpServer.IHttpRequest.Clear"> |
2502 | <summary> | 1698 | <summary> |
2503 | Encoding to use when sending stuff to the client. | 1699 | Clear everything in the request |
2504 | </summary> | 1700 | </summary> |
2505 | <remarks>Default is UTF8</remarks> | ||
2506 | </member> | 1701 | </member> |
2507 | <member name="P:HttpServer.IHttpResponse.KeepAlive"> | 1702 | <member name="M:HttpServer.IHttpRequest.DecodeBody(HttpServer.FormDecoders.FormDecoderProvider)"> |
2508 | <summary> | 1703 | <summary> |
2509 | Number of seconds to keep connection alive | 1704 | Decode body into a form. |
2510 | </summary> | 1705 | </summary> |
2511 | <remarks>Only used if Connection property is set to ConnectionType.KeepAlive</remarks> | 1706 | <param name="providers">A list with form decoders.</param> |
1707 | <exception cref="T:System.IO.InvalidDataException">If body contents is not valid for the chosen decoder.</exception> | ||
1708 | <exception cref="T:System.InvalidOperationException">If body is still being transferred.</exception> | ||
2512 | </member> | 1709 | </member> |
2513 | <member name="P:HttpServer.IHttpResponse.Status"> | 1710 | <member name="M:HttpServer.IHttpRequest.SetCookies(HttpServer.RequestCookies)"> |
2514 | <summary> | 1711 | <summary> |
2515 | Status code that is sent to the client. | 1712 | Sets the cookies. |
2516 | </summary> | 1713 | </summary> |
2517 | <remarks>Default is HttpStatusCode.Ok</remarks> | 1714 | <param name="cookies">The cookies.</param> |
2518 | </member> | 1715 | </member> |
2519 | <member name="P:HttpServer.IHttpResponse.Reason"> | 1716 | <member name="M:HttpServer.IHttpRequest.CreateResponse(HttpServer.IHttpClientContext)"> |
2520 | <summary> | 1717 | <summary> |
2521 | Information about why a specific status code was used. | 1718 | Create a response object. |
2522 | </summary> | 1719 | </summary> |
1720 | <param name="context">Context for the connected client.</param> | ||
1721 | <returns>A new <see cref="T:HttpServer.IHttpResponse"/>.</returns> | ||
2523 | </member> | 1722 | </member> |
2524 | <member name="P:HttpServer.IHttpResponse.ContentLength"> | 1723 | <member name="P:HttpServer.IHttpRequest.AcceptTypes"> |
2525 | <summary> | 1724 | <summary> |
2526 | Size of the body. MUST be specified before sending the header, | 1725 | Gets kind of types accepted by the client. |
2527 | unless property Chunked is set to true. | ||
2528 | </summary> | 1726 | </summary> |
2529 | </member> | 1727 | </member> |
2530 | <member name="P:HttpServer.IHttpResponse.ContentType"> | 1728 | <member name="P:HttpServer.IHttpRequest.Body"> |
2531 | <summary> | 1729 | <summary> |
2532 | Kind of content in the body | 1730 | Gets or sets body stream. |
2533 | </summary> | 1731 | </summary> |
2534 | <remarks>Default is text/html</remarks> | ||
2535 | </member> | 1732 | </member> |
2536 | <member name="P:HttpServer.IHttpResponse.HeadersSent"> | 1733 | <member name="P:HttpServer.IHttpRequest.BodyIsComplete"> |
2537 | <summary> | 1734 | <summary> |
2538 | Headers have been sent to the client- | 1735 | Gets whether the body is complete. |
2539 | </summary> | 1736 | </summary> |
2540 | <remarks>You can not send any additional headers if they have already been sent.</remarks> | ||
2541 | </member> | 1737 | </member> |
2542 | <member name="P:HttpServer.IHttpResponse.Sent"> | 1738 | <member name="P:HttpServer.IHttpRequest.Connection"> |
2543 | <summary> | 1739 | <summary> |
2544 | The whole response have been sent. | 1740 | Gets or sets kind of connection used for the session. |
2545 | </summary> | 1741 | </summary> |
2546 | </member> | 1742 | </member> |
2547 | <member name="P:HttpServer.IHttpResponse.Cookies"> | 1743 | <member name="P:HttpServer.IHttpRequest.ContentLength"> |
2548 | <summary> | 1744 | <summary> |
2549 | Cookies that should be created/changed. | 1745 | Gets or sets number of bytes in the body. |
2550 | </summary> | 1746 | </summary> |
2551 | </member> | 1747 | </member> |
2552 | <member name="T:HttpServer.ConnectionType"> | 1748 | <member name="P:HttpServer.IHttpRequest.Cookies"> |
2553 | <summary> | 1749 | <summary> |
2554 | Type of HTTP connection | 1750 | Gets cookies that was sent with the request. |
2555 | </summary> | 1751 | </summary> |
2556 | </member> | 1752 | </member> |
2557 | <member name="F:HttpServer.ConnectionType.Close"> | 1753 | <member name="P:HttpServer.IHttpRequest.Form"> |
2558 | <summary> | 1754 | <summary> |
2559 | Connection is closed after each request-response | 1755 | Gets form parameters. |
2560 | </summary> | 1756 | </summary> |
2561 | </member> | 1757 | </member> |
2562 | <member name="F:HttpServer.ConnectionType.KeepAlive"> | 1758 | <member name="P:HttpServer.IHttpRequest.Headers"> |
2563 | <summary> | 1759 | <summary> |
2564 | Connection is kept alive for X seconds (unless another request have been made) | 1760 | Gets headers sent by the client. |
2565 | </summary> | 1761 | </summary> |
2566 | </member> | 1762 | </member> |
2567 | <member name="T:HttpServer.HttpResponse"> | 1763 | <member name="P:HttpServer.IHttpRequest.HttpVersion"> |
2568 | <summary> | 1764 | <summary> |
2569 | Response that is sent back to the web browser / client. | 1765 | Gets or sets version of HTTP protocol that's used. |
2570 | </summary> | 1766 | </summary> |
2571 | <remarks> | 1767 | <remarks> |
2572 | <para> | 1768 | Probably <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/>. |
2573 | A response can be sent if different ways. The easiest one is | ||
2574 | to just fill the Body stream with content, everything else | ||
2575 | will then be taken care of by the framework. The default content-type | ||
2576 | is text/html, you should change it if you send anything else. | ||
2577 | </para><para> | ||
2578 | The second and slightly more complex way is to send the response | ||
2579 | as parts. Start with sending the header using the SendHeaders method and | ||
2580 | then you can send the body using SendBody method, but do not forget | ||
2581 | to set <see cref="P:HttpServer.HttpResponse.ContentType"/> and <see cref="P:HttpServer.HttpResponse.ContentLength"/> before doing so. | ||
2582 | </para> | ||
2583 | </remarks> | 1769 | </remarks> |
2584 | <example> | 1770 | <seealso cref="T:HttpServer.HttpHelper"/> |
2585 | <code> | ||
2586 | // Example using response body. | ||
2587 | class MyModule : HttpModule | ||
2588 | { | ||
2589 | public override bool Process(IHttpRequest request, IHttpResponse response, IHttpSession session) | ||
2590 | { | ||
2591 | StreamWriter writer = new StreamWriter(response.Body); | ||
2592 | writer.WriteLine("Hello dear World!"); | ||
2593 | writer.Flush(); | ||
2594 | |||
2595 | // return true to tell webserver that we've handled the url | ||
2596 | return true; | ||
2597 | } | ||
2598 | } | ||
2599 | </code> | ||
2600 | </example> | ||
2601 | todo: add two examples, using SendHeaders/SendBody and just the Body stream. | ||
2602 | </member> | ||
2603 | <member name="M:HttpServer.HttpResponse.#ctor(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> | ||
2604 | <summary> | ||
2605 | Initializes a new instance of the <see cref="T:HttpServer.IHttpResponse"/> class. | ||
2606 | </summary> | ||
2607 | <param name="context">Client that send the <see cref="T:HttpServer.IHttpRequest"/>.</param> | ||
2608 | <param name="request">Contains information of what the client want to receive.</param> | ||
2609 | <exception cref="T:System.ArgumentException"><see cref="P:HttpServer.IHttpRequest.HttpVersion"/> cannot be empty.</exception> | ||
2610 | </member> | ||
2611 | <member name="M:HttpServer.HttpResponse.#ctor(HttpServer.IHttpClientContext,System.String,HttpServer.ConnectionType)"> | ||
2612 | <summary> | ||
2613 | Initializes a new instance of the <see cref="T:HttpServer.IHttpResponse"/> class. | ||
2614 | </summary> | ||
2615 | <param name="context">Client that send the <see cref="T:HttpServer.IHttpRequest"/>.</param> | ||
2616 | <param name="httpVersion">Version of HTTP protocol that the client uses.</param> | ||
2617 | <param name="connectionType">Type of HTTP connection used.</param> | ||
2618 | </member> | ||
2619 | <member name="M:HttpServer.HttpResponse.AddHeader(System.String,System.String)"> | ||
2620 | <summary> | ||
2621 | Add another header to the document. | ||
2622 | </summary> | ||
2623 | <param name="name">Name of the header, case sensitive, use lower cases.</param> | ||
2624 | <param name="value">Header values can span over multiple lines as long as each line starts with a white space. New line chars should be \r\n</param> | ||
2625 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
2626 | <exception cref="T:System.ArgumentException">If value conditions have not been met.</exception> | ||
2627 | <remarks>Adding any header will override the default ones and those specified by properties.</remarks> | ||
2628 | </member> | ||
2629 | <member name="M:HttpServer.HttpResponse.Send"> | ||
2630 | <summary> | ||
2631 | Send headers and body to the browser. | ||
2632 | </summary> | ||
2633 | <exception cref="T:System.InvalidOperationException">If content have already been sent.</exception> | ||
2634 | </member> | ||
2635 | <member name="M:HttpServer.HttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)"> | ||
2636 | <summary> | ||
2637 | Make sure that you have specified <see cref="P:HttpServer.HttpResponse.ContentLength"/> and sent the headers first. | ||
2638 | </summary> | ||
2639 | <param name="buffer"></param> | ||
2640 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | ||
2641 | <see cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
2642 | <param name="offset">offset of first byte to send</param> | ||
2643 | <param name="count">number of bytes to send.</param> | ||
2644 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
2645 | <seealso cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
2646 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
2647 | is recommended for larger files to keep the memory usage low.</remarks> | ||
2648 | </member> | ||
2649 | <member name="M:HttpServer.HttpResponse.SendBody(System.Byte[])"> | ||
2650 | <summary> | ||
2651 | Make sure that you have specified <see cref="P:HttpServer.HttpResponse.ContentLength"/> and sent the headers first. | ||
2652 | </summary> | ||
2653 | <param name="buffer"></param> | ||
2654 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | ||
2655 | <see cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
2656 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
2657 | <seealso cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
2658 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
2659 | is recommended for larger files to keep the memory usage low.</remarks> | ||
2660 | </member> | ||
2661 | <member name="M:HttpServer.HttpResponse.SendHeaders"> | ||
2662 | <summary> | ||
2663 | Send headers to the client. | ||
2664 | </summary> | ||
2665 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
2666 | <seealso cref="M:HttpServer.HttpResponse.AddHeader(System.String,System.String)"/> | ||
2667 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
2668 | <seealso cref="M:HttpServer.HttpResponse.SendBody(System.Byte[])"/> | ||
2669 | </member> | 1771 | </member> |
2670 | <member name="M:HttpServer.HttpResponse.Redirect(System.Uri)"> | 1772 | <member name="P:HttpServer.IHttpRequest.IsAjax"> |
2671 | <summary> | 1773 | <summary> |
2672 | Redirect client to somewhere else using the 302 status code. | 1774 | Gets whether the request was made by Ajax (Asynchronous JavaScript) |
2673 | </summary> | 1775 | </summary> |
2674 | <param name="uri">Destination of the redirect</param> | ||
2675 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
2676 | <remarks>You can not do anything more with the request when a redirect have been done. This should be your last | ||
2677 | action.</remarks> | ||
2678 | </member> | 1776 | </member> |
2679 | <member name="M:HttpServer.HttpResponse.Redirect(System.String)"> | 1777 | <member name="P:HttpServer.IHttpRequest.Method"> |
2680 | <summary> | 1778 | <summary> |
2681 | redirect to somewhere | 1779 | Gets or sets requested method. |
2682 | </summary> | 1780 | </summary> |
2683 | <param name="url">where the redirect should go</param> | ||
2684 | <remarks> | 1781 | <remarks> |
2685 | No body are allowed when doing redirects. | 1782 | Will always be in upper case. |
2686 | </remarks> | 1783 | </remarks> |
1784 | <see cref="P:HttpServer.IHttpRequest.Method"/> | ||
2687 | </member> | 1785 | </member> |
2688 | <member name="P:HttpServer.HttpResponse.Body"> | 1786 | <member name="P:HttpServer.IHttpRequest.Param"> |
2689 | <summary> | ||
2690 | The body stream is used to cache the body contents | ||
2691 | before sending everything to the client. It's the simplest | ||
2692 | way to serve documents. | ||
2693 | </summary> | ||
2694 | </member> | ||
2695 | <member name="P:HttpServer.HttpResponse.Chunked"> | ||
2696 | <summary> | ||
2697 | The chunked encoding modifies the body of a message in order to | ||
2698 | transfer it as a series of chunks, each with its own size indicator, | ||
2699 | followed by an OPTIONAL trailer containing entity-header fields. This | ||
2700 | allows dynamically produced content to be transferred along with the | ||
2701 | information necessary for the recipient to verify that it has | ||
2702 | received the full message. | ||
2703 | </summary> | ||
2704 | </member> | ||
2705 | <member name="P:HttpServer.HttpResponse.ProtocolVersion"> | ||
2706 | <summary> | 1787 | <summary> |
2707 | Defines the version of the HTTP Response for applications where it's required | 1788 | Gets parameter from <see cref="P:HttpServer.IHttpRequest.QueryString"/> or <see cref="P:HttpServer.IHttpRequest.Form"/>. |
2708 | for this to be forced. | ||
2709 | </summary> | 1789 | </summary> |
2710 | </member> | 1790 | </member> |
2711 | <member name="P:HttpServer.HttpResponse.Connection"> | 1791 | <member name="P:HttpServer.IHttpRequest.QueryString"> |
2712 | <summary> | 1792 | <summary> |
2713 | Kind of connection | 1793 | Gets variables sent in the query string |
2714 | </summary> | 1794 | </summary> |
2715 | </member> | 1795 | </member> |
2716 | <member name="P:HttpServer.HttpResponse.Encoding"> | 1796 | <member name="P:HttpServer.IHttpRequest.Uri"> |
2717 | <summary> | 1797 | <summary> |
2718 | Encoding to use when sending stuff to the client. | 1798 | Gets or sets requested URI. |
2719 | </summary> | 1799 | </summary> |
2720 | <remarks>Default is UTF8</remarks> | ||
2721 | </member> | 1800 | </member> |
2722 | <member name="P:HttpServer.HttpResponse.KeepAlive"> | 1801 | <member name="P:HttpServer.IHttpRequest.UriParts"> |
2723 | <summary> | 1802 | <summary> |
2724 | Number of seconds to keep connection alive | 1803 | Gets URI absolute path divided into parts. |
2725 | </summary> | 1804 | </summary> |
2726 | <remarks>Only used if Connection property is set to <see cref="F:HttpServer.ConnectionType.KeepAlive"/>.</remarks> | 1805 | <example> |
1806 | // URI is: http://gauffin.com/code/tiny/ | ||
1807 | Console.WriteLine(request.UriParts[0]); // result: code | ||
1808 | Console.WriteLine(request.UriParts[1]); // result: tiny | ||
1809 | </example> | ||
1810 | <remarks> | ||
1811 | If you're using controllers than the first part is controller name, | ||
1812 | the second part is method name and the third part is Id property. | ||
1813 | </remarks> | ||
1814 | <seealso cref="P:HttpServer.IHttpRequest.Uri"/> | ||
2727 | </member> | 1815 | </member> |
2728 | <member name="P:HttpServer.HttpResponse.Status"> | 1816 | <member name="P:HttpServer.IHttpRequest.UriPath"> |
2729 | <summary> | 1817 | <summary> |
2730 | Status code that is sent to the client. | 1818 | Gets or sets path and query. |
2731 | </summary> | 1819 | </summary> |
2732 | <remarks>Default is <see cref="F:System.Net.HttpStatusCode.OK"/></remarks> | 1820 | <see cref="P:HttpServer.IHttpRequest.Uri"/> |
1821 | <remarks> | ||
1822 | Are only used during request parsing. Cannot be set after "Host" header have been | ||
1823 | added. | ||
1824 | </remarks> | ||
2733 | </member> | 1825 | </member> |
2734 | <member name="P:HttpServer.HttpResponse.Reason"> | 1826 | <member name="T:HttpServer.Helpers.Implementations.PrototypeImp"> |
2735 | <summary> | 1827 | <summary> |
2736 | Information about why a specific status code was used. | 1828 | PrototypeJS implementation of the javascript functions. |
2737 | </summary> | 1829 | </summary> |
2738 | </member> | 1830 | </member> |
2739 | <member name="P:HttpServer.HttpResponse.ContentLength"> | 1831 | <member name="T:HttpServer.Helpers.JavascriptHelperImplementation"> |
2740 | <summary> | 1832 | <summary> |
2741 | Size of the body. MUST be specified before sending the header, | 1833 | Purpose of this class is to create a javascript toolkit independent javascript helper. |
2742 | unless property Chunked is set to true. | ||
2743 | </summary> | 1834 | </summary> |
2744 | </member> | 1835 | </member> |
2745 | <member name="P:HttpServer.HttpResponse.ContentType"> | 1836 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.GenerateOptions(System.Text.StringBuilder,System.String[],System.Boolean)"> |
2746 | <summary> | 1837 | <summary> |
2747 | Kind of content in the body | 1838 | Generates a list with JS options. |
2748 | </summary> | 1839 | </summary> |
2749 | <remarks>Default type is "text/html"</remarks> | 1840 | <param name="sb">StringBuilder that the options should be added to.</param> |
1841 | <param name="options">the javascript options. name, value pairs. each string value should be escaped by YOU!</param> | ||
1842 | <param name="startWithComma">true if we should start with a comma.</param> | ||
2750 | </member> | 1843 | </member> |
2751 | <member name="P:HttpServer.HttpResponse.HeadersSent"> | 1844 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.RemoveJavascriptOptions(System.String[])"> |
2752 | <summary> | 1845 | <summary> |
2753 | Headers have been sent to the client- | 1846 | Removes any javascript parameters from an array of parameters |
2754 | </summary> | 1847 | </summary> |
2755 | <remarks>You can not send any additional headers if they have already been sent.</remarks> | 1848 | <param name="options">The array of parameters to remove javascript params from</param> |
1849 | <returns>An array of html parameters</returns> | ||
2756 | </member> | 1850 | </member> |
2757 | <member name="P:HttpServer.HttpResponse.Sent"> | 1851 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxFormOnSubmit(System.String[])"> |
2758 | <summary> | 1852 | <summary> |
2759 | The whole response have been sent. | 1853 | javascript action that should be added to the "onsubmit" event in the form tag. |
2760 | </summary> | 1854 | </summary> |
1855 | <returns></returns> | ||
1856 | <remarks>All javascript option names should end with colon.</remarks> | ||
1857 | <example> | ||
1858 | <code> | ||
1859 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | ||
1860 | </code> | ||
1861 | </example> | ||
2761 | </member> | 1862 | </member> |
2762 | <member name="P:HttpServer.HttpResponse.Cookies"> | 1863 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxRequest(System.String,System.String[])"> |
2763 | <summary> | 1864 | <summary> |
2764 | Cookies that should be created/changed. | 1865 | Requests a url through ajax |
2765 | </summary> | 1866 | </summary> |
1867 | <param name="url">url to fetch</param> | ||
1868 | <param name="options">optional options in format "key, value, key, value", used in JS request object.</param> | ||
1869 | <returns>a link tag</returns> | ||
1870 | <remarks>All javascript option names should end with colon.</remarks> | ||
1871 | <example> | ||
1872 | <code> | ||
1873 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | ||
1874 | </code> | ||
1875 | </example> | ||
2766 | </member> | 1876 | </member> |
2767 | <member name="T:HttpServer.HttpInputItem"> | 1877 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxUpdater(System.String,System.String,System.String[])"> |
2768 | <summary> | 1878 | <summary> |
2769 | represents a HTTP input item. Each item can have multiple sub items, a sub item | 1879 | Ajax requests that updates an element with |
2770 | is made in a HTML form by using square brackets | 1880 | the fetched content |
2771 | </summary> | 1881 | </summary> |
1882 | <param name="url">Url to fetch content from</param> | ||
1883 | <param name="targetId">element to update</param> | ||
1884 | <param name="options">optional options in format "key, value, key, value", used in JS updater object.</param> | ||
1885 | <returns>A link tag.</returns> | ||
1886 | <remarks>All javascript option names should end with colon.</remarks> | ||
2772 | <example> | 1887 | <example> |
2773 | // <input type="text" name="user[FirstName]" value="jonas" /> becomes: | 1888 | <code> |
2774 | Console.WriteLine("Value: {0}", form["user"]["FirstName"].Value); | 1889 | JSHelper.AjaxUpdater("/user/show/1", "userInfo", "onsuccess:", "alert('Successful!');"); |
1890 | </code> | ||
2775 | </example> | 1891 | </example> |
2776 | <remarks> | ||
2777 | All names in a form SHOULD be in lowercase. | ||
2778 | </remarks> | ||
2779 | </member> | 1892 | </member> |
2780 | <member name="F:HttpServer.HttpInputItem.Empty"> | 1893 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.DialogLink(System.String,System.String,System.String[])"> |
2781 | <summary> Representation of a non-initialized <see cref="T:HttpServer.HttpInputItem"/>.</summary> | ||
2782 | </member> | ||
2783 | <member name="M:HttpServer.HttpInputItem.#ctor(System.String,System.String)"> | ||
2784 | <summary> | 1894 | <summary> |
2785 | Initializes an input item setting its name/identifier and value | 1895 | A link that pop ups a Dialog (overlay div) |
2786 | </summary> | 1896 | </summary> |
2787 | <param name="name">Parameter name/id</param> | 1897 | <param name="url">url to contents of dialog</param> |
2788 | <param name="value">Parameter value</param> | 1898 | <param name="title">link title</param> |
2789 | </member> | 1899 | <returns>A "a"-tag that popups a dialog when clicked</returns> |
2790 | <member name="M:HttpServer.HttpInputItem.#ctor(HttpServer.HttpInputItem)"> | 1900 | <param name="htmlAttributes">name/value of html attributes</param> |
2791 | <summary>Creates a deep copy of the item specified</summary> | 1901 | <example> |
2792 | <param name="item">The item to copy</param> | 1902 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); |
2793 | <remarks>The function makes a deep copy of quite a lot which can be slow</remarks> | 1903 | </example> |
2794 | </member> | 1904 | </member> |
2795 | <member name="M:HttpServer.HttpInputItem.Add(System.String)"> | 1905 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.CloseDialog"> |
2796 | <summary> | 1906 | <summary> |
2797 | Add another value to this item | 1907 | Close a javascript dialog window/div. |
2798 | </summary> | 1908 | </summary> |
2799 | <param name="value">Value to add.</param> | 1909 | <returns>javascript for closing a dialog.</returns> |
2800 | <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception> | 1910 | <see cref="M:HttpServer.Helpers.JavascriptHelperImplementation.DialogLink(System.String,System.String,System.String[])"/> |
2801 | </member> | 1911 | </member> |
2802 | <member name="M:HttpServer.HttpInputItem.Contains(System.String)"> | 1912 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.CreateDialog(System.String,System.String,System.String[])"> |
2803 | <summary> | 1913 | <summary> |
2804 | checks if a sub-item exists (and has a value). | 1914 | Creates a new modal dialog window |
2805 | </summary> | 1915 | </summary> |
2806 | <param name="name">name in lower case</param> | 1916 | <param name="url">url to open in window.</param> |
2807 | <returns>true if the sub-item exists and has a value; otherwise false.</returns> | 1917 | <param name="title">window title (may not be supported by all js implementations)</param> |
2808 | </member> | 1918 | <param name="options"></param> |
2809 | <member name="M:HttpServer.HttpInputItem.ToString"> | 1919 | <returns></returns> |
2810 | <summary> Returns a formatted representation of the instance with the values of all contained parameters </summary> | ||
2811 | </member> | 1920 | </member> |
2812 | <member name="M:HttpServer.HttpInputItem.ToString(System.String,System.Boolean)"> | 1921 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxRequest(System.String,System.String[])"> |
2813 | <summary> | 1922 | <summary> |
2814 | Outputs the string in a formatted manner | 1923 | Requests a url through ajax |
2815 | </summary> | 1924 | </summary> |
2816 | <param name="prefix">A prefix to append, used internally</param> | 1925 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> |
2817 | <param name="asQuerySting">produce a query string</param> | 1926 | <param name="options">optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.</param> |
1927 | <returns>a link tag</returns> | ||
1928 | <remarks>onclick attribute is used by this method.</remarks> | ||
1929 | <example> | ||
1930 | <code> | ||
1931 | // plain text | ||
1932 | JSHelper.AjaxRequest("'/user/show/1'"); | ||
1933 | |||
1934 | // ajax request using this.href | ||
1935 | string link = "<a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/<call user</a>"; | ||
1936 | </code> | ||
1937 | </example> | ||
2818 | </member> | 1938 | </member> |
2819 | <member name="M:HttpServer.HttpInputItem.Add(System.String,System.String)"> | 1939 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.Contains(System.Collections.Generic.IEnumerable{System.String},System.String)"> |
2820 | <summary> | 1940 | <summary> |
2821 | Add a sub item. | 1941 | Determins if a list of strings contains a specific value |
2822 | </summary> | 1942 | </summary> |
2823 | <param name="name">Can contain array formatting, the item is then parsed and added in multiple levels</param> | 1943 | <param name="options">options to check in</param> |
2824 | <param name="value">Value to add.</param> | 1944 | <param name="value">value to find</param> |
2825 | <exception cref="T:System.ArgumentNullException">Argument is null.</exception> | 1945 | <returns>true if value was found</returns> |
2826 | <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception> | 1946 | <remarks>case insensitive</remarks> |
2827 | </member> | 1947 | </member> |
2828 | <member name="M:HttpServer.HttpInputItem.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator"> | 1948 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxUpdater(System.String,System.String,System.String[])"> |
2829 | <summary> | 1949 | <summary> |
2830 | Returns an enumerator that iterates through the collection. | 1950 | Ajax requests that updates an element with |
1951 | the fetched content | ||
2831 | </summary> | 1952 | </summary> |
2832 | 1953 | <param name="url">URL to fetch. URL is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | |
2833 | <returns> | 1954 | <param name="targetId">element to update</param> |
2834 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | 1955 | <param name="options">options in format "key, value, key, value". All keys should end with colon.</param> |
2835 | </returns> | 1956 | <returns>A link tag.</returns> |
2836 | <filterpriority>1</filterpriority> | 1957 | <example> |
1958 | <code> | ||
1959 | JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true"); | ||
1960 | </code> | ||
1961 | </example> | ||
2837 | </member> | 1962 | </member> |
2838 | <member name="M:HttpServer.HttpInputItem.GetEnumerator"> | 1963 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.DialogLink(System.String,System.String,System.String[])"> |
2839 | <summary> | 1964 | <summary> |
2840 | Returns an enumerator that iterates through a collection. | 1965 | A link that pop ups a Dialog (overlay div) |
2841 | </summary> | 1966 | </summary> |
2842 | 1967 | <param name="url">URL to contents of dialog</param> | |
1968 | <param name="title">link title</param> | ||
1969 | <param name="htmlAttributes">name, value, name, value</param> | ||
2843 | <returns> | 1970 | <returns> |
2844 | An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection. | 1971 | A "a"-tag that popups a dialog when clicked |
2845 | </returns> | 1972 | </returns> |
2846 | <filterpriority>2</filterpriority> | 1973 | <remarks><para>Requires Control.Modal found here: http://livepipe.net/projects/control_modal/</para> |
1974 | And the following JavaScript (load it in application.js): | ||
1975 | <code> | ||
1976 | Event.observe(window, 'load', | ||
1977 | function() { | ||
1978 | document.getElementsByClassName('modal').each(function(link){ new Control.Modal(link); }); | ||
1979 | } | ||
1980 | ); | ||
1981 | </code> | ||
1982 | </remarks> | ||
1983 | <example> | ||
1984 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); | ||
1985 | </example> | ||
2847 | </member> | 1986 | </member> |
2848 | <member name="M:HttpServer.HttpInputItem.ToString(System.String)"> | 1987 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.CreateDialog(System.String,System.String,System.String[])"> |
2849 | <summary> | 1988 | <summary> |
2850 | Outputs the string in a formatted manner | 1989 | create a modal dialog (usually using DIVs) |
2851 | </summary> | 1990 | </summary> |
2852 | <param name="prefix">A prefix to append, used internally</param> | 1991 | <param name="url">url to fetch</param> |
1992 | <param name="title">dialog title</param> | ||
1993 | <param name="options">javascript/html attributes. javascript options ends with colon ':'.</param> | ||
2853 | <returns></returns> | 1994 | <returns></returns> |
2854 | </member> | 1995 | </member> |
2855 | <member name="P:HttpServer.HttpInputItem.Count"> | 1996 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.CloseDialog"> |
2856 | <summary> | ||
2857 | Number of values | ||
2858 | </summary> | ||
2859 | </member> | ||
2860 | <member name="P:HttpServer.HttpInputItem.Item(System.String)"> | ||
2861 | <summary> | ||
2862 | Get a sub item | ||
2863 | </summary> | ||
2864 | <param name="name">name in lower case.</param> | ||
2865 | <returns><see cref="F:HttpServer.HttpInputItem.Empty"/> if no item was found.</returns> | ||
2866 | </member> | ||
2867 | <member name="P:HttpServer.HttpInputItem.Name"> | ||
2868 | <summary> | ||
2869 | Name of item (in lower case). | ||
2870 | </summary> | ||
2871 | </member> | ||
2872 | <member name="P:HttpServer.HttpInputItem.Value"> | ||
2873 | <summary> | ||
2874 | Returns the first value, or null if no value exist. | ||
2875 | </summary> | ||
2876 | </member> | ||
2877 | <member name="P:HttpServer.HttpInputItem.LastValue"> | ||
2878 | <summary> | ||
2879 | Returns the last value, or null if no value exist. | ||
2880 | </summary> | ||
2881 | </member> | ||
2882 | <member name="P:HttpServer.HttpInputItem.Values"> | ||
2883 | <summary> | 1997 | <summary> |
2884 | Returns the list with values. | 1998 | Close a javascript dialog window/div. |
2885 | </summary> | 1999 | </summary> |
2000 | <returns>javascript for closing a dialog.</returns> | ||
2001 | <see cref="M:HttpServer.Helpers.Implementations.PrototypeImp.DialogLink(System.String,System.String,System.String[])"/> | ||
2886 | </member> | 2002 | </member> |
2887 | <member name="P:HttpServer.HttpInputItem.HttpServer#IHttpInput#Item(System.String)"> | 2003 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxFormOnSubmit(System.String[])"> |
2888 | <summary> | 2004 | <summary> |
2889 | 2005 | javascript action that should be added to the "onsubmit" event in the form tag. | |
2890 | </summary> | 2006 | </summary> |
2891 | <param name="name">name in lower case</param> | 2007 | <param name="options">remember to encapsulate strings in ''</param> |
2892 | <returns></returns> | 2008 | <returns></returns> |
2009 | <remarks>All javascript option names should end with colon.</remarks> | ||
2010 | <example> | ||
2011 | <code> | ||
2012 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | ||
2013 | </code> | ||
2014 | </example> | ||
2893 | </member> | 2015 | </member> |
2894 | <member name="T:HttpServer.Helpers.FormHelper"> | 2016 | <member name="T:HttpServer.Helpers.FormHelper"> |
2895 | <summary> | 2017 | <summary> |
@@ -3109,40 +2231,262 @@ | |||
3109 | </summary> | 2231 | </summary> |
3110 | <returns></returns> | 2232 | <returns></returns> |
3111 | </member> | 2233 | </member> |
3112 | <member name="M:HttpServer.ComponentProvider.AddInstance``1(System.Object)"> | 2234 | <member name="T:HttpServer.ExceptionHandler"> |
3113 | <summary> | 2235 | <summary> |
3114 | Add a component instance | 2236 | We dont want to let the server to die due to exceptions thrown in worker threads. |
2237 | therefore we use this delegate to give you a change to handle uncaught exceptions. | ||
3115 | </summary> | 2238 | </summary> |
3116 | <typeparam name="T">Interface type</typeparam> | 2239 | <param name="source">Class that the exception was thrown in.</param> |
3117 | <param name="instance">Instance to add</param> | 2240 | <param name="exception">Exception</param> |
2241 | <remarks> | ||
2242 | Server will throw a InternalServerException in release version if you dont | ||
2243 | handle this delegate. | ||
2244 | </remarks> | ||
3118 | </member> | 2245 | </member> |
3119 | <member name="M:HttpServer.ComponentProvider.Get``1"> | 2246 | <member name="T:HttpServer.Authentication.DigestAuthentication"> |
3120 | <summary> | 2247 | <summary> |
3121 | Get a component. | 2248 | Implements HTTP Digest authentication. It's more secure than Basic auth since password is |
2249 | encrypted with a "key" from the server. | ||
3122 | </summary> | 2250 | </summary> |
3123 | <typeparam name="T">Interface type</typeparam> | ||
3124 | <returns>Component if registered, otherwise null.</returns> | ||
3125 | <remarks> | 2251 | <remarks> |
3126 | Component will get created if needed. | 2252 | Keep in mind that the password is encrypted with MD5. Use a combination of SSL and digest auth to be secure. |
3127 | </remarks> | 2253 | </remarks> |
3128 | </member> | 2254 | </member> |
3129 | <member name="M:HttpServer.ComponentProvider.Create(HttpServer.ComponentProvider.TypeInformation)"> | 2255 | <member name="T:HttpServer.Authentication.AuthenticationModule"> |
3130 | <exception cref="T:System.InvalidOperationException">If instance cannot be created.</exception> | 2256 | <summary> |
2257 | Authentication modules are used to implement different | ||
2258 | kind of HTTP authentication. | ||
2259 | </summary> | ||
3131 | </member> | 2260 | </member> |
3132 | <member name="M:HttpServer.ComponentProvider.Contains(System.Type)"> | 2261 | <member name="F:HttpServer.Authentication.AuthenticationModule.AuthenticationTag"> |
3133 | <summary> | 2262 | <summary> |
3134 | Checks if the specified component interface have been added. | 2263 | Tag used for authentication. |
3135 | </summary> | 2264 | </summary> |
3136 | <param name="interfaceType"></param> | ||
3137 | <returns>true if found; otherwise false.</returns> | ||
3138 | </member> | 2265 | </member> |
3139 | <member name="M:HttpServer.ComponentProvider.Add``2"> | 2266 | <member name="M:HttpServer.Authentication.AuthenticationModule.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)"> |
3140 | <summary> | 2267 | <summary> |
3141 | Add a component. | 2268 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.AuthenticationModule"/> class. |
3142 | </summary> | 2269 | </summary> |
3143 | <typeparam name="InterfaceType">Type being requested.</typeparam> | 2270 | <param name="authenticator">Delegate used to provide information used during authentication.</param> |
3144 | <typeparam name="InstanceType">Type being created.</typeparam> | 2271 | <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param> |
3145 | <exception cref="T:System.InvalidOperationException">Type have already been mapped.</exception> | 2272 | </member> |
2273 | <member name="M:HttpServer.Authentication.AuthenticationModule.#ctor(HttpServer.Authentication.AuthenticationHandler)"> | ||
2274 | <summary> | ||
2275 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.AuthenticationModule"/> class. | ||
2276 | </summary> | ||
2277 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | ||
2278 | </member> | ||
2279 | <member name="M:HttpServer.Authentication.AuthenticationModule.CreateResponse(System.String,System.Object[])"> | ||
2280 | <summary> | ||
2281 | Create a response that can be sent in the WWW-Authenticate header. | ||
2282 | </summary> | ||
2283 | <param name="realm">Realm that the user should authenticate in</param> | ||
2284 | <param name="options">Array with optional options.</param> | ||
2285 | <returns>A correct authentication request.</returns> | ||
2286 | <exception cref="T:System.ArgumentNullException">If realm is empty or null.</exception> | ||
2287 | </member> | ||
2288 | <member name="M:HttpServer.Authentication.AuthenticationModule.Authenticate(System.String,System.String,System.String,System.Object[])"> | ||
2289 | <summary> | ||
2290 | An authentication response have been received from the web browser. | ||
2291 | Check if it's correct | ||
2292 | </summary> | ||
2293 | <param name="authenticationHeader">Contents from the Authorization header</param> | ||
2294 | <param name="realm">Realm that should be authenticated</param> | ||
2295 | <param name="httpVerb">GET/POST/PUT/DELETE etc.</param> | ||
2296 | <param name="options">options to specific implementations</param> | ||
2297 | <returns>Authentication object that is stored for the request. A user class or something like that.</returns> | ||
2298 | <exception cref="T:System.ArgumentException">if <paramref name="authenticationHeader"/> is invalid</exception> | ||
2299 | <exception cref="T:System.ArgumentNullException">If any of the parameters is empty or null.</exception> | ||
2300 | </member> | ||
2301 | <member name="M:HttpServer.Authentication.AuthenticationModule.CheckAuthentication(System.String,System.String,System.String@,System.Object@)"> | ||
2302 | <summary> | ||
2303 | Used to invoke the authentication delegate that is used to lookup the user name/realm. | ||
2304 | </summary> | ||
2305 | <param name="realm">Realm (domain) that user want to authenticate in</param> | ||
2306 | <param name="userName">User name</param> | ||
2307 | <param name="password">Password used for validation. Some implementations got password in clear text, they are then sent to client.</param> | ||
2308 | <param name="login">object that will be stored in the request to help you identify the user if authentication was successful.</param> | ||
2309 | <returns>true if authentication was successful</returns> | ||
2310 | </member> | ||
2311 | <member name="M:HttpServer.Authentication.AuthenticationModule.AuthenticationRequired(HttpServer.IHttpRequest)"> | ||
2312 | <summary> | ||
2313 | Determines if authentication is required. | ||
2314 | </summary> | ||
2315 | <param name="request">HTTP request from browser</param> | ||
2316 | <returns>true if user should be authenticated.</returns> | ||
2317 | <remarks>throw <see cref="T:HttpServer.Exceptions.ForbiddenException"/> from your delegate if no more attempts are allowed.</remarks> | ||
2318 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">If no more attempts are allowed</exception> | ||
2319 | </member> | ||
2320 | <member name="P:HttpServer.Authentication.AuthenticationModule.Name"> | ||
2321 | <summary> | ||
2322 | name used in HTTP request. | ||
2323 | </summary> | ||
2324 | </member> | ||
2325 | <member name="M:HttpServer.Authentication.DigestAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)"> | ||
2326 | <summary> | ||
2327 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.DigestAuthentication"/> class. | ||
2328 | </summary> | ||
2329 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | ||
2330 | <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param> | ||
2331 | </member> | ||
2332 | <member name="M:HttpServer.Authentication.DigestAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler)"> | ||
2333 | <summary> | ||
2334 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.DigestAuthentication"/> class. | ||
2335 | </summary> | ||
2336 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | ||
2337 | </member> | ||
2338 | <member name="F:HttpServer.Authentication.DigestAuthentication.DisableNonceCheck"> | ||
2339 | <summary> | ||
2340 | Used by test classes to be able to use hardcoded values | ||
2341 | </summary> | ||
2342 | </member> | ||
2343 | <member name="M:HttpServer.Authentication.DigestAuthentication.Authenticate(System.String,System.String,System.String,System.Object[])"> | ||
2344 | <summary> | ||
2345 | An authentication response have been received from the web browser. | ||
2346 | Check if it's correct | ||
2347 | </summary> | ||
2348 | <param name="authenticationHeader">Contents from the Authorization header</param> | ||
2349 | <param name="realm">Realm that should be authenticated</param> | ||
2350 | <param name="httpVerb">GET/POST/PUT/DELETE etc.</param> | ||
2351 | <param name="options">First option: true if username/password is correct but not cnonce</param> | ||
2352 | <returns> | ||
2353 | Authentication object that is stored for the request. A user class or something like that. | ||
2354 | </returns> | ||
2355 | <exception cref="T:System.ArgumentException">if authenticationHeader is invalid</exception> | ||
2356 | <exception cref="T:System.ArgumentNullException">If any of the paramters is empty or null.</exception> | ||
2357 | </member> | ||
2358 | <member name="M:HttpServer.Authentication.DigestAuthentication.Encrypt(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> | ||
2359 | <summary> | ||
2360 | Encrypts parameters into a Digest string | ||
2361 | </summary> | ||
2362 | <param name="realm">Realm that the user want to log into.</param> | ||
2363 | <param name="userName">User logging in</param> | ||
2364 | <param name="password">Users password.</param> | ||
2365 | <param name="method">HTTP method.</param> | ||
2366 | <param name="uri">Uri/domain that generated the login prompt.</param> | ||
2367 | <param name="qop">Quality of Protection.</param> | ||
2368 | <param name="nonce">"Number used ONCE"</param> | ||
2369 | <param name="nc">Hexadecimal request counter.</param> | ||
2370 | <param name="cnonce">"Client Number used ONCE"</param> | ||
2371 | <returns>Digest encrypted string</returns> | ||
2372 | </member> | ||
2373 | <member name="M:HttpServer.Authentication.DigestAuthentication.Encrypt(System.String,System.String,System.String,System.String,System.String,System.String)"> | ||
2374 | <summary> | ||
2375 | |||
2376 | </summary> | ||
2377 | <param name="ha1">Md5 hex encoded "userName:realm:password", without the quotes.</param> | ||
2378 | <param name="ha2">Md5 hex encoded "method:uri", without the quotes</param> | ||
2379 | <param name="qop">Quality of Protection</param> | ||
2380 | <param name="nonce">"Number used ONCE"</param> | ||
2381 | <param name="nc">Hexadecimal request counter.</param> | ||
2382 | <param name="cnonce">Client number used once</param> | ||
2383 | <returns></returns> | ||
2384 | </member> | ||
2385 | <member name="M:HttpServer.Authentication.DigestAuthentication.CreateResponse(System.String,System.Object[])"> | ||
2386 | <summary> | ||
2387 | Create a response that can be sent in the WWW-Authenticate header. | ||
2388 | </summary> | ||
2389 | <param name="realm">Realm that the user should authenticate in</param> | ||
2390 | <param name="options">First options specifies if true if username/password is correct but not cnonce.</param> | ||
2391 | <returns>A correct auth request.</returns> | ||
2392 | <exception cref="T:System.ArgumentNullException">If realm is empty or null.</exception> | ||
2393 | </member> | ||
2394 | <member name="M:HttpServer.Authentication.DigestAuthentication.Decode(System.String,System.Text.Encoding)"> | ||
2395 | <summary> | ||
2396 | Decodes authorization header value | ||
2397 | </summary> | ||
2398 | <param name="buffer">header value</param> | ||
2399 | <param name="encoding">Encoding that the buffer is in</param> | ||
2400 | <returns>All headers and their values if successful; otherwise null</returns> | ||
2401 | <example> | ||
2402 | NameValueCollection header = DigestAuthentication.Decode("response=\"6629fae49393a05397450978507c4ef1\",\r\nc=00001", Encoding.ASCII); | ||
2403 | </example> | ||
2404 | <remarks>Can handle lots of whitespaces and new lines without failing.</remarks> | ||
2405 | </member> | ||
2406 | <member name="M:HttpServer.Authentication.DigestAuthentication.GetCurrentNonce"> | ||
2407 | <summary> | ||
2408 | Gets the current nonce. | ||
2409 | </summary> | ||
2410 | <returns></returns> | ||
2411 | </member> | ||
2412 | <member name="M:HttpServer.Authentication.DigestAuthentication.GetMD5HashBinHex2(System.String)"> | ||
2413 | <summary> | ||
2414 | Gets the Md5 hash bin hex2. | ||
2415 | </summary> | ||
2416 | <param name="toBeHashed">To be hashed.</param> | ||
2417 | <returns></returns> | ||
2418 | </member> | ||
2419 | <member name="M:HttpServer.Authentication.DigestAuthentication.IsValidNonce(System.String)"> | ||
2420 | <summary> | ||
2421 | determines if the nonce is valid or has expired. | ||
2422 | </summary> | ||
2423 | <param name="nonce">nonce value (check wikipedia for info)</param> | ||
2424 | <returns>true if the nonce has not expired.</returns> | ||
2425 | </member> | ||
2426 | <member name="P:HttpServer.Authentication.DigestAuthentication.Name"> | ||
2427 | <summary> | ||
2428 | name used in http request. | ||
2429 | </summary> | ||
2430 | </member> | ||
2431 | <member name="P:HttpServer.Authentication.DigestAuthentication.TokenIsHA1"> | ||
2432 | <summary> | ||
2433 | Gets or sets whether the token supplied in <see cref="T:HttpServer.Authentication.AuthenticationHandler"/> is a | ||
2434 | HA1 generated string. | ||
2435 | </summary> | ||
2436 | </member> | ||
2437 | <member name="T:HttpServer.HttpHelper"> | ||
2438 | <summary> | ||
2439 | Generic helper functions for HTTP | ||
2440 | </summary> | ||
2441 | </member> | ||
2442 | <member name="F:HttpServer.HttpHelper.HTTP10"> | ||
2443 | <summary> | ||
2444 | Version string for HTTP v1.0 | ||
2445 | </summary> | ||
2446 | </member> | ||
2447 | <member name="F:HttpServer.HttpHelper.HTTP11"> | ||
2448 | <summary> | ||
2449 | Version string for HTTP v1.1 | ||
2450 | </summary> | ||
2451 | </member> | ||
2452 | <member name="F:HttpServer.HttpHelper.EmptyUri"> | ||
2453 | <summary> | ||
2454 | An empty URI | ||
2455 | </summary> | ||
2456 | </member> | ||
2457 | <member name="M:HttpServer.HttpHelper.ParseQueryString(System.String)"> | ||
2458 | <summary> | ||
2459 | Parses a query string. | ||
2460 | </summary> | ||
2461 | <param name="queryString">Query string (URI encoded)</param> | ||
2462 | <returns>A <see cref="T:HttpServer.HttpInput"/> object if successful; otherwise <see cref="F:HttpServer.HttpInput.Empty"/></returns> | ||
2463 | <exception cref="T:System.ArgumentNullException"><c>queryString</c> is null.</exception> | ||
2464 | <exception cref="T:System.FormatException">If string cannot be parsed.</exception> | ||
2465 | </member> | ||
2466 | <member name="T:HttpServer.Authentication.AuthenticationHandler"> | ||
2467 | <summary> | ||
2468 | Delegate used to let authentication modules authenticate the user name and password. | ||
2469 | </summary> | ||
2470 | <param name="realm">Realm that the user want to authenticate in</param> | ||
2471 | <param name="userName">User name specified by client</param> | ||
2472 | <param name="token">Can either be user password or implementation specific token.</param> | ||
2473 | <param name="login">object that will be stored in a session variable called <see cref="F:HttpServer.Authentication.AuthenticationModule.AuthenticationTag"/> if authentication was successful.</param> | ||
2474 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">throw forbidden exception if too many attempts have been made.</exception> | ||
2475 | <remarks> | ||
2476 | <para> | ||
2477 | Use <see cref="P:HttpServer.Authentication.DigestAuthentication.TokenIsHA1"/> to specify that the token is a HA1 token. (MD5 generated | ||
2478 | string from realm, user name and password); Md5String(userName + ":" + realm + ":" + password); | ||
2479 | </para> | ||
2480 | </remarks> | ||
2481 | </member> | ||
2482 | <member name="T:HttpServer.Authentication.AuthenticationRequiredHandler"> | ||
2483 | <summary> | ||
2484 | Let's you decide on a system level if authentication is required. | ||
2485 | </summary> | ||
2486 | <param name="request">HTTP request from client</param> | ||
2487 | <returns>true if user should be authenticated.</returns> | ||
2488 | <remarks>throw <see cref="T:HttpServer.Exceptions.ForbiddenException"/> if no more attempts are allowed.</remarks> | ||
2489 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">If no more attempts are allowed</exception> | ||
3146 | </member> | 2490 | </member> |
3147 | <member name="T:HttpServer.Parser.BodyEventArgs"> | 2491 | <member name="T:HttpServer.Parser.BodyEventArgs"> |
3148 | <summary> | 2492 | <summary> |
@@ -3177,6 +2521,284 @@ | |||
3177 | Gets or sets offset in buffer where to start processing. | 2521 | Gets or sets offset in buffer where to start processing. |
3178 | </summary> | 2522 | </summary> |
3179 | </member> | 2523 | </member> |
2524 | <member name="T:HttpServer.Method"> | ||
2525 | <summary> | ||
2526 | Contains all HTTP Methods (according to the HTTP 1.1 specification) | ||
2527 | <para> | ||
2528 | See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html | ||
2529 | </para> | ||
2530 | </summary> | ||
2531 | </member> | ||
2532 | <member name="F:HttpServer.Method.Delete"> | ||
2533 | <summary> | ||
2534 | The DELETE method requests that the origin server delete the resource identified by the Request-URI. | ||
2535 | </summary> | ||
2536 | <remarks> | ||
2537 | <para> | ||
2538 | This method MAY be overridden by human intervention (or other means) on the origin server. | ||
2539 | The client cannot be guaranteed that the operation has been carried out, even if the status code | ||
2540 | returned from the origin server indicates that the action has been completed successfully. | ||
2541 | </para> | ||
2542 | <para> | ||
2543 | However, the server SHOULD NOT indicate success unless, at the time the response is given, | ||
2544 | it intends to delete the resource or move it to an inaccessible location. | ||
2545 | </para> | ||
2546 | <para> | ||
2547 | A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, | ||
2548 | 202 (Accepted) if the action has not yet been enacted, | ||
2549 | or 204 (No Content) if the action has been enacted but the response does not include an entity. | ||
2550 | </para> | ||
2551 | <para> | ||
2552 | If the request passes through a cache and the Request-URI identifies one or more currently cached entities, | ||
2553 | those entries SHOULD be treated as stale. Responses to this method are not cacheable. | ||
2554 | </para> | ||
2555 | </remarks> | ||
2556 | </member> | ||
2557 | <member name="F:HttpServer.Method.Get"> | ||
2558 | <summary> | ||
2559 | The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. | ||
2560 | </summary> | ||
2561 | <remarks> | ||
2562 | <para> | ||
2563 | If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the | ||
2564 | entity in the response and not the source text of the process, unless that text happens to be the output of the process. | ||
2565 | </para> | ||
2566 | <para> | ||
2567 | The semantics of the GET method change to a "conditional GET" if the request message includes an | ||
2568 | If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. | ||
2569 | A conditional GET method requests that the entity be transferred only under the circumstances described | ||
2570 | by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network | ||
2571 | usage by allowing cached entities to be refreshed without requiring multiple requests or transferring | ||
2572 | data already held by the client. | ||
2573 | </para> | ||
2574 | </remarks> | ||
2575 | </member> | ||
2576 | <member name="F:HttpServer.Method.Header"> | ||
2577 | <summary> | ||
2578 | The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. | ||
2579 | </summary> | ||
2580 | <remarks> | ||
2581 | The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the | ||
2582 | information sent in response to a GET request. This method can be used for obtaining meta information about | ||
2583 | the entity implied by the request without transferring the entity-body itself. | ||
2584 | |||
2585 | This method is often used for testing hypertext links for validity, accessibility, and recent modification. | ||
2586 | </remarks> | ||
2587 | </member> | ||
2588 | <member name="F:HttpServer.Method.Options"> | ||
2589 | <summary> | ||
2590 | <para>The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.</para> | ||
2591 | </summary> | ||
2592 | <remarks> | ||
2593 | <para>This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.</para> | ||
2594 | </remarks> | ||
2595 | </member> | ||
2596 | <member name="F:HttpServer.Method.Post"> | ||
2597 | <summary> | ||
2598 | The POST method is used to request that the origin server accept the entity enclosed | ||
2599 | in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. | ||
2600 | </summary> | ||
2601 | <remarks> | ||
2602 | POST is designed to allow a uniform method to cover the following functions: | ||
2603 | <list type="bullet"> | ||
2604 | <item> | ||
2605 | Annotation of existing resources; | ||
2606 | </item><item> | ||
2607 | Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; | ||
2608 | </item><item> | ||
2609 | Providing a block of data, such as the result of submitting a form, to a data-handling process; | ||
2610 | </item><item> | ||
2611 | Extending a database through an append operation. | ||
2612 | </item> | ||
2613 | </list> | ||
2614 | <para> | ||
2615 | If a resource has been created on the origin server, the response SHOULD be 201 (Created) and | ||
2616 | contain an entity which describes the status of the request and refers to the new resource, and a | ||
2617 | Location header (see section 14.30). | ||
2618 | </para> | ||
2619 | <para> | ||
2620 | The action performed by the POST method might not result in a resource that can be identified by a URI. | ||
2621 | In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on | ||
2622 | whether or not the response includes an entity that describes the result. | ||
2623 | </para><para> | ||
2624 | Responses to this method are not cacheable, unless the response includes appropriate Cache-Control | ||
2625 | or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent | ||
2626 | to retrieve a cacheable resource. | ||
2627 | </para> | ||
2628 | </remarks> | ||
2629 | </member> | ||
2630 | <member name="F:HttpServer.Method.Put"> | ||
2631 | <summary> | ||
2632 | The PUT method requests that the enclosed entity be stored under the supplied Request-URI. | ||
2633 | </summary> | ||
2634 | <remarks> | ||
2635 | <list type="bullet"> | ||
2636 | <item> | ||
2637 | If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a | ||
2638 | modified version of the one residing on the origin server. | ||
2639 | </item><item> | ||
2640 | If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new | ||
2641 | resource by the requesting user agent, the origin server can create the resource with that URI. | ||
2642 | </item><item> | ||
2643 | If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. | ||
2644 | </item><item> | ||
2645 | If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to | ||
2646 | indicate successful completion of the request. | ||
2647 | </item><item> | ||
2648 | If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be | ||
2649 | given that reflects the nature of the problem. | ||
2650 | </item> | ||
2651 | </list> | ||
2652 | <para> | ||
2653 | The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not | ||
2654 | understand or implement and MUST return a 501 (Not Implemented) response in such cases. | ||
2655 | </para> | ||
2656 | </remarks> | ||
2657 | </member> | ||
2658 | <member name="F:HttpServer.Method.Trace"> | ||
2659 | <summary> | ||
2660 | The TRACE method is used to invoke a remote, application-layer loop- back of the request message. | ||
2661 | </summary> | ||
2662 | </member> | ||
2663 | <member name="T:HttpServer.Methods"> | ||
2664 | <summary> | ||
2665 | Contains all HTTP Methods (according to the HTTP 1.1 specification) | ||
2666 | <para> | ||
2667 | See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html | ||
2668 | </para> | ||
2669 | </summary> | ||
2670 | </member> | ||
2671 | <member name="F:HttpServer.Methods.Delete"> | ||
2672 | <summary> | ||
2673 | The DELETE method requests that the origin server delete the resource identified by the Request-URI. | ||
2674 | </summary> | ||
2675 | <remarks> | ||
2676 | <para> | ||
2677 | This method MAY be overridden by human intervention (or other means) on the origin server. | ||
2678 | The client cannot be guaranteed that the operation has been carried out, even if the status code | ||
2679 | returned from the origin server indicates that the action has been completed successfully. | ||
2680 | </para> | ||
2681 | <para> | ||
2682 | However, the server SHOULD NOT indicate success unless, at the time the response is given, | ||
2683 | it intends to delete the resource or move it to an inaccessible location. | ||
2684 | </para> | ||
2685 | <para> | ||
2686 | A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, | ||
2687 | 202 (Accepted) if the action has not yet been enacted, | ||
2688 | or 204 (No Content) if the action has been enacted but the response does not include an entity. | ||
2689 | </para> | ||
2690 | <para> | ||
2691 | If the request passes through a cache and the Request-URI identifies one or more currently cached entities, | ||
2692 | those entries SHOULD be treated as stale. Responses to this method are not cacheable. | ||
2693 | </para> | ||
2694 | </remarks> | ||
2695 | </member> | ||
2696 | <member name="F:HttpServer.Methods.Get"> | ||
2697 | <summary> | ||
2698 | The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. | ||
2699 | </summary> | ||
2700 | <remarks> | ||
2701 | <para> | ||
2702 | If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the | ||
2703 | entity in the response and not the source text of the process, unless that text happens to be the output of the process. | ||
2704 | </para> | ||
2705 | <para> | ||
2706 | The semantics of the GET method change to a "conditional GET" if the request message includes an | ||
2707 | If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. | ||
2708 | A conditional GET method requests that the entity be transferred only under the circumstances described | ||
2709 | by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network | ||
2710 | usage by allowing cached entities to be refreshed without requiring multiple requests or transferring | ||
2711 | data already held by the client. | ||
2712 | </para> | ||
2713 | </remarks> | ||
2714 | </member> | ||
2715 | <member name="F:HttpServer.Methods.Header"> | ||
2716 | <summary> | ||
2717 | The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. | ||
2718 | </summary> | ||
2719 | <remarks> | ||
2720 | The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the | ||
2721 | information sent in response to a GET request. This method can be used for obtaining meta information about | ||
2722 | the entity implied by the request without transferring the entity-body itself. | ||
2723 | |||
2724 | This method is often used for testing hypertext links for validity, accessibility, and recent modification. | ||
2725 | </remarks> | ||
2726 | </member> | ||
2727 | <member name="F:HttpServer.Methods.Options"> | ||
2728 | <summary> | ||
2729 | <para>The OPTIONS method represents a request for information about the communication options available on the request/response chain identified by the Request-URI.</para> | ||
2730 | </summary> | ||
2731 | <remarks> | ||
2732 | <para>This method allows the client to determine the options and/or requirements associated with a resource, or the capabilities of a server, without implying a resource action or initiating a resource retrieval.</para> | ||
2733 | </remarks> | ||
2734 | </member> | ||
2735 | <member name="F:HttpServer.Methods.Post"> | ||
2736 | <summary> | ||
2737 | The POST method is used to request that the origin server accept the entity enclosed | ||
2738 | in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. | ||
2739 | </summary> | ||
2740 | <remarks> | ||
2741 | POST is designed to allow a uniform method to cover the following functions: | ||
2742 | <list type="bullet"> | ||
2743 | <item> | ||
2744 | Annotation of existing resources; | ||
2745 | </item><item> | ||
2746 | Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; | ||
2747 | </item><item> | ||
2748 | Providing a block of data, such as the result of submitting a form, to a data-handling process; | ||
2749 | </item><item> | ||
2750 | Extending a database through an append operation. | ||
2751 | </item> | ||
2752 | </list> | ||
2753 | <para> | ||
2754 | If a resource has been created on the origin server, the response SHOULD be 201 (Created) and | ||
2755 | contain an entity which describes the status of the request and refers to the new resource, and a | ||
2756 | Location header (see section 14.30). | ||
2757 | </para> | ||
2758 | <para> | ||
2759 | The action performed by the POST method might not result in a resource that can be identified by a URI. | ||
2760 | In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on | ||
2761 | whether or not the response includes an entity that describes the result. | ||
2762 | </para><para> | ||
2763 | Responses to this method are not cacheable, unless the response includes appropriate Cache-Control | ||
2764 | or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent | ||
2765 | to retrieve a cacheable resource. | ||
2766 | </para> | ||
2767 | </remarks> | ||
2768 | </member> | ||
2769 | <member name="F:HttpServer.Methods.Put"> | ||
2770 | <summary> | ||
2771 | The PUT method requests that the enclosed entity be stored under the supplied Request-URI. | ||
2772 | </summary> | ||
2773 | <remarks> | ||
2774 | <list type="bullet"> | ||
2775 | <item> | ||
2776 | If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a | ||
2777 | modified version of the one residing on the origin server. | ||
2778 | </item><item> | ||
2779 | If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new | ||
2780 | resource by the requesting user agent, the origin server can create the resource with that URI. | ||
2781 | </item><item> | ||
2782 | If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. | ||
2783 | </item><item> | ||
2784 | If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to | ||
2785 | indicate successful completion of the request. | ||
2786 | </item><item> | ||
2787 | If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be | ||
2788 | given that reflects the nature of the problem. | ||
2789 | </item> | ||
2790 | </list> | ||
2791 | <para> | ||
2792 | The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not | ||
2793 | understand or implement and MUST return a 501 (Not Implemented) response in such cases. | ||
2794 | </para> | ||
2795 | </remarks> | ||
2796 | </member> | ||
2797 | <member name="F:HttpServer.Methods.Trace"> | ||
2798 | <summary> | ||
2799 | The TRACE method is used to invoke a remote, application-layer loop- back of the request message. | ||
2800 | </summary> | ||
2801 | </member> | ||
3180 | <member name="T:HttpServer.HttpContextFactory"> | 2802 | <member name="T:HttpServer.HttpContextFactory"> |
3181 | <summary> | 2803 | <summary> |
3182 | Used to create and reuse contexts. | 2804 | Used to create and reuse contexts. |
@@ -3364,178 +2986,247 @@ | |||
3364 | </summary> | 2986 | </summary> |
3365 | <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> | 2987 | <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> |
3366 | </member> | 2988 | </member> |
3367 | <member name="T:HttpServer.HttpModules.ResourceFileModule"> | 2989 | <member name="T:HttpServer.ClientAcceptedEventArgs"> |
3368 | <summary> | 2990 | <summary> |
3369 | Serves files that are stored in embedded resources. | 2991 | Invoked when a client have been accepted by the <see cref="T:HttpServer.HttpListener"/> |
3370 | </summary> | 2992 | </summary> |
2993 | <remarks> | ||
2994 | Can be used to revoke incoming connections | ||
2995 | </remarks> | ||
3371 | </member> | 2996 | </member> |
3372 | <member name="T:HttpServer.HttpModules.HttpModule"> | 2997 | <member name="M:HttpServer.ClientAcceptedEventArgs.#ctor(System.Net.Sockets.Socket)"> |
3373 | <summary> | 2998 | <summary> |
3374 | A HttpModule can be used to serve Uri's. The module itself | 2999 | Initializes a new instance of the <see cref="T:HttpServer.ClientAcceptedEventArgs"/> class. |
3375 | decides if it should serve a Uri or not. In this way, you can | ||
3376 | get a very flexible http application since you can let multiple modules | ||
3377 | serve almost similar urls. | ||
3378 | </summary> | 3000 | </summary> |
3379 | <remarks> | 3001 | <param name="socket">The socket.</param> |
3380 | Throw <see cref="T:HttpServer.Exceptions.UnauthorizedException"/> if you are using a <see cref="T:HttpServer.Authentication.AuthenticationModule"/> and want to prompt for user name/password. | ||
3381 | </remarks> | ||
3382 | </member> | 3002 | </member> |
3383 | <member name="M:HttpServer.HttpModules.HttpModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 3003 | <member name="M:HttpServer.ClientAcceptedEventArgs.Revoke"> |
3384 | <summary> | 3004 | <summary> |
3385 | Method that process the url | 3005 | Client may not be handled. |
3386 | </summary> | 3006 | </summary> |
3387 | <param name="request">Information sent by the browser about the request</param> | ||
3388 | <param name="response">Information that is being sent back to the client.</param> | ||
3389 | <param name="session">Session used to </param> | ||
3390 | <returns>true if this module handled the request.</returns> | ||
3391 | </member> | 3007 | </member> |
3392 | <member name="M:HttpServer.HttpModules.HttpModule.SetLogWriter(HttpServer.ILogWriter)"> | 3008 | <member name="P:HttpServer.ClientAcceptedEventArgs.Socket"> |
3393 | <summary> | 3009 | <summary> |
3394 | Set the log writer to use. | 3010 | Accepted socket. |
3395 | </summary> | 3011 | </summary> |
3396 | <param name="writer">logwriter to use.</param> | ||
3397 | </member> | 3012 | </member> |
3398 | <member name="M:HttpServer.HttpModules.HttpModule.Write(HttpServer.LogPrio,System.String)"> | 3013 | <member name="P:HttpServer.ClientAcceptedEventArgs.Revoked"> |
3399 | <summary> | 3014 | <summary> |
3400 | Log something. | 3015 | Client should be revoked. |
3401 | </summary> | 3016 | </summary> |
3402 | <param name="prio">importance of log message</param> | ||
3403 | <param name="message">message</param> | ||
3404 | </member> | 3017 | </member> |
3405 | <member name="P:HttpServer.HttpModules.HttpModule.AllowSecondaryProcessing"> | 3018 | <member name="T:HttpServer.Sessions.MemorySession"> |
3406 | <summary> | 3019 | <summary> |
3407 | If true specifies that the module doesn't consume the processing of a request so that subsequent modules | 3020 | A session stored in memory. |
3408 | can continue processing afterwards. Default is false. | ||
3409 | </summary> | 3021 | </summary> |
3410 | </member> | 3022 | </member> |
3411 | <member name="M:HttpServer.HttpModules.ResourceFileModule.#ctor"> | 3023 | <member name="T:HttpServer.Sessions.IHttpSession"> |
3412 | <summary> | 3024 | <summary> |
3413 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.ResourceFileModule"/> class. | 3025 | Interface for sessions |
3414 | Runs <see cref="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"/> to make sure the basic mime types are available, they can be cleared later | ||
3415 | through the use of <see cref="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"/> if desired. | ||
3416 | </summary> | 3026 | </summary> |
3417 | </member> | 3027 | </member> |
3418 | <member name="M:HttpServer.HttpModules.ResourceFileModule.#ctor(HttpServer.ILogWriter)"> | 3028 | <member name="M:HttpServer.Sessions.IHttpSession.Clear"> |
3419 | <summary> | 3029 | <summary> |
3420 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.ResourceFileModule"/> class. | 3030 | Remove everything from the session |
3421 | Runs <see cref="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"/> to make sure the basic mime types are available, they can be cleared later | ||
3422 | through the use of <see cref="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"/> if desired. | ||
3423 | </summary> | 3031 | </summary> |
3424 | <param name="logWriter">The log writer to use when logging events</param> | ||
3425 | </member> | 3032 | </member> |
3426 | <member name="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"> | 3033 | <member name="M:HttpServer.Sessions.IHttpSession.Clear(System.Boolean)"> |
3427 | <summary> | 3034 | <summary> |
3428 | Mimtypes that this class can handle per default | 3035 | Remove everything from the session |
3429 | </summary> | 3036 | </summary> |
3037 | <param name="expires">True if the session is cleared due to expiration</param> | ||
3430 | </member> | 3038 | </member> |
3431 | <member name="M:HttpServer.HttpModules.ResourceFileModule.AddResources(System.String,System.Reflection.Assembly,System.String)"> | 3039 | <member name="P:HttpServer.Sessions.IHttpSession.Id"> |
3432 | <summary> | 3040 | <summary> |
3433 | Loads resources from a namespace in the given assembly to an uri | 3041 | Session id |
3434 | </summary> | 3042 | </summary> |
3435 | <param name="toUri">The uri to map the resources to</param> | 3043 | </member> |
3436 | <param name="fromAssembly">The assembly in which the resources reside</param> | 3044 | <member name="P:HttpServer.Sessions.IHttpSession.Item(System.String)"> |
3437 | <param name="fromNamespace">The namespace from which to load the resources</param> | 3045 | <summary> |
3438 | <usage> | 3046 | Should |
3439 | resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views"); | 3047 | </summary> |
3048 | <param name="name">Name of the session variable</param> | ||
3049 | <returns>null if it's not set</returns> | ||
3050 | <exception cref="T:System.Runtime.Serialization.SerializationException">If the object cant be serialized.</exception> | ||
3051 | </member> | ||
3052 | <member name="P:HttpServer.Sessions.IHttpSession.Accessed"> | ||
3053 | <summary> | ||
3054 | When the session was last accessed. | ||
3055 | This property is touched by the http server each time the | ||
3056 | session is requested. | ||
3057 | </summary> | ||
3058 | </member> | ||
3059 | <member name="P:HttpServer.Sessions.IHttpSession.Count"> | ||
3060 | <summary> | ||
3061 | Number of session variables. | ||
3062 | </summary> | ||
3063 | </member> | ||
3064 | <member name="E:HttpServer.Sessions.IHttpSession.BeforeClear"> | ||
3065 | <summary> | ||
3066 | Event triggered upon clearing the session | ||
3067 | </summary> | ||
3068 | </member> | ||
3069 | <member name="M:HttpServer.Sessions.MemorySession.#ctor(System.String)"> | ||
3070 | <summary> | ||
3440 | 3071 | ||
3441 | will make ie the resource MyLib.Models.User.Views.stylesheet.css accessible via /user/stylesheet.css | 3072 | </summary> |
3442 | </usage> | 3073 | <param name="id">A unique id used by the sessions store to identify the session</param> |
3443 | <returns>The amount of loaded files, giving you the possibility of making sure the resources needed gets loaded</returns> | ||
3444 | </member> | 3074 | </member> |
3445 | <member name="M:HttpServer.HttpModules.ResourceFileModule.CanHandle(HttpServer.IHttpRequest)"> | 3075 | <member name="M:HttpServer.Sessions.MemorySession.SetId(System.String)"> |
3446 | <summary> | 3076 | <summary> |
3447 | Returns true if the module can handle the request | 3077 | Id |
3448 | </summary> | 3078 | </summary> |
3079 | <param name="id"></param> | ||
3449 | </member> | 3080 | </member> |
3450 | <member name="M:HttpServer.HttpModules.ResourceFileModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 3081 | <member name="M:HttpServer.Sessions.MemorySession.Clear"> |
3451 | <summary> | 3082 | <summary> |
3452 | Method that process the url | 3083 | Remove everything from the session |
3453 | </summary> | 3084 | </summary> |
3454 | <param name="request">Information sent by the browser about the request</param> | ||
3455 | <param name="response">Information that is being sent back to the client.</param> | ||
3456 | <param name="session">Session used to </param> | ||
3457 | <returns>true if this module handled the request.</returns> | ||
3458 | </member> | 3085 | </member> |
3459 | <member name="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"> | 3086 | <member name="M:HttpServer.Sessions.MemorySession.Clear(System.Boolean)"> |
3460 | <summary> | 3087 | <summary> |
3461 | List with all mime-type that are allowed. | 3088 | Clears the specified expire. |
3462 | </summary> | 3089 | </summary> |
3463 | <remarks>All other mime types will result in a Forbidden http status code.</remarks> | 3090 | <param name="expires">True if the session is cleared due to expiration</param> |
3464 | </member> | 3091 | </member> |
3465 | <member name="T:HttpServer.HttpModules.FileModule"> | 3092 | <member name="M:HttpServer.Sessions.MemorySession.Dispose"> |
3466 | <summary> | 3093 | <summary> |
3467 | The purpose of this module is to serve files. | 3094 | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
3468 | </summary> | 3095 | </summary> |
3096 | <filterpriority>2</filterpriority> | ||
3469 | </member> | 3097 | </member> |
3470 | <member name="M:HttpServer.HttpModules.FileModule.#ctor(System.String,System.String,System.Boolean)"> | 3098 | <member name="P:HttpServer.Sessions.MemorySession.Id"> |
3471 | <summary> | 3099 | <summary> |
3472 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.FileModule"/> class. | 3100 | Session id |
3473 | </summary> | 3101 | </summary> |
3474 | <param name="baseUri">Uri to serve, for instance "/files/"</param> | ||
3475 | <param name="basePath">Path on hard drive where we should start looking for files</param> | ||
3476 | <param name="useLastModifiedHeader">If true a Last-Modifed header will be sent upon requests urging web browser to cache files</param> | ||
3477 | </member> | 3102 | </member> |
3478 | <member name="M:HttpServer.HttpModules.FileModule.#ctor(System.String,System.String)"> | 3103 | <member name="P:HttpServer.Sessions.MemorySession.Item(System.String)"> |
3479 | <summary> | 3104 | <summary> |
3480 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.FileModule"/> class. | 3105 | Should |
3481 | </summary> | 3106 | </summary> |
3482 | <param name="baseUri">Uri to serve, for instance "/files/"</param> | 3107 | <param name="name">Name of the session variable</param> |
3483 | <param name="basePath">Path on hard drive where we should start looking for files</param> | 3108 | <returns>null if it's not set</returns> |
3484 | </member> | 3109 | </member> |
3485 | <member name="M:HttpServer.HttpModules.FileModule.AddDefaultMimeTypes"> | 3110 | <member name="P:HttpServer.Sessions.MemorySession.Accessed"> |
3486 | <summary> | 3111 | <summary> |
3487 | Mimtypes that this class can handle per default | 3112 | when the session was last accessed. |
3488 | </summary> | 3113 | </summary> |
3114 | <remarks> | ||
3115 | Used to determine when the session should be removed. | ||
3116 | </remarks> | ||
3489 | </member> | 3117 | </member> |
3490 | <member name="M:HttpServer.HttpModules.FileModule.CanHandle(System.Uri)"> | 3118 | <member name="P:HttpServer.Sessions.MemorySession.Count"> |
3491 | <summary> | 3119 | <summary> |
3492 | Determines if the request should be handled by this module. | 3120 | Number of values in the session |
3493 | Invoked by the <see cref="T:HttpServer.HttpServer"/> | ||
3494 | </summary> | 3121 | </summary> |
3495 | <param name="uri"></param> | ||
3496 | <returns>true if this module should handle it.</returns> | ||
3497 | </member> | 3122 | </member> |
3498 | <member name="M:HttpServer.HttpModules.FileModule.GetPath(System.Uri)"> | 3123 | <member name="P:HttpServer.Sessions.MemorySession.Changed"> |
3499 | <exception cref="T:HttpServer.Exceptions.BadRequestException">Illegal path</exception> | 3124 | <summary> |
3125 | Flag to indicate that the session have been changed | ||
3126 | and should be saved into the session store. | ||
3127 | </summary> | ||
3500 | </member> | 3128 | </member> |
3501 | <member name="M:HttpServer.HttpModules.FileModule.Contains(System.String,System.Collections.Generic.IEnumerable{System.String})"> | 3129 | <member name="E:HttpServer.Sessions.MemorySession.BeforeClear"> |
3502 | <summary> | 3130 | <summary> |
3503 | check if source contains any of the chars. | 3131 | Event triggered upon clearing the session |
3504 | </summary> | 3132 | </summary> |
3505 | <param name="source"></param> | ||
3506 | <param name="chars"></param> | ||
3507 | <returns></returns> | ||
3508 | </member> | 3133 | </member> |
3509 | <member name="M:HttpServer.HttpModules.FileModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 3134 | <member name="T:HttpServer.HttpModules.ReverseProxyModule"> |
3510 | <summary> | 3135 | <summary> |
3511 | Method that process the Uri. | 3136 | A reverse proxy are used to act as a bridge between local (protected/hidden) websites |
3137 | and public clients. | ||
3138 | |||
3139 | A typical usage is to allow web servers on non standard ports to still be available | ||
3140 | to the public clients, or allow web servers on private ips to be available. | ||
3141 | </summary> | ||
3142 | </member> | ||
3143 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.#ctor(System.String,System.String)"> | ||
3144 | <summary> | ||
3145 | |||
3146 | </summary> | ||
3147 | <param name="source">Base url requested from browser</param> | ||
3148 | <param name="destination">Base url on private web server</param> | ||
3149 | <example> | ||
3150 | // this will return contents from http://192.168.1.128/view/jonas when client requests http://www.gauffin.com/user/view/jonas | ||
3151 | _server.Add(new ReverseProxyModule("http://www.gauffin.com/user/", "http://192.168.1.128/"); | ||
3152 | </example> | ||
3153 | </member> | ||
3154 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.CanHandle(System.Uri)"> | ||
3155 | <summary> | ||
3156 | Method that determines if an url should be handled or not by the module | ||
3157 | </summary> | ||
3158 | <param name="uri">Url requested by the client.</param> | ||
3159 | <returns>true if module should handle the url.</returns> | ||
3160 | </member> | ||
3161 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | ||
3162 | <summary> | ||
3163 | Method that process the url | ||
3512 | </summary> | 3164 | </summary> |
3513 | <param name="request">Information sent by the browser about the request</param> | 3165 | <param name="request">Information sent by the browser about the request</param> |
3514 | <param name="response">Information that is being sent back to the client.</param> | 3166 | <param name="response">Information that is being sent back to the client.</param> |
3515 | <param name="session">Session used to </param> | 3167 | <param name="session">Session used to </param> |
3516 | <exception cref="T:HttpServer.Exceptions.InternalServerException">Failed to find file extension</exception> | ||
3517 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">File type is forbidden.</exception> | ||
3518 | </member> | 3168 | </member> |
3519 | <member name="M:HttpServer.HttpModules.FileModule.GetFileExtension(System.String)"> | 3169 | <member name="T:HttpServer.FormDecoders.UrlDecoder"> |
3520 | <summary> | 3170 | <summary> |
3521 | return a file extension from an absolute Uri path (or plain filename) | 3171 | Can handle application/x-www-form-urlencoded |
3522 | </summary> | 3172 | </summary> |
3523 | <param name="uri"></param> | ||
3524 | <returns></returns> | ||
3525 | </member> | 3173 | </member> |
3526 | <member name="P:HttpServer.HttpModules.FileModule.MimeTypes"> | 3174 | <member name="M:HttpServer.FormDecoders.UrlDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> |
3527 | <summary> | 3175 | <summary> |
3528 | List with all mime-type that are allowed. | ||
3529 | </summary> | 3176 | </summary> |
3530 | <remarks>All other mime types will result in a Forbidden http status code.</remarks> | 3177 | <param name="stream">Stream containing the content</param> |
3178 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
3179 | <param name="encoding">Stream encoding</param> | ||
3180 | <returns> | ||
3181 | A HTTP form, or null if content could not be parsed. | ||
3182 | </returns> | ||
3183 | <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception> | ||
3531 | </member> | 3184 | </member> |
3532 | <member name="P:HttpServer.HttpModules.FileModule.ForbiddenChars"> | 3185 | <member name="M:HttpServer.FormDecoders.UrlDecoder.CanParse(System.String)"> |
3533 | <summary> | 3186 | <summary> |
3534 | characters that may not exist in a path. | 3187 | Checks if the decoder can handle the mime type |
3188 | </summary> | ||
3189 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
3190 | <returns>True if the decoder can parse the specified content type</returns> | ||
3191 | </member> | ||
3192 | <member name="T:HttpServer.FormDecoders.FormDecoderProvider"> | ||
3193 | <summary> | ||
3194 | This provider is used to let us implement any type of form decoding we want without | ||
3195 | having to rewrite anything else in the server. | ||
3196 | </summary> | ||
3197 | </member> | ||
3198 | <member name="M:HttpServer.FormDecoders.FormDecoderProvider.Decode(System.String,System.IO.Stream,System.Text.Encoding)"> | ||
3199 | <summary> | ||
3200 | |||
3201 | </summary> | ||
3202 | <param name="contentType">Should contain boundary and type, as in: multipart/form-data; boundary=---------------------------230051238959</param> | ||
3203 | <param name="stream">Stream containing form data.</param> | ||
3204 | <param name="encoding">Encoding used when decoding the stream</param> | ||
3205 | <returns><see cref="F:HttpServer.HttpInput.Empty"/> if no parser was found.</returns> | ||
3206 | <exception cref="T:System.ArgumentException">If stream is null or not readable.</exception> | ||
3207 | <exception cref="T:System.IO.InvalidDataException">If stream contents cannot be decoded properly.</exception> | ||
3208 | </member> | ||
3209 | <member name="M:HttpServer.FormDecoders.FormDecoderProvider.Add(HttpServer.FormDecoders.IFormDecoder)"> | ||
3210 | <summary> | ||
3211 | Add a decoder. | ||
3212 | </summary> | ||
3213 | <param name="decoder"></param> | ||
3214 | <exception cref="T:System.ArgumentNullException"></exception> | ||
3215 | </member> | ||
3216 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.Count"> | ||
3217 | <summary> | ||
3218 | Number of added decoders. | ||
3219 | </summary> | ||
3220 | </member> | ||
3221 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.Decoders"> | ||
3222 | <summary> | ||
3223 | Use with care. | ||
3224 | </summary> | ||
3225 | </member> | ||
3226 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.DefaultDecoder"> | ||
3227 | <summary> | ||
3228 | Decoder used for unknown content types. | ||
3535 | </summary> | 3229 | </summary> |
3536 | <example> | ||
3537 | fileMod.ForbiddenChars = new string[]{ "\\", "..", ":" }; | ||
3538 | </example> | ||
3539 | </member> | 3230 | </member> |
3540 | <member name="T:HttpServer.Exceptions.InternalServerException"> | 3231 | <member name="T:HttpServer.Exceptions.InternalServerException"> |
3541 | <summary> | 3232 | <summary> |
@@ -3560,73 +3251,425 @@ | |||
3560 | <param name="message">error message.</param> | 3251 | <param name="message">error message.</param> |
3561 | <param name="inner">inner exception.</param> | 3252 | <param name="inner">inner exception.</param> |
3562 | </member> | 3253 | </member> |
3563 | <member name="T:HttpServer.Rules.RegexRedirectRule"> | 3254 | <member name="T:HttpServer.IHttpResponse"> |
3564 | <summary> | 3255 | <summary> |
3565 | Class to make dynamic binding of redirects. Instead of having to specify a number of similar redirect rules | 3256 | Response that is sent back to the web browser / client. |
3566 | a regular expression can be used to identify redirect URLs and their targets. | 3257 | |
3258 | A response can be sent if different ways. The easiest one is | ||
3259 | to just fill the Body stream with content, everything else | ||
3260 | will then be taken care of by the framework. The default content-type | ||
3261 | is text/html, you should change it if you send anything else. | ||
3262 | |||
3263 | The second and slighty more complex way is to send the response | ||
3264 | as parts. Start with sending the header using the SendHeaders method and | ||
3265 | then you can send the body using SendBody method, but do not forget | ||
3266 | to set ContentType and ContentLength before doing so. | ||
3567 | </summary> | 3267 | </summary> |
3568 | <example> | 3268 | <example> |
3569 | <![CDATA[ | 3269 | public void MyHandler(IHttpRequest request, IHttpResponse response) |
3570 | new RegexRedirectRule("/(?<target>[a-z0-9]+)", "/users/${target}?find=true", RegexOptions.IgnoreCase) | 3270 | { |
3571 | ]]> | 3271 | |
3272 | } | ||
3572 | </example> | 3273 | </example> |
3573 | </member> | 3274 | </member> |
3574 | <member name="M:HttpServer.Rules.RegexRedirectRule.#ctor(System.String,System.String)"> | 3275 | <member name="M:HttpServer.IHttpResponse.AddHeader(System.String,System.String)"> |
3575 | <summary> | 3276 | <summary> |
3576 | Initializes a new instance of the <see cref="T:HttpServer.Rules.RegexRedirectRule"/> class. | 3277 | Add another header to the document. |
3577 | </summary> | 3278 | </summary> |
3578 | <param name="fromUrlExpression">Expression to match URL</param> | 3279 | <param name="name">Name of the header, case sensitive, use lower cases.</param> |
3579 | <param name="toUrlExpression">Expression to generate URL</param> | 3280 | <param name="value">Header values can span over multiple lines as long as each line starts with a white space. New line chars should be \r\n</param> |
3580 | <example> | 3281 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> |
3581 | <![CDATA[ | 3282 | <exception cref="T:System.ArgumentException">If value conditions have not been met.</exception> |
3582 | server.Add(new RegexRedirectRule("/(?<first>[a-zA-Z0-9]+)", "/user/${first}")); | 3283 | <remarks>Adding any header will override the default ones and those specified by properties.</remarks> |
3583 | Result of ie. /employee1 will then be /user/employee1 | ||
3584 | ]]> | ||
3585 | </example> | ||
3586 | </member> | 3284 | </member> |
3587 | <member name="M:HttpServer.Rules.RegexRedirectRule.#ctor(System.String,System.String,System.Text.RegularExpressions.RegexOptions)"> | 3285 | <member name="M:HttpServer.IHttpResponse.Send"> |
3588 | <summary> | 3286 | <summary> |
3589 | Initializes a new instance of the <see cref="T:HttpServer.Rules.RegexRedirectRule"/> class. | 3287 | Send headers and body to the browser. |
3590 | </summary> | 3288 | </summary> |
3591 | <param name="fromUrlExpression">Expression to match URL</param> | 3289 | <exception cref="T:System.InvalidOperationException">If content have already been sent.</exception> |
3592 | <param name="toUrlExpression">Expression to generate URL</param> | ||
3593 | <param name="options">Regular expression options to use, can be null</param> | ||
3594 | <example> | ||
3595 | <![CDATA[ | ||
3596 | server.Add(new RegexRedirectRule("/(?<first>[a-zA-Z0-9]+)", "/user/{first}", RegexOptions.IgnoreCase)); | ||
3597 | Result of ie. /employee1 will then be /user/employee1 | ||
3598 | ]]> | ||
3599 | </example> | ||
3600 | </member> | 3290 | </member> |
3601 | <member name="M:HttpServer.Rules.RegexRedirectRule.#ctor(System.String,System.String,System.Text.RegularExpressions.RegexOptions,System.Boolean)"> | 3291 | <member name="M:HttpServer.IHttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)"> |
3602 | <summary> | 3292 | <summary> |
3603 | Initializes a new instance of the <see cref="T:HttpServer.Rules.RegexRedirectRule"/> class. | 3293 | Make sure that you have specified ContentLength and sent the headers first. |
3294 | </summary> | ||
3295 | <param name="buffer"></param> | ||
3296 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | ||
3297 | <see cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
3298 | <param name="offset">offest of first byte to send</param> | ||
3299 | <param name="count">number of bytes to send.</param> | ||
3300 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | ||
3301 | <seealso cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
3302 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
3303 | is recommended for larger files to keep the memory usage low.</remarks> | ||
3304 | </member> | ||
3305 | <member name="M:HttpServer.IHttpResponse.SendBody(System.Byte[])"> | ||
3306 | <summary> | ||
3307 | Make sure that you have specified ContentLength and sent the headers first. | ||
3308 | </summary> | ||
3309 | <param name="buffer"></param> | ||
3310 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | ||
3311 | <see cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
3312 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | ||
3313 | <seealso cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
3314 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
3315 | is recommended for larger files to keep the memory usage low.</remarks> | ||
3316 | </member> | ||
3317 | <member name="M:HttpServer.IHttpResponse.SendHeaders"> | ||
3318 | <summary> | ||
3319 | Send headers to the client. | ||
3320 | </summary> | ||
3321 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
3322 | <seealso cref="M:HttpServer.IHttpResponse.AddHeader(System.String,System.String)"/> | ||
3323 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | ||
3324 | <seealso cref="M:HttpServer.IHttpResponse.SendBody(System.Byte[])"/> | ||
3325 | </member> | ||
3326 | <member name="M:HttpServer.IHttpResponse.Redirect(System.Uri)"> | ||
3327 | <summary> | ||
3328 | Redirect client to somewhere else using the 302 status code. | ||
3329 | </summary> | ||
3330 | <param name="uri">Destination of the redirect</param> | ||
3331 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
3332 | <remarks>You can not do anything more with the request when a redirect have been done. This should be your last | ||
3333 | action.</remarks> | ||
3334 | </member> | ||
3335 | <member name="M:HttpServer.IHttpResponse.Redirect(System.String)"> | ||
3336 | <summary> | ||
3337 | redirect to somewhere | ||
3338 | </summary> | ||
3339 | <param name="url">where the redirect should go</param> | ||
3340 | <remarks> | ||
3341 | No body are allowed when doing redirects. | ||
3342 | </remarks> | ||
3343 | </member> | ||
3344 | <member name="P:HttpServer.IHttpResponse.Body"> | ||
3345 | <summary> | ||
3346 | The body stream is used to cache the body contents | ||
3347 | before sending everything to the client. It's the simplest | ||
3348 | way to serve documents. | ||
3349 | </summary> | ||
3350 | </member> | ||
3351 | <member name="P:HttpServer.IHttpResponse.ProtocolVersion"> | ||
3352 | <summary> | ||
3353 | Defines the version of the HTTP Response for applications where it's required | ||
3354 | for this to be forced. | ||
3355 | </summary> | ||
3356 | </member> | ||
3357 | <member name="P:HttpServer.IHttpResponse.Chunked"> | ||
3358 | <summary> | ||
3359 | The chunked encoding modifies the body of a message in order to | ||
3360 | transfer it as a series of chunks, each with its own size indicator, | ||
3361 | followed by an OPTIONAL trailer containing entity-header fields. This | ||
3362 | allows dynamically produced content to be transferred along with the | ||
3363 | information necessary for the recipient to verify that it has | ||
3364 | received the full message. | ||
3365 | </summary> | ||
3366 | </member> | ||
3367 | <member name="P:HttpServer.IHttpResponse.Connection"> | ||
3368 | <summary> | ||
3369 | Kind of connection | ||
3370 | </summary> | ||
3371 | </member> | ||
3372 | <member name="P:HttpServer.IHttpResponse.Encoding"> | ||
3373 | <summary> | ||
3374 | Encoding to use when sending stuff to the client. | ||
3375 | </summary> | ||
3376 | <remarks>Default is UTF8</remarks> | ||
3377 | </member> | ||
3378 | <member name="P:HttpServer.IHttpResponse.KeepAlive"> | ||
3379 | <summary> | ||
3380 | Number of seconds to keep connection alive | ||
3381 | </summary> | ||
3382 | <remarks>Only used if Connection property is set to ConnectionType.KeepAlive</remarks> | ||
3383 | </member> | ||
3384 | <member name="P:HttpServer.IHttpResponse.Status"> | ||
3385 | <summary> | ||
3386 | Status code that is sent to the client. | ||
3387 | </summary> | ||
3388 | <remarks>Default is HttpStatusCode.Ok</remarks> | ||
3389 | </member> | ||
3390 | <member name="P:HttpServer.IHttpResponse.Reason"> | ||
3391 | <summary> | ||
3392 | Information about why a specific status code was used. | ||
3393 | </summary> | ||
3394 | </member> | ||
3395 | <member name="P:HttpServer.IHttpResponse.ContentLength"> | ||
3396 | <summary> | ||
3397 | Size of the body. MUST be specified before sending the header, | ||
3398 | unless property Chunked is set to true. | ||
3399 | </summary> | ||
3400 | </member> | ||
3401 | <member name="P:HttpServer.IHttpResponse.ContentType"> | ||
3402 | <summary> | ||
3403 | Kind of content in the body | ||
3404 | </summary> | ||
3405 | <remarks>Default is text/html</remarks> | ||
3406 | </member> | ||
3407 | <member name="P:HttpServer.IHttpResponse.HeadersSent"> | ||
3408 | <summary> | ||
3409 | Headers have been sent to the client- | ||
3410 | </summary> | ||
3411 | <remarks>You can not send any additional headers if they have already been sent.</remarks> | ||
3412 | </member> | ||
3413 | <member name="P:HttpServer.IHttpResponse.Sent"> | ||
3414 | <summary> | ||
3415 | The whole response have been sent. | ||
3416 | </summary> | ||
3417 | </member> | ||
3418 | <member name="P:HttpServer.IHttpResponse.Cookies"> | ||
3419 | <summary> | ||
3420 | Cookies that should be created/changed. | ||
3421 | </summary> | ||
3422 | </member> | ||
3423 | <member name="T:HttpServer.ConnectionType"> | ||
3424 | <summary> | ||
3425 | Type of HTTP connection | ||
3426 | </summary> | ||
3427 | </member> | ||
3428 | <member name="F:HttpServer.ConnectionType.Close"> | ||
3429 | <summary> | ||
3430 | Connection is closed after each request-response | ||
3431 | </summary> | ||
3432 | </member> | ||
3433 | <member name="F:HttpServer.ConnectionType.KeepAlive"> | ||
3434 | <summary> | ||
3435 | Connection is kept alive for X seconds (unless another request have been made) | ||
3436 | </summary> | ||
3437 | </member> | ||
3438 | <member name="T:HttpServer.HttpModules.WebSiteModule"> | ||
3439 | <summary> | ||
3440 | The website module let's you handle multiple websites in the same server. | ||
3441 | It uses the "Host" header to check which site you want. | ||
3442 | </summary> | ||
3443 | <remarks>It's recommended that you do not | ||
3444 | add any other modules to HttpServer if you are using the website module. Instead, | ||
3445 | add all wanted modules to each website.</remarks> | ||
3446 | </member> | ||
3447 | <member name="M:HttpServer.HttpModules.WebSiteModule.#ctor(System.String,System.String)"> | ||
3448 | <summary> | ||
3449 | |||
3450 | </summary> | ||
3451 | <param name="host">domain name that should be handled.</param> | ||
3452 | <param name="name"></param> | ||
3453 | </member> | ||
3454 | <member name="M:HttpServer.HttpModules.WebSiteModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | ||
3455 | <summary> | ||
3456 | Method that process the url | ||
3457 | </summary> | ||
3458 | <param name="request">Information sent by the browser about the request</param> | ||
3459 | <param name="response">Information that is being sent back to the client.</param> | ||
3460 | <param name="session">Session used to </param> | ||
3461 | </member> | ||
3462 | <member name="P:HttpServer.HttpModules.WebSiteModule.SiteName"> | ||
3463 | <summary> | ||
3464 | Name of site. | ||
3465 | </summary> | ||
3466 | </member> | ||
3467 | <member name="T:HttpServer.HttpModules.HttpModuleExceptionEventArgs"> | ||
3468 | <summary> | ||
3469 | Used to inform http server that | ||
3470 | </summary> | ||
3471 | </member> | ||
3472 | <member name="M:HttpServer.HttpModules.HttpModuleExceptionEventArgs.#ctor(System.Exception)"> | ||
3473 | <summary> | ||
3474 | Eventarguments used when an exception is thrown by a module | ||
3475 | </summary> | ||
3476 | <param name="e">the exception</param> | ||
3477 | </member> | ||
3478 | <member name="P:HttpServer.HttpModules.HttpModuleExceptionEventArgs.Exception"> | ||
3479 | <summary> | ||
3480 | Exception thrown in a module | ||
3481 | </summary> | ||
3482 | </member> | ||
3483 | <member name="T:HttpServer.HttpInputItem"> | ||
3484 | <summary> | ||
3485 | represents a HTTP input item. Each item can have multiple sub items, a sub item | ||
3486 | is made in a HTML form by using square brackets | ||
3604 | </summary> | 3487 | </summary> |
3605 | <param name="fromUrlExpression">Expression to match URL</param> | ||
3606 | <param name="toUrlExpression">Expression to generate URL</param> | ||
3607 | <param name="options">Regular expression options to apply</param> | ||
3608 | <param name="shouldRedirect"><c>true</c> if request should be redirected, <c>false</c> if the request URI should be replaced.</param> | ||
3609 | <example> | 3488 | <example> |
3610 | <![CDATA[ | 3489 | // <input type="text" name="user[FirstName]" value="jonas" /> becomes: |
3611 | server.Add(new RegexRedirectRule("/(?<first>[a-zA-Z0-9]+)", "/user/${first}", RegexOptions.None)); | 3490 | Console.WriteLine("Value: {0}", form["user"]["FirstName"].Value); |
3612 | Result of ie. /employee1 will then be /user/employee1 | ||
3613 | ]]> | ||
3614 | </example> | 3491 | </example> |
3492 | <remarks> | ||
3493 | All names in a form SHOULD be in lowercase. | ||
3494 | </remarks> | ||
3495 | </member> | ||
3496 | <member name="F:HttpServer.HttpInputItem.Empty"> | ||
3497 | <summary> Representation of a non-initialized <see cref="T:HttpServer.HttpInputItem"/>.</summary> | ||
3498 | </member> | ||
3499 | <member name="M:HttpServer.HttpInputItem.#ctor(System.String,System.String)"> | ||
3500 | <summary> | ||
3501 | Initializes an input item setting its name/identifier and value | ||
3502 | </summary> | ||
3503 | <param name="name">Parameter name/id</param> | ||
3504 | <param name="value">Parameter value</param> | ||
3505 | </member> | ||
3506 | <member name="M:HttpServer.HttpInputItem.#ctor(HttpServer.HttpInputItem)"> | ||
3507 | <summary>Creates a deep copy of the item specified</summary> | ||
3508 | <param name="item">The item to copy</param> | ||
3509 | <remarks>The function makes a deep copy of quite a lot which can be slow</remarks> | ||
3510 | </member> | ||
3511 | <member name="M:HttpServer.HttpInputItem.Add(System.String)"> | ||
3512 | <summary> | ||
3513 | Add another value to this item | ||
3514 | </summary> | ||
3515 | <param name="value">Value to add.</param> | ||
3516 | <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception> | ||
3517 | </member> | ||
3518 | <member name="M:HttpServer.HttpInputItem.Contains(System.String)"> | ||
3519 | <summary> | ||
3520 | checks if a sub-item exists (and has a value). | ||
3521 | </summary> | ||
3522 | <param name="name">name in lower case</param> | ||
3523 | <returns>true if the sub-item exists and has a value; otherwise false.</returns> | ||
3524 | </member> | ||
3525 | <member name="M:HttpServer.HttpInputItem.ToString"> | ||
3526 | <summary> Returns a formatted representation of the instance with the values of all contained parameters </summary> | ||
3527 | </member> | ||
3528 | <member name="M:HttpServer.HttpInputItem.ToString(System.String,System.Boolean)"> | ||
3529 | <summary> | ||
3530 | Outputs the string in a formatted manner | ||
3531 | </summary> | ||
3532 | <param name="prefix">A prefix to append, used internally</param> | ||
3533 | <param name="asQuerySting">produce a query string</param> | ||
3534 | </member> | ||
3535 | <member name="M:HttpServer.HttpInputItem.Add(System.String,System.String)"> | ||
3536 | <summary> | ||
3537 | Add a sub item. | ||
3538 | </summary> | ||
3539 | <param name="name">Can contain array formatting, the item is then parsed and added in multiple levels</param> | ||
3540 | <param name="value">Value to add.</param> | ||
3615 | <exception cref="T:System.ArgumentNullException">Argument is null.</exception> | 3541 | <exception cref="T:System.ArgumentNullException">Argument is null.</exception> |
3616 | <seealso cref="P:HttpServer.Rules.RedirectRule.ShouldRedirect"/> | 3542 | <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception> |
3617 | </member> | 3543 | </member> |
3618 | <member name="M:HttpServer.Rules.RegexRedirectRule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse)"> | 3544 | <member name="M:HttpServer.HttpInputItem.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator"> |
3619 | <summary> | 3545 | <summary> |
3620 | Process the incoming request. | 3546 | Returns an enumerator that iterates through the collection. |
3621 | </summary> | 3547 | </summary> |
3622 | <param name="request">incoming HTTP request</param> | 3548 | |
3623 | <param name="response">outgoing HTTP response</param> | 3549 | <returns> |
3624 | <returns>true if response should be sent to the browser directly (no other rules or modules will be processed).</returns> | 3550 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. |
3625 | <remarks> | 3551 | </returns> |
3626 | returning true means that no modules will get the request. Returning true is typically being done | 3552 | <filterpriority>1</filterpriority> |
3627 | for redirects. | 3553 | </member> |
3628 | </remarks> | 3554 | <member name="M:HttpServer.HttpInputItem.GetEnumerator"> |
3629 | <exception cref="T:System.ArgumentNullException">If request or response is null</exception> | 3555 | <summary> |
3556 | Returns an enumerator that iterates through a collection. | ||
3557 | </summary> | ||
3558 | |||
3559 | <returns> | ||
3560 | An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection. | ||
3561 | </returns> | ||
3562 | <filterpriority>2</filterpriority> | ||
3563 | </member> | ||
3564 | <member name="M:HttpServer.HttpInputItem.ToString(System.String)"> | ||
3565 | <summary> | ||
3566 | Outputs the string in a formatted manner | ||
3567 | </summary> | ||
3568 | <param name="prefix">A prefix to append, used internally</param> | ||
3569 | <returns></returns> | ||
3570 | </member> | ||
3571 | <member name="P:HttpServer.HttpInputItem.Count"> | ||
3572 | <summary> | ||
3573 | Number of values | ||
3574 | </summary> | ||
3575 | </member> | ||
3576 | <member name="P:HttpServer.HttpInputItem.Item(System.String)"> | ||
3577 | <summary> | ||
3578 | Get a sub item | ||
3579 | </summary> | ||
3580 | <param name="name">name in lower case.</param> | ||
3581 | <returns><see cref="F:HttpServer.HttpInputItem.Empty"/> if no item was found.</returns> | ||
3582 | </member> | ||
3583 | <member name="P:HttpServer.HttpInputItem.Name"> | ||
3584 | <summary> | ||
3585 | Name of item (in lower case). | ||
3586 | </summary> | ||
3587 | </member> | ||
3588 | <member name="P:HttpServer.HttpInputItem.Value"> | ||
3589 | <summary> | ||
3590 | Returns the first value, or null if no value exist. | ||
3591 | </summary> | ||
3592 | </member> | ||
3593 | <member name="P:HttpServer.HttpInputItem.LastValue"> | ||
3594 | <summary> | ||
3595 | Returns the last value, or null if no value exist. | ||
3596 | </summary> | ||
3597 | </member> | ||
3598 | <member name="P:HttpServer.HttpInputItem.Values"> | ||
3599 | <summary> | ||
3600 | Returns the list with values. | ||
3601 | </summary> | ||
3602 | </member> | ||
3603 | <member name="P:HttpServer.HttpInputItem.HttpServer#IHttpInput#Item(System.String)"> | ||
3604 | <summary> | ||
3605 | |||
3606 | </summary> | ||
3607 | <param name="name">name in lower case</param> | ||
3608 | <returns></returns> | ||
3609 | </member> | ||
3610 | <member name="T:HttpServer.Helpers.ResourceManager"> | ||
3611 | <summary>Class to handle loading of resource files</summary> | ||
3612 | </member> | ||
3613 | <member name="M:HttpServer.Helpers.ResourceManager.#ctor"> | ||
3614 | <summary> | ||
3615 | Initializes a new instance of the <see cref="T:HttpServer.Helpers.ResourceManager"/> class. | ||
3616 | </summary> | ||
3617 | </member> | ||
3618 | <member name="M:HttpServer.Helpers.ResourceManager.#ctor(HttpServer.ILogWriter)"> | ||
3619 | <summary> | ||
3620 | Initializes a new instance of the <see cref="T:HttpServer.Helpers.ResourceManager"/> class. | ||
3621 | </summary> | ||
3622 | <param name="writer">logger.</param> | ||
3623 | </member> | ||
3624 | <member name="M:HttpServer.Helpers.ResourceManager.LoadResources(System.String,System.Reflection.Assembly,System.String)"> | ||
3625 | <summary> | ||
3626 | Loads resources from a namespace in the given assembly to an URI | ||
3627 | </summary> | ||
3628 | <param name="toUri">The URI to map the resources to</param> | ||
3629 | <param name="fromAssembly">The assembly in which the resources reside</param> | ||
3630 | <param name="fromNamespace">The namespace from which to load the resources</param> | ||
3631 | <usage> | ||
3632 | <code> | ||
3633 | resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views"); | ||
3634 | </code> | ||
3635 | Will make the resource MyLib.Models.User.Views.list.Haml accessible via /user/list.haml or /user/list/ | ||
3636 | </usage> | ||
3637 | <returns>The amount of loaded files, giving you the possibility of making sure the resources needed gets loaded</returns> | ||
3638 | <exception cref="T:System.InvalidOperationException">If a resource has already been mapped to an uri</exception> | ||
3639 | </member> | ||
3640 | <member name="M:HttpServer.Helpers.ResourceManager.GetResourceStream(System.String)"> | ||
3641 | <summary> | ||
3642 | Retrieves a stream for the specified resource path if loaded otherwise null | ||
3643 | </summary> | ||
3644 | <param name="path">Path to the resource to retrieve a stream for</param> | ||
3645 | <returns>A stream or null if the resource couldn't be found</returns> | ||
3646 | </member> | ||
3647 | <member name="M:HttpServer.Helpers.ResourceManager.GetFiles(System.String)"> | ||
3648 | <summary> | ||
3649 | Fetch all files from the resource that matches the specified arguments. | ||
3650 | </summary> | ||
3651 | <param name="path">The path to the resource to extract</param> | ||
3652 | <returns> | ||
3653 | a list of files if found; or an empty array if no files are found. | ||
3654 | </returns> | ||
3655 | <exception cref="T:System.ArgumentException">Search path must end with an asterisk for finding arbitrary files</exception> | ||
3656 | </member> | ||
3657 | <member name="M:HttpServer.Helpers.ResourceManager.GetFiles(System.String,System.String)"> | ||
3658 | <summary> | ||
3659 | Fetch all files from the resource that matches the specified arguments. | ||
3660 | </summary> | ||
3661 | <param name="path">Where the file should reside.</param> | ||
3662 | <param name="filename">Files to check</param> | ||
3663 | <returns> | ||
3664 | a list of files if found; or an empty array if no files are found. | ||
3665 | </returns> | ||
3666 | </member> | ||
3667 | <member name="M:HttpServer.Helpers.ResourceManager.ContainsResource(System.String)"> | ||
3668 | <summary> | ||
3669 | Returns whether or not the loader has an instance of the file requested | ||
3670 | </summary> | ||
3671 | <param name="filename">The name of the template/file</param> | ||
3672 | <returns>True if the loader can provide the file</returns> | ||
3630 | </member> | 3673 | </member> |
3631 | <member name="T:HttpServer.Parser.RequestLineEventArgs"> | 3674 | <member name="T:HttpServer.Parser.RequestLineEventArgs"> |
3632 | <summary> | 3675 | <summary> |
@@ -3664,908 +3707,849 @@ | |||
3664 | Gets or sets requested URI path. | 3707 | Gets or sets requested URI path. |
3665 | </summary> | 3708 | </summary> |
3666 | </member> | 3709 | </member> |
3667 | <member name="T:HttpServer.RealmHandler"> | 3710 | <member name="T:HttpServer.IHttpContextHandler"> |
3668 | <summary> | 3711 | <summary> |
3669 | Delegate used to find a realm/domain. | 3712 | Class that receives Requests from a <see cref="T:HttpServer.IHttpClientContext"/>. |
3713 | </summary> | ||
3714 | </member> | ||
3715 | <member name="M:HttpServer.IHttpContextHandler.ClientDisconnected(HttpServer.IHttpClientContext,System.Net.Sockets.SocketError)"> | ||
3716 | <summary> | ||
3717 | Client have been disconnected. | ||
3718 | </summary> | ||
3719 | <param name="client">Client that was disconnected.</param> | ||
3720 | <param name="error">Reason</param> | ||
3721 | <see cref="T:HttpServer.IHttpClientContext"/> | ||
3722 | </member> | ||
3723 | <member name="M:HttpServer.IHttpContextHandler.RequestReceived(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> | ||
3724 | <summary> | ||
3725 | Invoked when a client context have received a new HTTP request | ||
3726 | </summary> | ||
3727 | <param name="client">Client that received the request.</param> | ||
3728 | <param name="request">Request that was received.</param> | ||
3729 | <see cref="T:HttpServer.IHttpClientContext"/> | ||
3730 | </member> | ||
3731 | <member name="T:HttpServer.HttpForm"> | ||
3732 | <summary>Container for posted form data</summary> | ||
3733 | </member> | ||
3734 | <member name="F:HttpServer.HttpForm.EmptyForm"> | ||
3735 | <summary>Instance to help mark a non-initialized form</summary> | ||
3736 | </member> | ||
3737 | <member name="M:HttpServer.HttpForm.#ctor"> | ||
3738 | <summary>Initializes a form container with the specified name</summary> | ||
3739 | </member> | ||
3740 | <member name="M:HttpServer.HttpForm.#ctor(HttpServer.HttpInput)"> | ||
3741 | <summary> | ||
3742 | Makes a deep copy of the input | ||
3743 | </summary> | ||
3744 | <param name="input">The input to copy</param> | ||
3745 | </member> | ||
3746 | <member name="M:HttpServer.HttpForm.AddFile(HttpServer.HttpFile)"> | ||
3747 | <summary> | ||
3748 | Adds a file to the collection of posted files | ||
3749 | </summary> | ||
3750 | <param name="file">The file to add</param> | ||
3751 | <exception cref="T:System.ArgumentException">If the file is already added</exception> | ||
3752 | <exception cref="T:System.ArgumentNullException">If file is null</exception> | ||
3753 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
3754 | </member> | ||
3755 | <member name="M:HttpServer.HttpForm.ContainsFile(System.String)"> | ||
3756 | <summary> | ||
3757 | Checks if the form contains a specified file | ||
3758 | </summary> | ||
3759 | <param name="name">Field name of the file parameter</param> | ||
3760 | <returns>True if the file exists</returns> | ||
3761 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
3762 | </member> | ||
3763 | <member name="M:HttpServer.HttpForm.GetFile(System.String)"> | ||
3764 | <summary> | ||
3765 | Retrieves a file held by by the form | ||
3766 | </summary> | ||
3767 | <param name="name">The identifier of the file</param> | ||
3768 | <returns>The requested file or null if the file was not found</returns> | ||
3769 | <exception cref="T:System.ArgumentNullException">If name is null or empty</exception> | ||
3770 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
3771 | </member> | ||
3772 | <member name="M:HttpServer.HttpForm.Clear"> | ||
3773 | <summary>Disposes all held HttpFile's and resets values</summary> | ||
3774 | </member> | ||
3775 | <member name="P:HttpServer.HttpForm.Files"> | ||
3776 | <summary> | ||
3777 | Retrieves the number of files added to the <see cref="T:HttpServer.HttpForm"/> | ||
3778 | </summary> | ||
3779 | <returns>0 if no files are added</returns> | ||
3780 | </member> | ||
3781 | <member name="T:HttpServer.HttpClientContext"> | ||
3782 | <summary> | ||
3783 | Contains a connection to a browser/client. | ||
3670 | </summary> | 3784 | </summary> |
3671 | <param name="domain"></param> | ||
3672 | <returns></returns> | ||
3673 | <remarks> | 3785 | <remarks> |
3674 | Realms are used during HTTP Authentication | 3786 | Remember to <see cref="M:HttpServer.HttpClientContext.Start"/> after you have hooked the <see cref="E:HttpServer.HttpClientContext.RequestReceived"/> event. |
3675 | </remarks> | 3787 | </remarks> |
3676 | <seealso cref="T:HttpServer.Authentication.AuthenticationModule"/> | 3788 | TODO: Maybe this class should be broken up into HttpClientChannel and HttpClientContext? |
3677 | <seealso cref="T:HttpServer.Authentication.AuthenticationHandler"/> | ||
3678 | </member> | 3789 | </member> |
3679 | <member name="T:HttpServer.HttpServer"> | 3790 | <member name="M:HttpServer.HttpClientContext.#ctor(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,HttpServer.IRequestParserFactory,System.Int32,System.Net.Sockets.Socket)"> |
3680 | <summary> | 3791 | <summary> |
3681 | A complete HTTP server, you need to add a module to it to be able to handle incoming requests. | 3792 | Initializes a new instance of the <see cref="T:HttpServer.HttpClientContext"/> class. |
3682 | </summary> | 3793 | </summary> |
3683 | <example> | 3794 | <param name="secured">true if the connection is secured (SSL/TLS)</param> |
3684 | <code> | 3795 | <param name="remoteEndPoint">client that connected.</param> |
3685 | // this small example will add two web site modules, thus handling | 3796 | <param name="stream">Stream used for communication</param> |
3686 | // two different sites. In reality you should add Controller modules or something | 3797 | <param name="parserFactory">Used to create a <see cref="T:HttpServer.IHttpRequestParser"/>.</param> |
3687 | // two the website modules to be able to handle different requests. | 3798 | <param name="bufferSize">Size of buffer to use when reading data. Must be at least 4096 bytes.</param> |
3688 | HttpServer server = new HttpServer(); | 3799 | <exception cref="T:System.Net.Sockets.SocketException">If <see cref="M:System.Net.Sockets.Socket.BeginReceive(System.Byte[],System.Int32,System.Int32,System.Net.Sockets.SocketFlags,System.AsyncCallback,System.Object)"/> fails</exception> |
3689 | server.Add(new WebSiteModule("www.gauffin.com", "Gauffin Telecom AB")); | 3800 | <exception cref="T:System.ArgumentException">Stream must be writable and readable.</exception> |
3690 | server.Add(new WebSiteModule("www.vapadi.se", "Remote PBX")); | 3801 | </member> |
3691 | 3802 | <member name="M:HttpServer.HttpClientContext.OnBodyBytesReceived(System.Object,HttpServer.Parser.BodyEventArgs)"> | |
3692 | // start regular http | 3803 | <summary> |
3693 | server.Start(IPAddress.Any, 80); | 3804 | Process incoming body bytes. |
3805 | </summary> | ||
3806 | <param name="sender"><see cref="T:HttpServer.IHttpRequestParser"/></param> | ||
3807 | <param name="e">Bytes</param> | ||
3808 | </member> | ||
3809 | <member name="M:HttpServer.HttpClientContext.OnHeaderReceived(System.Object,HttpServer.Parser.HeaderEventArgs)"> | ||
3810 | <summary> | ||
3694 | 3811 | ||
3695 | // start https | 3812 | </summary> |
3696 | server.Start(IPAddress.Any, 443, myCertificate); | 3813 | <param name="sender"></param> |
3697 | </code> | 3814 | <param name="e"></param> |
3698 | </example> | ||
3699 | <seealso cref="T:HttpServer.HttpModules.HttpModule"/> | ||
3700 | <seealso cref="T:HttpServer.HttpModules.FileModule"/> | ||
3701 | <seealso cref="T:HttpServer.HttpListener"/> | ||
3702 | </member> | 3815 | </member> |
3703 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.IComponentProvider)"> | 3816 | <member name="M:HttpServer.HttpClientContext.Start"> |
3704 | <summary> | 3817 | <summary> |
3705 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 3818 | Start reading content. |
3706 | </summary> | 3819 | </summary> |
3707 | <param name="provider">Used to get all components used in the server..</param> | 3820 | <remarks> |
3821 | Make sure to call base.Start() if you override this method. | ||
3822 | </remarks> | ||
3708 | </member> | 3823 | </member> |
3709 | <member name="M:HttpServer.HttpServer.#ctor"> | 3824 | <member name="M:HttpServer.HttpClientContext.Cleanup"> |
3710 | <summary> | 3825 | <summary> |
3711 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 3826 | Clean up context. |
3712 | </summary> | 3827 | </summary> |
3828 | <remarks> | ||
3829 | Make sure to call base.Cleanup() if you override the method. | ||
3830 | </remarks> | ||
3713 | </member> | 3831 | </member> |
3714 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider)"> | 3832 | <member name="M:HttpServer.HttpClientContext.Disconnect(System.Net.Sockets.SocketError)"> |
3715 | <summary> | 3833 | <summary> |
3716 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 3834 | Disconnect from client |
3717 | </summary> | 3835 | </summary> |
3718 | <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param> | 3836 | <param name="error">error to report in the <see cref="E:HttpServer.HttpClientContext.Disconnected"/> event.</param> |
3719 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> | ||
3720 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> | ||
3721 | </member> | 3837 | </member> |
3722 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.Sessions.IHttpSessionStore)"> | 3838 | <member name="M:HttpServer.HttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String,System.String,System.String)"> |
3723 | <summary> | 3839 | <summary> |
3724 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 3840 | Send a response. |
3725 | </summary> | 3841 | </summary> |
3726 | <param name="sessionStore">A session store is used to save and retrieve sessions</param> | 3842 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> |
3727 | <seealso cref="T:HttpServer.Sessions.IHttpSessionStore"/> | 3843 | <param name="statusCode">HTTP status code</param> |
3844 | <param name="reason">reason for the status code.</param> | ||
3845 | <param name="body">HTML body contents, can be null or empty.</param> | ||
3846 | <param name="contentType">A content type to return the body as, i.e. 'text/html' or 'text/plain', defaults to 'text/html' if null or empty</param> | ||
3847 | <exception cref="T:System.ArgumentException">If <paramref name="httpVersion"/> is invalid.</exception> | ||
3728 | </member> | 3848 | </member> |
3729 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.ILogWriter)"> | 3849 | <member name="M:HttpServer.HttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String)"> |
3730 | <summary> | 3850 | <summary> |
3731 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 3851 | Send a response. |
3732 | </summary> | 3852 | </summary> |
3733 | <param name="logWriter">The log writer.</param> | 3853 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> |
3734 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | 3854 | <param name="statusCode">HTTP status code</param> |
3855 | <param name="reason">reason for the status code.</param> | ||
3735 | </member> | 3856 | </member> |
3736 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider,HttpServer.ILogWriter)"> | 3857 | <member name="M:HttpServer.HttpClientContext.Respond(System.String)"> |
3737 | <summary> | 3858 | <summary> |
3738 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 3859 | Send a response. |
3739 | </summary> | 3860 | </summary> |
3740 | <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param> | 3861 | <exception cref="T:System.ArgumentNullException"></exception> |
3741 | <param name="logWriter">The log writer.</param> | ||
3742 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> | ||
3743 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> | ||
3744 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
3745 | </member> | 3862 | </member> |
3746 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider,HttpServer.Sessions.IHttpSessionStore,HttpServer.ILogWriter)"> | 3863 | <member name="M:HttpServer.HttpClientContext.Send(System.Byte[])"> |
3747 | <summary> | 3864 | <summary> |
3748 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 3865 | send a whole buffer |
3749 | </summary> | 3866 | </summary> |
3750 | <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param> | 3867 | <param name="buffer">buffer to send</param> |
3751 | <param name="sessionStore">A session store is used to save and retrieve sessions</param> | 3868 | <exception cref="T:System.ArgumentNullException"></exception> |
3752 | <param name="logWriter">The log writer.</param> | ||
3753 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> | ||
3754 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> | ||
3755 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
3756 | <seealso cref="T:HttpServer.Sessions.IHttpSessionStore"/> | ||
3757 | </member> | 3869 | </member> |
3758 | <member name="M:HttpServer.HttpServer.Add(HttpServer.Rules.IRule)"> | 3870 | <member name="M:HttpServer.HttpClientContext.Send(System.Byte[],System.Int32,System.Int32)"> |
3759 | <summary> | 3871 | <summary> |
3760 | Adds the specified rule. | 3872 | Send data using the stream |
3761 | </summary> | 3873 | </summary> |
3762 | <param name="rule">The rule.</param> | 3874 | <param name="buffer">Contains data to send</param> |
3875 | <param name="offset">Start position in buffer</param> | ||
3876 | <param name="size">number of bytes to send</param> | ||
3877 | <exception cref="T:System.ArgumentNullException"></exception> | ||
3878 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> | ||
3763 | </member> | 3879 | </member> |
3764 | <member name="M:HttpServer.HttpServer.Add(HttpServer.HttpModules.HttpModule)"> | 3880 | <member name="E:HttpServer.HttpClientContext.Cleaned"> |
3765 | <summary> | 3881 | <summary> |
3766 | Add a <see cref="T:HttpServer.HttpModules.HttpModule"/> to the server. | 3882 | This context have been cleaned, which means that it can be reused. |
3767 | </summary> | 3883 | </summary> |
3768 | <param name="module">mode to add</param> | ||
3769 | </member> | 3884 | </member> |
3770 | <member name="M:HttpServer.HttpServer.DecodeBody(HttpServer.IHttpRequest)"> | 3885 | <member name="E:HttpServer.HttpClientContext.Started"> |
3771 | <summary> | 3886 | <summary> |
3772 | Decodes the request body. | 3887 | Context have been started (a new client have connected) |
3773 | </summary> | 3888 | </summary> |
3774 | <param name="request">The request.</param> | ||
3775 | <exception cref="T:HttpServer.Exceptions.InternalServerException">Failed to decode form data.</exception> | ||
3776 | </member> | 3889 | </member> |
3777 | <member name="M:HttpServer.HttpServer.ErrorPage(HttpServer.IHttpResponse,System.Net.HttpStatusCode,System.String)"> | 3890 | <member name="P:HttpServer.HttpClientContext.CurrentRequest"> |
3778 | <summary> | 3891 | <summary> |
3779 | Generate a HTTP error page (that will be added to the response body). | 3892 | Overload to specify own type. |
3780 | response status code is also set. | ||
3781 | </summary> | 3893 | </summary> |
3782 | <param name="response">Response that the page will be generated in.</param> | 3894 | <remarks> |
3783 | <param name="error"><see cref="T:System.Net.HttpStatusCode"/>.</param> | 3895 | Must be specified before the context is being used. |
3784 | <param name="body">response body contents.</param> | 3896 | </remarks> |
3785 | </member> | 3897 | </member> |
3786 | <member name="M:HttpServer.HttpServer.ErrorPage(HttpServer.IHttpResponse,HttpServer.Exceptions.HttpException)"> | 3898 | <member name="P:HttpServer.HttpClientContext.Secured"> |
3787 | <summary> | 3899 | <summary> |
3788 | Generate a HTTP error page (that will be added to the response body). | 3900 | Using SSL or other encryption method. |
3789 | response status code is also set. | ||
3790 | </summary> | 3901 | </summary> |
3791 | <param name="response">Response that the page will be generated in.</param> | ||
3792 | <param name="err">exception.</param> | ||
3793 | </member> | 3902 | </member> |
3794 | <member name="M:HttpServer.HttpServer.GetRealm(HttpServer.IHttpRequest)"> | 3903 | <member name="P:HttpServer.HttpClientContext.IsSecured"> |
3795 | <summary> | 3904 | <summary> |
3796 | Realms are used by the <see cref="T:HttpServer.Authentication.AuthenticationModule"/>s. | 3905 | Using SSL or other encryption method. |
3797 | </summary> | 3906 | </summary> |
3798 | <param name="request">HTTP request</param> | ||
3799 | <returns>domain/realm.</returns> | ||
3800 | </member> | 3907 | </member> |
3801 | <member name="M:HttpServer.HttpServer.HandleRequest(HttpServer.IHttpClientContext,HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 3908 | <member name="P:HttpServer.HttpClientContext.LogWriter"> |
3802 | <summary> | 3909 | <summary> |
3803 | Process an incoming request. | 3910 | Specify which logger to use. |
3804 | </summary> | 3911 | </summary> |
3805 | <param name="context">connection to client</param> | ||
3806 | <param name="request">request information</param> | ||
3807 | <param name="response">response that should be filled</param> | ||
3808 | <param name="session">session information</param> | ||
3809 | </member> | 3912 | </member> |
3810 | <member name="M:HttpServer.HttpServer.OnClientDisconnected(HttpServer.IHttpClientContext,System.Net.Sockets.SocketError)"> | 3913 | <member name="P:HttpServer.HttpClientContext.Stream"> |
3811 | <summary> | 3914 | <summary> |
3812 | Can be overloaded to implement stuff when a client have been connected. | 3915 | Gets or sets the network stream. |
3813 | </summary> | 3916 | </summary> |
3814 | <remarks> | ||
3815 | Default implementation does nothing. | ||
3816 | </remarks> | ||
3817 | <param name="client">client that disconnected</param> | ||
3818 | <param name="error">disconnect reason</param> | ||
3819 | </member> | 3917 | </member> |
3820 | <member name="M:HttpServer.HttpServer.ProcessAuthentication(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 3918 | <member name="P:HttpServer.HttpClientContext.RemoteAddress"> |
3821 | <summary> | 3919 | <summary> |
3822 | Handle authentication | 3920 | Gets or sets IP address that the client connected from. |
3823 | </summary> | 3921 | </summary> |
3824 | <param name="request"></param> | ||
3825 | <param name="response"></param> | ||
3826 | <param name="session"></param> | ||
3827 | <returns>true if request can be handled; false if not.</returns> | ||
3828 | <exception cref="T:HttpServer.Exceptions.BadRequestException">Invalid authorization header</exception> | ||
3829 | </member> | 3922 | </member> |
3830 | <member name="M:HttpServer.HttpServer.RequestAuthentication(HttpServer.Authentication.AuthenticationModule,HttpServer.IHttpRequest,HttpServer.IHttpResponse)"> | 3923 | <member name="P:HttpServer.HttpClientContext.RemotePort"> |
3831 | <summary> | 3924 | <summary> |
3832 | Will request authentication. | 3925 | Gets or sets port that the client connected from. |
3926 | </summary> | ||
3927 | </member> | ||
3928 | <member name="E:HttpServer.HttpClientContext.Disconnected"> | ||
3929 | <summary> | ||
3930 | The context have been disconnected. | ||
3833 | </summary> | 3931 | </summary> |
3834 | <remarks> | 3932 | <remarks> |
3835 | Sends respond to client, nothing else can be done with the response after this. | 3933 | Event can be used to clean up a context, or to reuse it. |
3836 | </remarks> | 3934 | </remarks> |
3837 | <param name="mod"></param> | ||
3838 | <param name="request"></param> | ||
3839 | <param name="response"></param> | ||
3840 | </member> | 3935 | </member> |
3841 | <member name="M:HttpServer.HttpServer.OnRequest(System.Object,HttpServer.RequestEventArgs)"> | 3936 | <member name="E:HttpServer.HttpClientContext.RequestReceived"> |
3842 | <summary> | 3937 | <summary> |
3843 | Received from a <see cref="T:HttpServer.IHttpClientContext"/> when a request have been parsed successfully. | 3938 | A request have been received in the context. |
3844 | </summary> | 3939 | </summary> |
3845 | <param name="source"><see cref="T:HttpServer.IHttpClientContext"/> that received the request.</param> | ||
3846 | <param name="args">The request.</param> | ||
3847 | </member> | 3940 | </member> |
3848 | <member name="M:HttpServer.HttpServer.ProcessRequestWrapper(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> | 3941 | <member name="T:HttpServer.Helpers.XmlHelper"> |
3849 | <summary> | 3942 | <summary> |
3850 | To be able to track request count. | 3943 | Helpers to make XML handling easier |
3851 | </summary> | 3944 | </summary> |
3852 | <param name="context"></param> | ||
3853 | <param name="request"></param> | ||
3854 | </member> | 3945 | </member> |
3855 | <member name="M:HttpServer.HttpServer.Start(System.Net.IPAddress,System.Int32)"> | 3946 | <member name="M:HttpServer.Helpers.XmlHelper.Serialize(System.Object)"> |
3856 | <summary> | 3947 | <summary> |
3857 | Start the web server using regular HTTP. | 3948 | Serializes object to XML. |
3858 | </summary> | 3949 | </summary> |
3859 | <param name="address">IP Address to listen on, use <c>IpAddress.Any </c>to accept connections on all IP addresses/network cards.</param> | 3950 | <param name="value">object to serialize.</param> |
3860 | <param name="port">Port to listen on. 80 can be a good idea =)</param> | 3951 | <returns>XML</returns> |
3861 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | 3952 | <remarks> |
3862 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | 3953 | Removes name spaces and adds indentation |
3954 | </remarks> | ||
3863 | </member> | 3955 | </member> |
3864 | <member name="M:HttpServer.HttpServer.Start(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate)"> | 3956 | <member name="M:HttpServer.Helpers.XmlHelper.Deserialize``1(System.String)"> |
3865 | <summary> | 3957 | <summary> |
3866 | Accept secure connections. | 3958 | Create an object from a XML string |
3867 | </summary> | 3959 | </summary> |
3868 | <param name="address">IP Address to listen on, use <see cref="F:System.Net.IPAddress.Any"/> to accept connections on all IP Addresses / network cards.</param> | 3960 | <typeparam name="T">Type of object</typeparam> |
3869 | <param name="port">Port to listen on. 80 can be a good idea =)</param> | 3961 | <param name="xml">XML string</param> |
3870 | <param name="certificate">Certificate to use</param> | 3962 | <returns>object</returns> |
3871 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | ||
3872 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | ||
3873 | </member> | 3963 | </member> |
3874 | <member name="M:HttpServer.HttpServer.Stop"> | 3964 | <member name="M:HttpServer.FormDecoders.HttpMultipart.ReadLine"> |
3875 | <summary> | 3965 | <summary> |
3876 | shut down the server and listeners | 3966 | |
3877 | </summary> | 3967 | </summary> |
3968 | <returns></returns> | ||
3969 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> | ||
3970 | <exception cref="T:System.ObjectDisposedException"></exception> | ||
3878 | </member> | 3971 | </member> |
3879 | <member name="M:HttpServer.HttpServer.WriteLog(HttpServer.LogPrio,System.String)"> | 3972 | <member name="T:HttpServer.FormDecoders.HttpMultipart.Element"> |
3973 | <summary>Represents a field in a multipart form</summary> | ||
3974 | </member> | ||
3975 | <member name="T:HttpServer.Check"> | ||
3880 | <summary> | 3976 | <summary> |
3881 | write an entry to the log file | 3977 | Small design by contract implementation. |
3882 | </summary> | 3978 | </summary> |
3883 | <param name="prio">importance of the message</param> | ||
3884 | <param name="message">log message</param> | ||
3885 | </member> | 3979 | </member> |
3886 | <member name="M:HttpServer.HttpServer.WriteLog(System.Object,HttpServer.LogPrio,System.String)"> | 3980 | <member name="M:HttpServer.Check.NotEmpty(System.String,System.String)"> |
3887 | <summary> | 3981 | <summary> |
3888 | write an entry to the log file | 3982 | Check whether a parameter is empty. |
3889 | </summary> | 3983 | </summary> |
3890 | <param name="source">object that wrote the message</param> | 3984 | <param name="value">Parameter value</param> |
3891 | <param name="prio">importance of the message</param> | 3985 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> |
3892 | <param name="message">log message</param> | 3986 | <exception cref="T:System.ArgumentException">value is empty.</exception> |
3893 | </member> | 3987 | </member> |
3894 | <member name="P:HttpServer.HttpServer.Current"> | 3988 | <member name="M:HttpServer.Check.Require(System.Object,System.String)"> |
3895 | <summary> | 3989 | <summary> |
3896 | Server that is handling the current request. | 3990 | Checks whether a parameter is null. |
3897 | </summary> | 3991 | </summary> |
3898 | <remarks> | 3992 | <param name="value">Parameter value</param> |
3899 | Will be set as soon as a request arrives to the <see cref="T:HttpServer.HttpServer"/> object. | 3993 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> |
3900 | </remarks> | 3994 | <exception cref="T:System.ArgumentNullException">value is null.</exception> |
3901 | </member> | 3995 | </member> |
3902 | <member name="P:HttpServer.HttpServer.AuthenticationModules"> | 3996 | <member name="M:HttpServer.Check.Min(System.Int32,System.Object,System.String)"> |
3903 | <summary> | 3997 | <summary> |
3904 | Modules used for authentication. The module that is is added first is used as | 3998 | Checks whether a parameter is null. |
3905 | the default authentication module. | ||
3906 | </summary> | 3999 | </summary> |
3907 | <remarks>Use the corresponding property | 4000 | <param name="minValue"></param> |
3908 | in the <see cref="T:HttpServer.HttpModules.WebSiteModule"/> if you are using multiple websites.</remarks> | 4001 | <param name="value">Parameter value</param> |
4002 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> | ||
4003 | <exception cref="T:System.ArgumentException">value is null.</exception> | ||
3909 | </member> | 4004 | </member> |
3910 | <member name="P:HttpServer.HttpServer.FormDecoderProviders"> | 4005 | <member name="T:HttpServer.LogPrio"> |
3911 | <summary> | 4006 | <summary> |
3912 | Form decoder providers are used to decode request body (which normally contains form data). | 4007 | Priority for log entries |
3913 | </summary> | 4008 | </summary> |
4009 | <seealso cref="T:HttpServer.ILogWriter"/> | ||
3914 | </member> | 4010 | </member> |
3915 | <member name="P:HttpServer.HttpServer.ServerName"> | 4011 | <member name="F:HttpServer.LogPrio.Trace"> |
3916 | <summary> | 4012 | <summary> |
3917 | Server name sent in HTTP responses. | 4013 | Very detailed logs to be able to follow the flow of the program. |
3918 | </summary> | 4014 | </summary> |
3919 | <remarks> | ||
3920 | Do NOT include version in name, since it makes it | ||
3921 | easier for hackers. | ||
3922 | </remarks> | ||
3923 | </member> | 4015 | </member> |
3924 | <member name="P:HttpServer.HttpServer.SessionCookieName"> | 4016 | <member name="F:HttpServer.LogPrio.Debug"> |
3925 | <summary> | 4017 | <summary> |
3926 | Name of cookie where session id is stored. | 4018 | Logs to help debug errors in the application |
3927 | </summary> | 4019 | </summary> |
3928 | </member> | 4020 | </member> |
3929 | <member name="P:HttpServer.HttpServer.LogWriter"> | 4021 | <member name="F:HttpServer.LogPrio.Info"> |
3930 | <summary> | 4022 | <summary> |
3931 | Specified where logging should go. | 4023 | Information to be able to keep track of state changes etc. |
3932 | </summary> | 4024 | </summary> |
3933 | <seealso cref="T:HttpServer.NullLogWriter"/> | ||
3934 | <seealso cref="T:HttpServer.ConsoleLogWriter"/> | ||
3935 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
3936 | </member> | 4025 | </member> |
3937 | <member name="P:HttpServer.HttpServer.BackLog"> | 4026 | <member name="F:HttpServer.LogPrio.Warning"> |
3938 | <summary> | 4027 | <summary> |
3939 | Number of connections that can wait to be accepted by the server. | 4028 | Something did not go as we expected, but it's no problem. |
3940 | </summary> | 4029 | </summary> |
3941 | <remarks>Default is 10.</remarks> | ||
3942 | </member> | 4030 | </member> |
3943 | <member name="P:HttpServer.HttpServer.MaxRequestCount"> | 4031 | <member name="F:HttpServer.LogPrio.Error"> |
3944 | <summary> | 4032 | <summary> |
3945 | Gets or sets maximum number of allowed simultaneous requests. | 4033 | Something that should not fail failed, but we can still keep |
4034 | on going. | ||
3946 | </summary> | 4035 | </summary> |
3947 | <remarks> | ||
3948 | <para> | ||
3949 | This property is useful in busy systems. The HTTP server | ||
3950 | will start queuing new requests if this limit is hit, instead | ||
3951 | of trying to process all incoming requests directly. | ||
3952 | </para> | ||
3953 | <para> | ||
3954 | The default number if allowed simultaneous requests are 10. | ||
3955 | </para> | ||
3956 | </remarks> | ||
3957 | </member> | 4036 | </member> |
3958 | <member name="P:HttpServer.HttpServer.MaxQueueSize"> | 4037 | <member name="F:HttpServer.LogPrio.Fatal"> |
3959 | <summary> | 4038 | <summary> |
3960 | Gets or sets maximum number of requests queuing to be handled. | 4039 | Something failed, and we cannot handle it properly. |
3961 | </summary> | 4040 | </summary> |
3962 | <remarks> | ||
3963 | <para> | ||
3964 | The WebServer will start turning requests away if response code | ||
3965 | <see cref="F:System.Net.HttpStatusCode.ServiceUnavailable"/> to indicate that the server | ||
3966 | is too busy to be able to handle the request. | ||
3967 | </para> | ||
3968 | </remarks> | ||
3969 | </member> | 4041 | </member> |
3970 | <member name="E:HttpServer.HttpServer.RealmWanted"> | 4042 | <member name="T:HttpServer.ILogWriter"> |
3971 | <summary> | 4043 | <summary> |
3972 | Realms are used during HTTP authentication. | 4044 | Interface used to write to log files. |
3973 | Default realm is same as server name. | ||
3974 | </summary> | 4045 | </summary> |
3975 | </member> | 4046 | </member> |
3976 | <member name="E:HttpServer.HttpServer.ExceptionThrown"> | 4047 | <member name="M:HttpServer.ILogWriter.Write(System.Object,HttpServer.LogPrio,System.String)"> |
3977 | <summary> | 4048 | <summary> |
3978 | Let's to receive unhandled exceptions from the threads. | 4049 | Write an entry to the log file. |
3979 | </summary> | 4050 | </summary> |
3980 | <remarks> | 4051 | <param name="source">object that is writing to the log</param> |
3981 | Exceptions will be thrown during debug mode if this event is not used, | 4052 | <param name="priority">importance of the log message</param> |
3982 | exceptions will be printed to console and suppressed during release mode. | 4053 | <param name="message">the message</param> |
3983 | </remarks> | ||
3984 | </member> | 4054 | </member> |
3985 | <member name="T:HttpServer.Exceptions.UnauthorizedException"> | 4055 | <member name="T:HttpServer.ConsoleLogWriter"> |
3986 | <summary> | 4056 | <summary> |
3987 | The request requires user authentication. The response MUST include a | 4057 | This class writes to the console. It colors the output depending on the logprio and includes a 3-level stacktrace (in debug mode) |
3988 | WWW-Authenticate header field (section 14.47) containing a challenge | ||
3989 | applicable to the requested resource. | ||
3990 | |||
3991 | The client MAY repeat the request with a suitable Authorization header | ||
3992 | field (section 14.8). If the request already included Authorization | ||
3993 | credentials, then the 401 response indicates that authorization has been | ||
3994 | refused for those credentials. If the 401 response contains the same challenge | ||
3995 | as the prior response, and the user agent has already attempted authentication | ||
3996 | at least once, then the user SHOULD be presented the entity that was given in the response, | ||
3997 | since that entity might include relevant diagnostic information. | ||
3998 | |||
3999 | HTTP access authentication is explained in rfc2617: | ||
4000 | http://www.ietf.org/rfc/rfc2617.txt | ||
4001 | |||
4002 | (description is taken from | ||
4003 | http://www.submissionchamber.com/help-guides/error-codes.php#sec10.4.2) | ||
4004 | </summary> | 4058 | </summary> |
4059 | <seealso cref="T:HttpServer.ILogWriter"/> | ||
4005 | </member> | 4060 | </member> |
4006 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor"> | 4061 | <member name="F:HttpServer.ConsoleLogWriter.Instance"> |
4007 | <summary> | 4062 | <summary> |
4008 | Create a new unauhtorized exception. | 4063 | The actual instance of this class. |
4009 | </summary> | 4064 | </summary> |
4010 | <seealso cref="T:HttpServer.Exceptions.UnauthorizedException"/> | ||
4011 | </member> | 4065 | </member> |
4012 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor(System.String,System.Exception)"> | 4066 | <member name="M:HttpServer.ConsoleLogWriter.Write(System.Object,HttpServer.LogPrio,System.String)"> |
4013 | <summary> | 4067 | <summary> |
4014 | Create a new unauhtorized exception. | 4068 | Logwriters the specified source. |
4015 | </summary> | 4069 | </summary> |
4016 | <param name="message">reason to why the request was unauthorized.</param> | 4070 | <param name="source">object that wrote the logentry.</param> |
4017 | <param name="inner">inner exception</param> | 4071 | <param name="prio">Importance of the log message</param> |
4072 | <param name="message">The message.</param> | ||
4018 | </member> | 4073 | </member> |
4019 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor(System.String)"> | 4074 | <member name="M:HttpServer.ConsoleLogWriter.GetColor(HttpServer.LogPrio)"> |
4020 | <summary> | 4075 | <summary> |
4021 | Create a new unauhtorized exception. | 4076 | Get color for the specified logprio |
4022 | </summary> | 4077 | </summary> |
4023 | <param name="message">reason to why the request was unauthorized.</param> | 4078 | <param name="prio">prio for the log entry</param> |
4079 | <returns>A <see cref="T:System.ConsoleColor"/> for the prio</returns> | ||
4024 | </member> | 4080 | </member> |
4025 | <member name="T:HttpServer.ContentType"> | 4081 | <member name="T:HttpServer.NullLogWriter"> |
4026 | <summary> | 4082 | <summary> |
4027 | Lists content type mime types. | 4083 | Default log writer, writes everything to null (nowhere). |
4028 | </summary> | 4084 | </summary> |
4085 | <seealso cref="T:HttpServer.ILogWriter"/> | ||
4029 | </member> | 4086 | </member> |
4030 | <member name="F:HttpServer.ContentType.Text"> | 4087 | <member name="F:HttpServer.NullLogWriter.Instance"> |
4031 | <summary> | 4088 | <summary> |
4032 | text/plain | 4089 | The logging instance. |
4033 | </summary> | 4090 | </summary> |
4034 | </member> | 4091 | </member> |
4035 | <member name="F:HttpServer.ContentType.Html"> | 4092 | <member name="M:HttpServer.NullLogWriter.Write(System.Object,HttpServer.LogPrio,System.String)"> |
4036 | <summary> | 4093 | <summary> |
4037 | text/haml | 4094 | Writes everything to null |
4038 | </summary> | 4095 | </summary> |
4096 | <param name="source">object that wrote the log entry.</param> | ||
4097 | <param name="prio">Importance of the log message</param> | ||
4098 | <param name="message">The message.</param> | ||
4039 | </member> | 4099 | </member> |
4040 | <member name="F:HttpServer.ContentType.Javascript"> | 4100 | <member name="T:HttpServer.HttpResponse"> |
4041 | <summary> | 4101 | <summary> |
4042 | content type for javascript documents = application/javascript | 4102 | Response that is sent back to the web browser / client. |
4043 | </summary> | 4103 | </summary> |
4044 | <remarks> | 4104 | <remarks> |
4045 | <para> | 4105 | <para> |
4046 | RFC 4329 states that text/javascript have been superseeded by | 4106 | A response can be sent if different ways. The easiest one is |
4047 | application/javascript. You might still want to check browser versions | 4107 | to just fill the Body stream with content, everything else |
4048 | since older ones do not support application/javascript. | 4108 | will then be taken care of by the framework. The default content-type |
4109 | is text/html, you should change it if you send anything else. | ||
4110 | </para><para> | ||
4111 | The second and slightly more complex way is to send the response | ||
4112 | as parts. Start with sending the header using the SendHeaders method and | ||
4113 | then you can send the body using SendBody method, but do not forget | ||
4114 | to set <see cref="P:HttpServer.HttpResponse.ContentType"/> and <see cref="P:HttpServer.HttpResponse.ContentLength"/> before doing so. | ||
4049 | </para> | 4115 | </para> |
4050 | <para>Browser support: http://krijnhoetmer.nl/stuff/javascript/mime-types/</para> | ||
4051 | </remarks> | 4116 | </remarks> |
4117 | <example> | ||
4118 | <code> | ||
4119 | // Example using response body. | ||
4120 | class MyModule : HttpModule | ||
4121 | { | ||
4122 | public override bool Process(IHttpRequest request, IHttpResponse response, IHttpSession session) | ||
4123 | { | ||
4124 | StreamWriter writer = new StreamWriter(response.Body); | ||
4125 | writer.WriteLine("Hello dear World!"); | ||
4126 | writer.Flush(); | ||
4127 | |||
4128 | // return true to tell webserver that we've handled the url | ||
4129 | return true; | ||
4130 | } | ||
4131 | } | ||
4132 | </code> | ||
4133 | </example> | ||
4134 | todo: add two examples, using SendHeaders/SendBody and just the Body stream. | ||
4052 | </member> | 4135 | </member> |
4053 | <member name="F:HttpServer.ContentType.Xml"> | 4136 | <member name="M:HttpServer.HttpResponse.#ctor(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> |
4054 | <summary> | 4137 | <summary> |
4055 | text/xml | 4138 | Initializes a new instance of the <see cref="T:HttpServer.IHttpResponse"/> class. |
4056 | </summary> | 4139 | </summary> |
4140 | <param name="context">Client that send the <see cref="T:HttpServer.IHttpRequest"/>.</param> | ||
4141 | <param name="request">Contains information of what the client want to receive.</param> | ||
4142 | <exception cref="T:System.ArgumentException"><see cref="P:HttpServer.IHttpRequest.HttpVersion"/> cannot be empty.</exception> | ||
4057 | </member> | 4143 | </member> |
4058 | <member name="T:HttpServer.ContentTypes"> | 4144 | <member name="M:HttpServer.HttpResponse.#ctor(HttpServer.IHttpClientContext,System.String,HttpServer.ConnectionType)"> |
4059 | <summary> | 4145 | <summary> |
4060 | A list of content types | 4146 | Initializes a new instance of the <see cref="T:HttpServer.IHttpResponse"/> class. |
4061 | </summary> | 4147 | </summary> |
4148 | <param name="context">Client that send the <see cref="T:HttpServer.IHttpRequest"/>.</param> | ||
4149 | <param name="httpVersion">Version of HTTP protocol that the client uses.</param> | ||
4150 | <param name="connectionType">Type of HTTP connection used.</param> | ||
4062 | </member> | 4151 | </member> |
4063 | <member name="M:HttpServer.ContentTypes.#ctor(System.String)"> | 4152 | <member name="M:HttpServer.HttpResponse.AddHeader(System.String,System.String)"> |
4064 | <summary> | 4153 | <summary> |
4065 | 4154 | Add another header to the document. | |
4066 | </summary> | 4155 | </summary> |
4067 | <param name="types">Semicolon separated content types.</param> | 4156 | <param name="name">Name of the header, case sensitive, use lower cases.</param> |
4157 | <param name="value">Header values can span over multiple lines as long as each line starts with a white space. New line chars should be \r\n</param> | ||
4158 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
4159 | <exception cref="T:System.ArgumentException">If value conditions have not been met.</exception> | ||
4160 | <remarks>Adding any header will override the default ones and those specified by properties.</remarks> | ||
4068 | </member> | 4161 | </member> |
4069 | <member name="M:HttpServer.ContentTypes.GetEnumerator"> | 4162 | <member name="M:HttpServer.HttpResponse.Send"> |
4070 | <summary> | 4163 | <summary> |
4071 | Returns an enumerator that iterates through a collection. | 4164 | Send headers and body to the browser. |
4072 | </summary> | 4165 | </summary> |
4073 | <returns> | 4166 | <exception cref="T:System.InvalidOperationException">If content have already been sent.</exception> |
4074 | An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection. | ||
4075 | </returns> | ||
4076 | </member> | 4167 | </member> |
4077 | <member name="M:HttpServer.ContentTypes.Contains(System.String)"> | 4168 | <member name="M:HttpServer.HttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)"> |
4078 | <summary> | 4169 | <summary> |
4079 | Searches for the specified type | 4170 | Make sure that you have specified <see cref="P:HttpServer.HttpResponse.ContentLength"/> and sent the headers first. |
4080 | </summary> | 4171 | </summary> |
4081 | <param name="type">Can also be a part of a type (searching for "xml" would return true for "application/xml").</param> | 4172 | <param name="buffer"></param> |
4082 | <returns>true if type was found.</returns> | 4173 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> |
4174 | <see cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
4175 | <param name="offset">offset of first byte to send</param> | ||
4176 | <param name="count">number of bytes to send.</param> | ||
4177 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
4178 | <seealso cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
4179 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
4180 | is recommended for larger files to keep the memory usage low.</remarks> | ||
4083 | </member> | 4181 | </member> |
4084 | <member name="P:HttpServer.ContentTypes.First"> | 4182 | <member name="M:HttpServer.HttpResponse.SendBody(System.Byte[])"> |
4085 | <summary> | 4183 | <summary> |
4086 | Get this first content type. | 4184 | Make sure that you have specified <see cref="P:HttpServer.HttpResponse.ContentLength"/> and sent the headers first. |
4087 | </summary> | 4185 | </summary> |
4186 | <param name="buffer"></param> | ||
4187 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | ||
4188 | <see cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
4189 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
4190 | <seealso cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
4191 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
4192 | is recommended for larger files to keep the memory usage low.</remarks> | ||
4088 | </member> | 4193 | </member> |
4089 | <member name="P:HttpServer.ContentTypes.Item(System.String)"> | 4194 | <member name="M:HttpServer.HttpResponse.SendHeaders"> |
4090 | <summary> | 4195 | <summary> |
4091 | Fetch a content type | 4196 | Send headers to the client. |
4092 | </summary> | 4197 | </summary> |
4093 | <param name="type">Part of type ("xml" would return "application/xml")</param> | 4198 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> |
4094 | <returns></returns> | 4199 | <seealso cref="M:HttpServer.HttpResponse.AddHeader(System.String,System.String)"/> |
4095 | <remarks>All content types are in lower case.</remarks> | 4200 | <seealso cref="M:HttpServer.HttpResponse.Send"/> |
4201 | <seealso cref="M:HttpServer.HttpResponse.SendBody(System.Byte[])"/> | ||
4096 | </member> | 4202 | </member> |
4097 | <member name="T:HttpServer.Sessions.MemorySessionStore"> | 4203 | <member name="M:HttpServer.HttpResponse.Redirect(System.Uri)"> |
4098 | <summary> | 4204 | <summary> |
4099 | Session store using memory for each session. | 4205 | Redirect client to somewhere else using the 302 status code. |
4100 | </summary> | 4206 | </summary> |
4207 | <param name="uri">Destination of the redirect</param> | ||
4208 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
4209 | <remarks>You can not do anything more with the request when a redirect have been done. This should be your last | ||
4210 | action.</remarks> | ||
4101 | </member> | 4211 | </member> |
4102 | <member name="M:HttpServer.Sessions.MemorySessionStore.#ctor"> | 4212 | <member name="M:HttpServer.HttpResponse.Redirect(System.String)"> |
4103 | <summary> | 4213 | <summary> |
4104 | Initializes the class setting the expirationtimer to clean the session every minute | 4214 | redirect to somewhere |
4105 | </summary> | 4215 | </summary> |
4216 | <param name="url">where the redirect should go</param> | ||
4217 | <remarks> | ||
4218 | No body are allowed when doing redirects. | ||
4219 | </remarks> | ||
4106 | </member> | 4220 | </member> |
4107 | <member name="M:HttpServer.Sessions.MemorySessionStore.Cleanup(System.Object)"> | 4221 | <member name="P:HttpServer.HttpResponse.Body"> |
4108 | <summary> | 4222 | <summary> |
4109 | Delegate for the cleanup timer | 4223 | The body stream is used to cache the body contents |
4224 | before sending everything to the client. It's the simplest | ||
4225 | way to serve documents. | ||
4110 | </summary> | 4226 | </summary> |
4111 | </member> | 4227 | </member> |
4112 | <member name="M:HttpServer.Sessions.MemorySessionStore.Create"> | 4228 | <member name="P:HttpServer.HttpResponse.Chunked"> |
4113 | <summary> | 4229 | <summary> |
4114 | Creates a new http session | 4230 | The chunked encoding modifies the body of a message in order to |
4231 | transfer it as a series of chunks, each with its own size indicator, | ||
4232 | followed by an OPTIONAL trailer containing entity-header fields. This | ||
4233 | allows dynamically produced content to be transferred along with the | ||
4234 | information necessary for the recipient to verify that it has | ||
4235 | received the full message. | ||
4115 | </summary> | 4236 | </summary> |
4116 | <returns></returns> | ||
4117 | </member> | 4237 | </member> |
4118 | <member name="M:HttpServer.Sessions.MemorySessionStore.Create(System.String)"> | 4238 | <member name="P:HttpServer.HttpResponse.ProtocolVersion"> |
4119 | <summary> | 4239 | <summary> |
4120 | Creates a new http session with a specific id | 4240 | Defines the version of the HTTP Response for applications where it's required |
4241 | for this to be forced. | ||
4121 | </summary> | 4242 | </summary> |
4122 | <param name="id">Id used to identify the new cookie..</param> | ||
4123 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object.</returns> | ||
4124 | <remarks> | ||
4125 | Id should be generated by the store implementation if it's null or <see cref="F:System.String.Empty"/>. | ||
4126 | </remarks> | ||
4127 | </member> | 4243 | </member> |
4128 | <member name="M:HttpServer.Sessions.MemorySessionStore.Load(System.String)"> | 4244 | <member name="P:HttpServer.HttpResponse.Connection"> |
4129 | <summary> | 4245 | <summary> |
4130 | Load an existing session. | 4246 | Kind of connection |
4131 | </summary> | 4247 | </summary> |
4132 | <param name="sessionId"></param> | ||
4133 | <returns></returns> | ||
4134 | </member> | 4248 | </member> |
4135 | <member name="M:HttpServer.Sessions.MemorySessionStore.Save(HttpServer.Sessions.IHttpSession)"> | 4249 | <member name="P:HttpServer.HttpResponse.Encoding"> |
4136 | <summary> | 4250 | <summary> |
4137 | Save an updated session to the store. | 4251 | Encoding to use when sending stuff to the client. |
4138 | </summary> | 4252 | </summary> |
4139 | <param name="session"></param> | 4253 | <remarks>Default is UTF8</remarks> |
4140 | </member> | 4254 | </member> |
4141 | <member name="M:HttpServer.Sessions.MemorySessionStore.AddUnused(HttpServer.Sessions.IHttpSession)"> | 4255 | <member name="P:HttpServer.HttpResponse.KeepAlive"> |
4142 | <summary> | 4256 | <summary> |
4143 | We use the flyweight pattern which reuses small objects | 4257 | Number of seconds to keep connection alive |
4144 | instead of creating new each time. | ||
4145 | </summary> | 4258 | </summary> |
4146 | <param name="session">EmptyLanguageNode (unused) session that should be reused next time Create is called.</param> | 4259 | <remarks>Only used if Connection property is set to <see cref="F:HttpServer.ConnectionType.KeepAlive"/>.</remarks> |
4147 | </member> | 4260 | </member> |
4148 | <member name="M:HttpServer.Sessions.MemorySessionStore.Cleanup"> | 4261 | <member name="P:HttpServer.HttpResponse.Status"> |
4149 | <summary> | 4262 | <summary> |
4150 | Remove expired sessions | 4263 | Status code that is sent to the client. |
4151 | </summary> | 4264 | </summary> |
4265 | <remarks>Default is <see cref="F:System.Net.HttpStatusCode.OK"/></remarks> | ||
4152 | </member> | 4266 | </member> |
4153 | <member name="M:HttpServer.Sessions.MemorySessionStore.Remove(System.String)"> | 4267 | <member name="P:HttpServer.HttpResponse.Reason"> |
4154 | <summary> | 4268 | <summary> |
4155 | Remove a session | 4269 | Information about why a specific status code was used. |
4156 | </summary> | 4270 | </summary> |
4157 | <param name="sessionId">id of the session.</param> | ||
4158 | </member> | 4271 | </member> |
4159 | <member name="P:HttpServer.Sessions.MemorySessionStore.Item(System.String)"> | 4272 | <member name="P:HttpServer.HttpResponse.ContentLength"> |
4160 | <summary> | 4273 | <summary> |
4161 | Load a session from the store | 4274 | Size of the body. MUST be specified before sending the header, |
4275 | unless property Chunked is set to true. | ||
4162 | </summary> | 4276 | </summary> |
4163 | <param name="sessionId"></param> | ||
4164 | <returns>null if session is not found.</returns> | ||
4165 | </member> | 4277 | </member> |
4166 | <member name="P:HttpServer.Sessions.MemorySessionStore.ExpireTime"> | 4278 | <member name="P:HttpServer.HttpResponse.ContentType"> |
4167 | <summary> | 4279 | <summary> |
4168 | Number of minutes before a session expires. | 4280 | Kind of content in the body |
4169 | Default is 20 minutes. | ||
4170 | </summary> | 4281 | </summary> |
4282 | <remarks>Default type is "text/html"</remarks> | ||
4171 | </member> | 4283 | </member> |
4172 | <member name="T:HttpServer.Helpers.WebHelper"> | 4284 | <member name="P:HttpServer.HttpResponse.HeadersSent"> |
4173 | <summary> | 4285 | <summary> |
4174 | Webhelper provides helpers for common tasks in HTML. | 4286 | Headers have been sent to the client- |
4175 | </summary> | 4287 | </summary> |
4288 | <remarks>You can not send any additional headers if they have already been sent.</remarks> | ||
4176 | </member> | 4289 | </member> |
4177 | <member name="F:HttpServer.Helpers.WebHelper.JSImplementation"> | 4290 | <member name="P:HttpServer.HttpResponse.Sent"> |
4178 | <summary> | 4291 | <summary> |
4179 | Used to let the website use different javascript libraries. | 4292 | The whole response have been sent. |
4180 | Default is <see cref="T:HttpServer.Helpers.Implementations.PrototypeImp"/> | ||
4181 | </summary> | 4293 | </summary> |
4182 | </member> | 4294 | </member> |
4183 | <member name="M:HttpServer.Helpers.WebHelper.AjaxRequest(System.String,System.String,System.String[])"> | 4295 | <member name="P:HttpServer.HttpResponse.Cookies"> |
4184 | <summary> | 4296 | <summary> |
4185 | Creates a link that invokes through ajax. | 4297 | Cookies that should be created/changed. |
4186 | </summary> | 4298 | </summary> |
4187 | <param name="url">url to fetch</param> | ||
4188 | <param name="title">link title</param> | ||
4189 | <param name="options"> | ||
4190 | optional options in format "key, value, key, value". | ||
4191 | Javascript options starts with ':'. | ||
4192 | </param> | ||
4193 | <returns>a link tag</returns> | ||
4194 | <example> | ||
4195 | WebHelper.AjaxRequest("/users/add/", "Add user", "method:", "post", "onclick", "validate('this');"); | ||
4196 | </example> | ||
4197 | </member> | 4299 | </member> |
4198 | <member name="M:HttpServer.Helpers.WebHelper.AjaxUpdater(System.String,System.String,System.String,System.String[])"> | 4300 | <member name="T:HttpServer.Exceptions.NotFoundException"> |
4199 | <summary> | 4301 | <summary> |
4200 | Builds a link that updates an element with the fetched ajax content. | 4302 | The requested resource was not found in the web server. |
4201 | </summary> | 4303 | </summary> |
4202 | <param name="url">Url to fetch content from</param> | ||
4203 | <param name="title">link title</param> | ||
4204 | <param name="targetId">html element to update with the results of the ajax request.</param> | ||
4205 | <param name="options">optional options in format "key, value, key, value"</param> | ||
4206 | <returns>A link tag.</returns> | ||
4207 | </member> | 4304 | </member> |
4208 | <member name="M:HttpServer.Helpers.WebHelper.DialogLink(System.String,System.String,System.String[])"> | 4305 | <member name="M:HttpServer.Exceptions.NotFoundException.#ctor(System.String,System.Exception)"> |
4209 | <summary> | 4306 | <summary> |
4210 | A link that pop ups a Dialog (overlay div) | 4307 | Create a new exception |
4211 | </summary> | 4308 | </summary> |
4212 | <param name="url">url to contents of dialog</param> | 4309 | <param name="message">message describing the error</param> |
4213 | <param name="title">link title</param> | 4310 | <param name="inner">inner exception</param> |
4214 | <param name="htmlAttributes">name/value of html attributes.</param> | ||
4215 | <returns>A "a"-tag that popups a dialog when clicked</returns> | ||
4216 | <example> | ||
4217 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); | ||
4218 | </example> | ||
4219 | </member> | 4311 | </member> |
4220 | <member name="M:HttpServer.Helpers.WebHelper.CreateDialog(System.String,System.String,System.String[])"> | 4312 | <member name="M:HttpServer.Exceptions.NotFoundException.#ctor(System.String)"> |
4221 | <summary> | 4313 | <summary> |
4222 | Create/Open a dialog box using ajax | 4314 | Create a new exception |
4223 | </summary> | 4315 | </summary> |
4224 | <param name="url"></param> | 4316 | <param name="message">message describing the error</param> |
4225 | <param name="title"></param> | ||
4226 | <param name="parameters"></param> | ||
4227 | <returns></returns> | ||
4228 | </member> | 4317 | </member> |
4229 | <member name="M:HttpServer.Helpers.WebHelper.CloseDialog"> | 4318 | <member name="T:HttpServer.Sessions.MemorySessionStore"> |
4230 | <summary> | 4319 | <summary> |
4231 | Close a javascript dialog window/div. | 4320 | Session store using memory for each session. |
4232 | </summary> | 4321 | </summary> |
4233 | <returns>javascript for closing a dialog.</returns> | ||
4234 | <see cref="M:HttpServer.Helpers.WebHelper.DialogLink(System.String,System.String,System.String[])"/> | ||
4235 | </member> | 4322 | </member> |
4236 | <member name="M:HttpServer.Helpers.WebHelper.FormStart(System.String,System.String,System.Boolean)"> | 4323 | <member name="T:HttpServer.Sessions.IHttpSessionStore"> |
4237 | <summary> | 4324 | <summary> |
4238 | Create a <form> tag. | 4325 | A session store is used to store and load sessions on a media. |
4326 | The default implementation (<see cref="T:HttpServer.Sessions.MemorySessionStore"/>) saves/retrieves sessions from memory. | ||
4239 | </summary> | 4327 | </summary> |
4240 | <param name="name">name of form</param> | ||
4241 | <param name="action">action to invoke on submit</param> | ||
4242 | <param name="isAjax">form should be posted as ajax</param> | ||
4243 | <returns>html code</returns> | ||
4244 | <example> | ||
4245 | WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax); | ||
4246 | </example> | ||
4247 | </member> | 4328 | </member> |
4248 | <member name="M:HttpServer.Helpers.WebHelper.Link(System.String,System.String,System.String[])"> | 4329 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Create"> |
4249 | <summary> | 4330 | <summary> |
4250 | Create a link tag. | 4331 | Creates a new http session with a generated id. |
4251 | </summary> | 4332 | </summary> |
4252 | <param name="url">url to go to</param> | 4333 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object</returns> |
4253 | <param name="title">link title (text that is displayed)</param> | ||
4254 | <param name="htmlAttributes">html attributes, name, value, name, value</param> | ||
4255 | <returns>html code</returns> | ||
4256 | <example> | ||
4257 | WebHelper.Link("/user/show/1", "Show user", "id", "showUser", "onclick", "return confirm('Are you shure?');"); | ||
4258 | </example> | ||
4259 | </member> | 4334 | </member> |
4260 | <member name="M:HttpServer.Helpers.WebHelper.BuildLink(System.String,System.String,System.String[])"> | 4335 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Create(System.String)"> |
4261 | <summary> | 4336 | <summary> |
4262 | Build a link | 4337 | Creates a new http session with a specific id |
4263 | </summary> | 4338 | </summary> |
4264 | <param name="url">url to go to.</param> | 4339 | <param name="id">Id used to identify the new cookie..</param> |
4265 | <param name="title">title of link (displayed text)</param> | 4340 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object.</returns> |
4266 | <param name="htmlAttributes">extra html attributes.</param> | 4341 | <remarks> |
4267 | <returns>a complete link</returns> | 4342 | Id should be generated by the store implementation if it's null or <see cref="F:System.String.Empty"/>. |
4343 | </remarks> | ||
4268 | </member> | 4344 | </member> |
4269 | <member name="M:HttpServer.Helpers.WebHelper.BuildLink(System.String,System.String,System.String[],System.String[])"> | 4345 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Load(System.String)"> |
4270 | <summary> | 4346 | <summary> |
4271 | Build a link | 4347 | Load an existing session. |
4272 | </summary> | 4348 | </summary> |
4273 | <param name="url">url to go to.</param> | 4349 | <param name="sessionId">Session id (usually retrieved from a client side cookie).</param> |
4274 | <param name="title">title of link (displayed text)</param> | 4350 | <returns>A session if found; otherwise null.</returns> |
4275 | <param name="htmlAttributes">extra html attributes.</param> | ||
4276 | <returns>a complete link</returns> | ||
4277 | <param name="options">more options</param> | ||
4278 | </member> | 4351 | </member> |
4279 | <member name="M:HttpServer.Helpers.WebHelper.Select(System.String,System.Collections.ICollection,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> | 4352 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Save(HttpServer.Sessions.IHttpSession)"> |
4280 | <summary> | 4353 | <summary> |
4281 | Obsolete | 4354 | Save an updated session to the store. |
4282 | </summary> | 4355 | </summary> |
4283 | <param name="name">Obsolete</param> | 4356 | <param name="session">Session id (usually retrieved from a client side cookie).</param> |
4284 | <param name="collection">Obsolete</param> | 4357 | <exception cref="T:System.ArgumentException">If Id property have not been specified.</exception> |
4285 | <param name="getIdTitle">Obsolete</param> | ||
4286 | <param name="selectedValue">Obsolete</param> | ||
4287 | <param name="firstEmpty">Obsolete</param> | ||
4288 | <returns>Obsolete</returns> | ||
4289 | </member> | 4358 | </member> |
4290 | <member name="M:HttpServer.Helpers.WebHelper.Select(System.String,System.String,System.Collections.ICollection,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> | 4359 | <member name="M:HttpServer.Sessions.IHttpSessionStore.AddUnused(HttpServer.Sessions.IHttpSession)"> |
4291 | <summary> | 4360 | <summary> |
4292 | Obsolete | 4361 | We use the flyweight pattern which reuses small objects |
4362 | instead of creating new each time. | ||
4293 | </summary> | 4363 | </summary> |
4294 | <param name="name">Obsolete</param> | 4364 | <param name="session">Unused session that should be reused next time Create is called.</param> |
4295 | <param name="id">Obsolete</param> | ||
4296 | <param name="collection">Obsolete</param> | ||
4297 | <param name="getIdTitle">Obsolete</param> | ||
4298 | <param name="selectedValue">Obsolete</param> | ||
4299 | <param name="firstEmpty">Obsolete</param> | ||
4300 | <returns>Obsolete</returns> | ||
4301 | </member> | 4365 | </member> |
4302 | <member name="M:HttpServer.Helpers.WebHelper.List(System.Collections.Generic.IEnumerable{System.Object},System.String)"> | 4366 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Cleanup"> |
4303 | <summary> | 4367 | <summary> |
4304 | Render errors into a UL with class "errors" | 4368 | Remove expired sessions |
4305 | </summary> | 4369 | </summary> |
4306 | <param name="className">class used by UL-tag.</param> | ||
4307 | <param name="theList">items to list</param> | ||
4308 | <returns>an unordered html list.</returns> | ||
4309 | </member> | 4370 | </member> |
4310 | <member name="M:HttpServer.Helpers.WebHelper.List(System.Collections.Specialized.NameValueCollection,System.String)"> | 4371 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Remove(System.String)"> |
4311 | <summary> | 4372 | <summary> |
4312 | Render errors into a UL with class "errors" | 4373 | Remove a session |
4313 | </summary> | 4374 | </summary> |
4314 | <param name="className">class used by UL-tag.</param> | 4375 | <param name="sessionId">id of the session.</param> |
4315 | <param name="theList">items to list</param> | ||
4316 | <returns>an unordered html list.</returns> | ||
4317 | </member> | 4376 | </member> |
4318 | <member name="M:HttpServer.Helpers.WebHelper.Errors(System.Collections.Specialized.NameValueCollection)"> | 4377 | <member name="P:HttpServer.Sessions.IHttpSessionStore.Item(System.String)"> |
4319 | <summary> | 4378 | <summary> |
4320 | Render errors into a UL with class "errors" | 4379 | Load a session from the store |
4321 | </summary> | 4380 | </summary> |
4322 | <param name="errors"></param> | 4381 | <param name="sessionId"></param> |
4323 | <returns></returns> | 4382 | <returns>null if session is not found.</returns> |
4324 | </member> | 4383 | </member> |
4325 | <member name="M:HttpServer.Helpers.WebHelper.GenerateHtmlAttributes(System.Text.StringBuilder,System.String[],System.String[])"> | 4384 | <member name="P:HttpServer.Sessions.IHttpSessionStore.ExpireTime"> |
4326 | <summary> | 4385 | <summary> |
4327 | Generates a list with html attributes. | 4386 | Number of minutes before a session expires. |
4328 | </summary> | 4387 | </summary> |
4329 | <param name="sb">StringBuilder that the options should be added to.</param> | 4388 | <value>Default time is 20 minutes.</value> |
4330 | <param name="firstOptions">attributes set by user.</param> | ||
4331 | <param name="secondOptions">attributes set by any of the helper classes.</param> | ||
4332 | </member> | 4389 | </member> |
4333 | <member name="M:HttpServer.Helpers.WebHelper.GenerateHtmlAttributes(System.Text.StringBuilder,System.String[])"> | 4390 | <member name="M:HttpServer.Sessions.MemorySessionStore.#ctor"> |
4334 | <summary> | 4391 | <summary> |
4335 | Generates a list with html attributes. | 4392 | Initializes the class setting the expirationtimer to clean the session every minute |
4336 | </summary> | 4393 | </summary> |
4337 | <param name="sb">StringBuilder that the options should be added to.</param> | ||
4338 | <param name="options"></param> | ||
4339 | </member> | 4394 | </member> |
4340 | <member name="T:HttpServer.Helpers.JavascriptHelperImplementation"> | 4395 | <member name="M:HttpServer.Sessions.MemorySessionStore.Cleanup(System.Object)"> |
4341 | <summary> | 4396 | <summary> |
4342 | Purpose of this class is to create a javascript toolkit independent javascript helper. | 4397 | Delegate for the cleanup timer |
4343 | </summary> | 4398 | </summary> |
4344 | </member> | 4399 | </member> |
4345 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.GenerateOptions(System.Text.StringBuilder,System.String[],System.Boolean)"> | 4400 | <member name="M:HttpServer.Sessions.MemorySessionStore.Create"> |
4346 | <summary> | 4401 | <summary> |
4347 | Generates a list with JS options. | 4402 | Creates a new http session |
4348 | </summary> | 4403 | </summary> |
4349 | <param name="sb">StringBuilder that the options should be added to.</param> | 4404 | <returns></returns> |
4350 | <param name="options">the javascript options. name, value pairs. each string value should be escaped by YOU!</param> | ||
4351 | <param name="startWithComma">true if we should start with a comma.</param> | ||
4352 | </member> | 4405 | </member> |
4353 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.RemoveJavascriptOptions(System.String[])"> | 4406 | <member name="M:HttpServer.Sessions.MemorySessionStore.Create(System.String)"> |
4354 | <summary> | 4407 | <summary> |
4355 | Removes any javascript parameters from an array of parameters | 4408 | Creates a new http session with a specific id |
4356 | </summary> | 4409 | </summary> |
4357 | <param name="options">The array of parameters to remove javascript params from</param> | 4410 | <param name="id">Id used to identify the new cookie..</param> |
4358 | <returns>An array of html parameters</returns> | 4411 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object.</returns> |
4412 | <remarks> | ||
4413 | Id should be generated by the store implementation if it's null or <see cref="F:System.String.Empty"/>. | ||
4414 | </remarks> | ||
4359 | </member> | 4415 | </member> |
4360 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxFormOnSubmit(System.String[])"> | 4416 | <member name="M:HttpServer.Sessions.MemorySessionStore.Load(System.String)"> |
4361 | <summary> | 4417 | <summary> |
4362 | javascript action that should be added to the "onsubmit" event in the form tag. | 4418 | Load an existing session. |
4363 | </summary> | 4419 | </summary> |
4420 | <param name="sessionId"></param> | ||
4364 | <returns></returns> | 4421 | <returns></returns> |
4365 | <remarks>All javascript option names should end with colon.</remarks> | ||
4366 | <example> | ||
4367 | <code> | ||
4368 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | ||
4369 | </code> | ||
4370 | </example> | ||
4371 | </member> | 4422 | </member> |
4372 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxRequest(System.String,System.String[])"> | 4423 | <member name="M:HttpServer.Sessions.MemorySessionStore.Save(HttpServer.Sessions.IHttpSession)"> |
4373 | <summary> | 4424 | <summary> |
4374 | Requests a url through ajax | 4425 | Save an updated session to the store. |
4375 | </summary> | 4426 | </summary> |
4376 | <param name="url">url to fetch</param> | 4427 | <param name="session"></param> |
4377 | <param name="options">optional options in format "key, value, key, value", used in JS request object.</param> | ||
4378 | <returns>a link tag</returns> | ||
4379 | <remarks>All javascript option names should end with colon.</remarks> | ||
4380 | <example> | ||
4381 | <code> | ||
4382 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | ||
4383 | </code> | ||
4384 | </example> | ||
4385 | </member> | 4428 | </member> |
4386 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxUpdater(System.String,System.String,System.String[])"> | 4429 | <member name="M:HttpServer.Sessions.MemorySessionStore.AddUnused(HttpServer.Sessions.IHttpSession)"> |
4387 | <summary> | 4430 | <summary> |
4388 | Ajax requests that updates an element with | 4431 | We use the flyweight pattern which reuses small objects |
4389 | the fetched content | 4432 | instead of creating new each time. |
4390 | </summary> | 4433 | </summary> |
4391 | <param name="url">Url to fetch content from</param> | 4434 | <param name="session">EmptyLanguageNode (unused) session that should be reused next time Create is called.</param> |
4392 | <param name="targetId">element to update</param> | ||
4393 | <param name="options">optional options in format "key, value, key, value", used in JS updater object.</param> | ||
4394 | <returns>A link tag.</returns> | ||
4395 | <remarks>All javascript option names should end with colon.</remarks> | ||
4396 | <example> | ||
4397 | <code> | ||
4398 | JSHelper.AjaxUpdater("/user/show/1", "userInfo", "onsuccess:", "alert('Successful!');"); | ||
4399 | </code> | ||
4400 | </example> | ||
4401 | </member> | 4435 | </member> |
4402 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.DialogLink(System.String,System.String,System.String[])"> | 4436 | <member name="M:HttpServer.Sessions.MemorySessionStore.Cleanup"> |
4403 | <summary> | 4437 | <summary> |
4404 | A link that pop ups a Dialog (overlay div) | 4438 | Remove expired sessions |
4405 | </summary> | 4439 | </summary> |
4406 | <param name="url">url to contents of dialog</param> | ||
4407 | <param name="title">link title</param> | ||
4408 | <returns>A "a"-tag that popups a dialog when clicked</returns> | ||
4409 | <param name="htmlAttributes">name/value of html attributes</param> | ||
4410 | <example> | ||
4411 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); | ||
4412 | </example> | ||
4413 | </member> | 4440 | </member> |
4414 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.CloseDialog"> | 4441 | <member name="M:HttpServer.Sessions.MemorySessionStore.Remove(System.String)"> |
4415 | <summary> | 4442 | <summary> |
4416 | Close a javascript dialog window/div. | 4443 | Remove a session |
4417 | </summary> | 4444 | </summary> |
4418 | <returns>javascript for closing a dialog.</returns> | 4445 | <param name="sessionId">id of the session.</param> |
4419 | <see cref="M:HttpServer.Helpers.JavascriptHelperImplementation.DialogLink(System.String,System.String,System.String[])"/> | ||
4420 | </member> | 4446 | </member> |
4421 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.CreateDialog(System.String,System.String,System.String[])"> | 4447 | <member name="P:HttpServer.Sessions.MemorySessionStore.Item(System.String)"> |
4422 | <summary> | 4448 | <summary> |
4423 | Creates a new modal dialog window | 4449 | Load a session from the store |
4424 | </summary> | 4450 | </summary> |
4425 | <param name="url">url to open in window.</param> | 4451 | <param name="sessionId"></param> |
4426 | <param name="title">window title (may not be supported by all js implementations)</param> | 4452 | <returns>null if session is not found.</returns> |
4427 | <param name="options"></param> | ||
4428 | <returns></returns> | ||
4429 | </member> | 4453 | </member> |
4430 | <member name="M:HttpServer.FormDecoders.HttpMultipart.ReadLine"> | 4454 | <member name="P:HttpServer.Sessions.MemorySessionStore.ExpireTime"> |
4431 | <summary> | 4455 | <summary> |
4432 | 4456 | Number of minutes before a session expires. | |
4457 | Default is 20 minutes. | ||
4433 | </summary> | 4458 | </summary> |
4434 | <returns></returns> | ||
4435 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> | ||
4436 | <exception cref="T:System.ObjectDisposedException"></exception> | ||
4437 | </member> | 4459 | </member> |
4438 | <member name="T:HttpServer.FormDecoders.HttpMultipart.Element"> | 4460 | <member name="T:HttpServer.Sessions.HttpSessionClearedArgs"> |
4439 | <summary>Represents a field in a multipart form</summary> | ||
4440 | </member> | ||
4441 | <member name="T:HttpServer.Exceptions.BadRequestException"> | ||
4442 | <summary> | 4461 | <summary> |
4443 | The request could not be understood by the server due to malformed syntax. | 4462 | Arguments sent when a <see cref="T:HttpServer.Sessions.IHttpSession"/> is cleared |
4444 | The client SHOULD NOT repeat the request without modifications. | ||
4445 | |||
4446 | Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php | ||
4447 | </summary> | 4463 | </summary> |
4448 | </member> | 4464 | </member> |
4449 | <member name="M:HttpServer.Exceptions.BadRequestException.#ctor(System.String)"> | 4465 | <member name="M:HttpServer.Sessions.HttpSessionClearedArgs.#ctor(System.Boolean)"> |
4450 | <summary> | 4466 | <summary> |
4451 | Create a new bad request exception. | 4467 | Instantiates the arguments for the event |
4452 | </summary> | 4468 | </summary> |
4453 | <param name="errMsg">reason to why the request was bad.</param> | 4469 | <param name="expired">True if the session is cleared due to expiration</param> |
4454 | </member> | 4470 | </member> |
4455 | <member name="M:HttpServer.Exceptions.BadRequestException.#ctor(System.String,System.Exception)"> | 4471 | <member name="P:HttpServer.Sessions.HttpSessionClearedArgs.Expired"> |
4456 | <summary> | 4472 | <summary> |
4457 | Create a new bad request exception. | 4473 | Returns true if the session is cleared due to expiration |
4458 | </summary> | 4474 | </summary> |
4459 | <param name="errMsg">reason to why the request was bad.</param> | ||
4460 | <param name="inner">inner exception</param> | ||
4461 | </member> | 4475 | </member> |
4462 | <member name="T:HttpServer.HttpFile"> | 4476 | <member name="T:HttpServer.Sessions.HttpSessionClearedHandler"> |
4463 | <summary> | 4477 | <summary> |
4464 | Container class for posted files | 4478 | Delegate for when a IHttpSession is cleared |
4465 | </summary> | 4479 | </summary> |
4480 | <param name="session"><see cref="T:HttpServer.Sessions.IHttpSession"/> this is being cleared.</param> | ||
4481 | <param name="args">Arguments for the clearing</param> | ||
4466 | </member> | 4482 | </member> |
4467 | <member name="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String,System.String)"> | 4483 | <member name="T:HttpServer.RequestQueue"> |
4468 | <summary> | 4484 | <summary> |
4469 | Creates a container for a posted file | 4485 | Used to queue incoming requests. |
4470 | </summary> | 4486 | </summary> |
4471 | <param name="name">The identifier of the post field</param> | ||
4472 | <param name="filename">The file path</param> | ||
4473 | <param name="contentType">The content type of the file</param> | ||
4474 | <param name="uploadFilename">The name of the file uploaded</param> | ||
4475 | <exception cref="T:System.ArgumentNullException">If any parameter is null or empty</exception> | ||
4476 | </member> | 4487 | </member> |
4477 | <member name="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String)"> | 4488 | <member name="M:HttpServer.RequestQueue.#ctor(HttpServer.ProcessRequestHandler)"> |
4478 | <summary> | 4489 | <summary> |
4479 | Creates a container for a posted file <see cref="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String,System.String)"/> | 4490 | Initializes a new instance of the <see cref="T:HttpServer.RequestQueue"/> class. |
4480 | </summary> | 4491 | </summary> |
4481 | <exception cref="T:System.ArgumentNullException">If any parameter is null or empty</exception> | 4492 | <param name="handler">Called when a request should be processed.</param> |
4482 | </member> | ||
4483 | <member name="M:HttpServer.HttpFile.Finalize"> | ||
4484 | <summary>Destructor disposing the file</summary> | ||
4485 | </member> | 4493 | </member> |
4486 | <member name="M:HttpServer.HttpFile.Dispose(System.Boolean)"> | 4494 | <member name="M:HttpServer.RequestQueue.QueueThread"> |
4487 | <summary> | 4495 | <summary> |
4488 | Deletes the temporary file | 4496 | Used to process queued requests. |
4489 | </summary> | 4497 | </summary> |
4490 | <param name="disposing">True if manual dispose</param> | ||
4491 | </member> | 4498 | </member> |
4492 | <member name="M:HttpServer.HttpFile.Dispose"> | 4499 | <member name="P:HttpServer.RequestQueue.MaxRequestCount"> |
4493 | <summary> | 4500 | <summary> |
4494 | Disposing interface, cleans up managed resources (the temporary file) and suppresses finalization | 4501 | Gets or sets maximum number of allowed simultaneous requests. |
4495 | </summary> | 4502 | </summary> |
4496 | </member> | 4503 | </member> |
4497 | <member name="P:HttpServer.HttpFile.Name"> | 4504 | <member name="P:HttpServer.RequestQueue.MaxQueueSize"> |
4498 | <summary> | 4505 | <summary> |
4499 | The name/id of the file | 4506 | Gets or sets maximum number of requests queuing to be handled. |
4500 | </summary> | 4507 | </summary> |
4501 | </member> | 4508 | </member> |
4502 | <member name="P:HttpServer.HttpFile.Filename"> | 4509 | <member name="P:HttpServer.RequestQueue.CurrentRequestCount"> |
4503 | <summary> | 4510 | <summary> |
4504 | The full file path | 4511 | Specifies how many requests the HTTP server is currently processing. |
4505 | </summary> | 4512 | </summary> |
4506 | </member> | 4513 | </member> |
4507 | <member name="P:HttpServer.HttpFile.UploadFilename"> | 4514 | <member name="T:HttpServer.RequestQueue.QueueItem"> |
4508 | <summary> | 4515 | <summary> |
4509 | The name of the uploaded file | 4516 | Used two queue incoming requests to avoid |
4517 | thread starvation. | ||
4510 | </summary> | 4518 | </summary> |
4511 | </member> | 4519 | </member> |
4512 | <member name="P:HttpServer.HttpFile.ContentType"> | 4520 | <member name="T:HttpServer.ProcessRequestHandler"> |
4513 | <summary> | 4521 | <summary> |
4514 | The type of file | 4522 | Method used to process a queued request |
4515 | </summary> | 4523 | </summary> |
4524 | <param name="context">Context that the request was received from.</param> | ||
4525 | <param name="request">Request to process.</param> | ||
4516 | </member> | 4526 | </member> |
4517 | <member name="T:HttpServer.Helpers.JSHelper"> | 4527 | <member name="T:HttpServer.Parser.HeaderEventArgs"> |
4518 | <summary> | 4528 | <summary> |
4519 | Will contain helper functions for javascript. | 4529 | Event arguments used when a new header have been parsed. |
4520 | </summary> | 4530 | </summary> |
4521 | </member> | 4531 | </member> |
4522 | <member name="M:HttpServer.Helpers.JSHelper.AjaxRequest(System.String,System.String[])"> | 4532 | <member name="M:HttpServer.Parser.HeaderEventArgs.#ctor(System.String,System.String)"> |
4523 | <summary> | 4533 | <summary> |
4524 | Requests a url through ajax | 4534 | Initializes a new instance of the <see cref="T:HttpServer.Parser.HeaderEventArgs"/> class. |
4525 | </summary> | 4535 | </summary> |
4526 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | 4536 | <param name="name">Name of header.</param> |
4527 | <param name="options">optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.</param> | 4537 | <param name="value">Header value.</param> |
4528 | <returns>a link tag</returns> | ||
4529 | <remarks>onclick attribute is used by this method.</remarks> | ||
4530 | <example> | ||
4531 | <code> | ||
4532 | // plain text | ||
4533 | JSHelper.AjaxRequest("'/user/show/1'"); | ||
4534 | |||
4535 | // ajax request using this.href | ||
4536 | string link = "<a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/<call user</a>"; | ||
4537 | </code> | ||
4538 | </example> | ||
4539 | </member> | 4538 | </member> |
4540 | <member name="M:HttpServer.Helpers.JSHelper.AjaxUpdater(System.String,System.String,System.String[])"> | 4539 | <member name="M:HttpServer.Parser.HeaderEventArgs.#ctor"> |
4541 | <summary> | 4540 | <summary> |
4542 | Ajax requests that updates an element with | 4541 | Initializes a new instance of the <see cref="T:HttpServer.Parser.HeaderEventArgs"/> class. |
4543 | the fetched content | ||
4544 | </summary> | 4542 | </summary> |
4545 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | ||
4546 | <param name="targetId">element to update</param> | ||
4547 | <param name="options">options in format "key, value, key, value". All keys should end with colon.</param> | ||
4548 | <returns>A link tag.</returns> | ||
4549 | <example> | ||
4550 | <code> | ||
4551 | JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true"); | ||
4552 | </code> | ||
4553 | </example> | ||
4554 | </member> | 4543 | </member> |
4555 | <member name="M:HttpServer.Helpers.JSHelper.CreateDialog(System.String,System.String,System.String[])"> | 4544 | <member name="P:HttpServer.Parser.HeaderEventArgs.Name"> |
4556 | <summary> | 4545 | <summary> |
4557 | Opens contents in a dialog window. | 4546 | Gets or sets header name. |
4558 | </summary> | 4547 | </summary> |
4559 | <param name="url">url to contents of dialog</param> | ||
4560 | <param name="title">link title</param> | ||
4561 | <param name="options">name, value, name, value, all parameter names should end with colon.</param> | ||
4562 | </member> | 4548 | </member> |
4563 | <member name="M:HttpServer.Helpers.JSHelper.CloseDialog"> | 4549 | <member name="P:HttpServer.Parser.HeaderEventArgs.Value"> |
4564 | <summary> | 4550 | <summary> |
4565 | Close a javascript dialog window/div. | 4551 | Gets or sets header value. |
4566 | </summary> | 4552 | </summary> |
4567 | <returns>javascript for closing a dialog.</returns> | ||
4568 | <see cref="M:HttpServer.Helpers.JSHelper.CreateDialog(System.String,System.String,System.String[])"/> | ||
4569 | </member> | 4553 | </member> |
4570 | <member name="T:HttpServer.HttpRequest"> | 4554 | <member name="T:HttpServer.HttpRequest"> |
4571 | <summary> | 4555 | <summary> |
@@ -4743,34 +4727,108 @@ | |||
4743 | Gets cookies that was sent with the request. | 4727 | Gets cookies that was sent with the request. |
4744 | </summary> | 4728 | </summary> |
4745 | </member> | 4729 | </member> |
4746 | <member name="T:HttpServer.HttpModules.WebSiteModule"> | 4730 | <member name="M:HttpServer.ComponentProvider.AddInstance``1(System.Object)"> |
4747 | <summary> | 4731 | <summary> |
4748 | The website module let's you handle multiple websites in the same server. | 4732 | Add a component instance |
4749 | It uses the "Host" header to check which site you want. | ||
4750 | </summary> | 4733 | </summary> |
4751 | <remarks>It's recommended that you do not | 4734 | <typeparam name="T">Interface type</typeparam> |
4752 | add any other modules to HttpServer if you are using the website module. Instead, | 4735 | <param name="instance">Instance to add</param> |
4753 | add all wanted modules to each website.</remarks> | ||
4754 | </member> | 4736 | </member> |
4755 | <member name="M:HttpServer.HttpModules.WebSiteModule.#ctor(System.String,System.String)"> | 4737 | <member name="M:HttpServer.ComponentProvider.Get``1"> |
4756 | <summary> | 4738 | <summary> |
4757 | 4739 | Get a component. | |
4758 | </summary> | 4740 | </summary> |
4759 | <param name="host">domain name that should be handled.</param> | 4741 | <typeparam name="T">Interface type</typeparam> |
4760 | <param name="name"></param> | 4742 | <returns>Component if registered, otherwise null.</returns> |
4743 | <remarks> | ||
4744 | Component will get created if needed. | ||
4745 | </remarks> | ||
4761 | </member> | 4746 | </member> |
4762 | <member name="M:HttpServer.HttpModules.WebSiteModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 4747 | <member name="M:HttpServer.ComponentProvider.Create(HttpServer.ComponentProvider.TypeInformation)"> |
4748 | <exception cref="T:System.InvalidOperationException">If instance cannot be created.</exception> | ||
4749 | </member> | ||
4750 | <member name="M:HttpServer.ComponentProvider.Contains(System.Type)"> | ||
4763 | <summary> | 4751 | <summary> |
4764 | Method that process the url | 4752 | Checks if the specified component interface have been added. |
4765 | </summary> | 4753 | </summary> |
4766 | <param name="request">Information sent by the browser about the request</param> | 4754 | <param name="interfaceType"></param> |
4767 | <param name="response">Information that is being sent back to the client.</param> | 4755 | <returns>true if found; otherwise false.</returns> |
4768 | <param name="session">Session used to </param> | ||
4769 | </member> | 4756 | </member> |
4770 | <member name="P:HttpServer.HttpModules.WebSiteModule.SiteName"> | 4757 | <member name="M:HttpServer.ComponentProvider.Add``2"> |
4771 | <summary> | 4758 | <summary> |
4772 | Name of site. | 4759 | Add a component. |
4760 | </summary> | ||
4761 | <typeparam name="InterfaceType">Type being requested.</typeparam> | ||
4762 | <typeparam name="InstanceType">Type being created.</typeparam> | ||
4763 | <exception cref="T:System.InvalidOperationException">Type have already been mapped.</exception> | ||
4764 | </member> | ||
4765 | <member name="T:HttpServer.Rules.RegexRedirectRule"> | ||
4766 | <summary> | ||
4767 | Class to make dynamic binding of redirects. Instead of having to specify a number of similar redirect rules | ||
4768 | a regular expression can be used to identify redirect URLs and their targets. | ||
4769 | </summary> | ||
4770 | <example> | ||
4771 | <![CDATA[ | ||
4772 | new RegexRedirectRule("/(?<target>[a-z0-9]+)", "/users/${target}?find=true", RegexOptions.IgnoreCase) | ||
4773 | ]]> | ||
4774 | </example> | ||
4775 | </member> | ||
4776 | <member name="M:HttpServer.Rules.RegexRedirectRule.#ctor(System.String,System.String)"> | ||
4777 | <summary> | ||
4778 | Initializes a new instance of the <see cref="T:HttpServer.Rules.RegexRedirectRule"/> class. | ||
4779 | </summary> | ||
4780 | <param name="fromUrlExpression">Expression to match URL</param> | ||
4781 | <param name="toUrlExpression">Expression to generate URL</param> | ||
4782 | <example> | ||
4783 | <![CDATA[ | ||
4784 | server.Add(new RegexRedirectRule("/(?<first>[a-zA-Z0-9]+)", "/user/${first}")); | ||
4785 | Result of ie. /employee1 will then be /user/employee1 | ||
4786 | ]]> | ||
4787 | </example> | ||
4788 | </member> | ||
4789 | <member name="M:HttpServer.Rules.RegexRedirectRule.#ctor(System.String,System.String,System.Text.RegularExpressions.RegexOptions)"> | ||
4790 | <summary> | ||
4791 | Initializes a new instance of the <see cref="T:HttpServer.Rules.RegexRedirectRule"/> class. | ||
4792 | </summary> | ||
4793 | <param name="fromUrlExpression">Expression to match URL</param> | ||
4794 | <param name="toUrlExpression">Expression to generate URL</param> | ||
4795 | <param name="options">Regular expression options to use, can be null</param> | ||
4796 | <example> | ||
4797 | <![CDATA[ | ||
4798 | server.Add(new RegexRedirectRule("/(?<first>[a-zA-Z0-9]+)", "/user/{first}", RegexOptions.IgnoreCase)); | ||
4799 | Result of ie. /employee1 will then be /user/employee1 | ||
4800 | ]]> | ||
4801 | </example> | ||
4802 | </member> | ||
4803 | <member name="M:HttpServer.Rules.RegexRedirectRule.#ctor(System.String,System.String,System.Text.RegularExpressions.RegexOptions,System.Boolean)"> | ||
4804 | <summary> | ||
4805 | Initializes a new instance of the <see cref="T:HttpServer.Rules.RegexRedirectRule"/> class. | ||
4806 | </summary> | ||
4807 | <param name="fromUrlExpression">Expression to match URL</param> | ||
4808 | <param name="toUrlExpression">Expression to generate URL</param> | ||
4809 | <param name="options">Regular expression options to apply</param> | ||
4810 | <param name="shouldRedirect"><c>true</c> if request should be redirected, <c>false</c> if the request URI should be replaced.</param> | ||
4811 | <example> | ||
4812 | <![CDATA[ | ||
4813 | server.Add(new RegexRedirectRule("/(?<first>[a-zA-Z0-9]+)", "/user/${first}", RegexOptions.None)); | ||
4814 | Result of ie. /employee1 will then be /user/employee1 | ||
4815 | ]]> | ||
4816 | </example> | ||
4817 | <exception cref="T:System.ArgumentNullException">Argument is null.</exception> | ||
4818 | <seealso cref="P:HttpServer.Rules.RedirectRule.ShouldRedirect"/> | ||
4819 | </member> | ||
4820 | <member name="M:HttpServer.Rules.RegexRedirectRule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse)"> | ||
4821 | <summary> | ||
4822 | Process the incoming request. | ||
4773 | </summary> | 4823 | </summary> |
4824 | <param name="request">incoming HTTP request</param> | ||
4825 | <param name="response">outgoing HTTP response</param> | ||
4826 | <returns>true if response should be sent to the browser directly (no other rules or modules will be processed).</returns> | ||
4827 | <remarks> | ||
4828 | returning true means that no modules will get the request. Returning true is typically being done | ||
4829 | for redirects. | ||
4830 | </remarks> | ||
4831 | <exception cref="T:System.ArgumentNullException">If request or response is null</exception> | ||
4774 | </member> | 4832 | </member> |
4775 | <member name="T:HttpServer.Helpers.ResourceInfo"> | 4833 | <member name="T:HttpServer.Helpers.ResourceInfo"> |
4776 | <summary> | 4834 | <summary> |
@@ -4812,30 +4870,6 @@ | |||
4812 | <member name="P:HttpServer.Helpers.ResourceInfo.ResourceName"> | 4870 | <member name="P:HttpServer.Helpers.ResourceInfo.ResourceName"> |
4813 | <summary>Retrieves the full path name to the resource file</summary> | 4871 | <summary>Retrieves the full path name to the resource file</summary> |
4814 | </member> | 4872 | </member> |
4815 | <member name="T:HttpServer.RequestParserFactory"> | ||
4816 | <summary> | ||
4817 | Creates request parsers when needed. | ||
4818 | </summary> | ||
4819 | </member> | ||
4820 | <member name="T:HttpServer.IRequestParserFactory"> | ||
4821 | <summary> | ||
4822 | Creates request parsers when needed. | ||
4823 | </summary> | ||
4824 | </member> | ||
4825 | <member name="M:HttpServer.IRequestParserFactory.CreateParser(HttpServer.ILogWriter)"> | ||
4826 | <summary> | ||
4827 | Create a new request parser. | ||
4828 | </summary> | ||
4829 | <param name="logWriter">Used when logging should be enabled.</param> | ||
4830 | <returns>A new request parser.</returns> | ||
4831 | </member> | ||
4832 | <member name="M:HttpServer.RequestParserFactory.CreateParser(HttpServer.ILogWriter)"> | ||
4833 | <summary> | ||
4834 | Create a new request parser. | ||
4835 | </summary> | ||
4836 | <param name="logWriter">Used when logging should be enabled.</param> | ||
4837 | <returns>A new request parser.</returns> | ||
4838 | </member> | ||
4839 | <member name="T:HttpServer.Authentication.BasicAuthentication"> | 4873 | <member name="T:HttpServer.Authentication.BasicAuthentication"> |
4840 | <summary> | 4874 | <summary> |
4841 | The "basic" authentication scheme is based on the model that the | 4875 | The "basic" authentication scheme is based on the model that the |
@@ -4921,533 +4955,499 @@ | |||
4921 | Adding bytes to body | 4955 | Adding bytes to body |
4922 | </summary> | 4956 | </summary> |
4923 | </member> | 4957 | </member> |
4924 | <member name="T:HttpServer.FormDecoders.XmlDecoder"> | 4958 | <member name="T:HttpServer.Helpers.JSHelper"> |
4925 | <summary> | ||
4926 | This decoder converts XML documents to form items. | ||
4927 | Each element becomes a subitem in the form, and each attribute becomes an item. | ||
4928 | </summary> | ||
4929 | <example> | ||
4930 | // xml: <hello id="1">something<world id="2">data</world></hello> | ||
4931 | // result: | ||
4932 | // form["hello"].Value = "something" | ||
4933 | // form["hello"]["id"].Value = 1 | ||
4934 | // form["hello"]["world]["id"].Value = 1 | ||
4935 | // form["hello"]["world"].Value = "data" | ||
4936 | </example> | ||
4937 | <remarks> | ||
4938 | The original xml document is stored in form["__xml__"].Value. | ||
4939 | </remarks> | ||
4940 | </member> | ||
4941 | <member name="M:HttpServer.FormDecoders.XmlDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> | ||
4942 | <summary> | ||
4943 | |||
4944 | </summary> | ||
4945 | <param name="stream">Stream containing the content</param> | ||
4946 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
4947 | <param name="encoding">Stream encoding</param> | ||
4948 | Note: contentType and encoding are not used? | ||
4949 | <returns>A http form, or null if content could not be parsed.</returns> | ||
4950 | <exception cref="T:System.IO.InvalidDataException"></exception> | ||
4951 | </member> | ||
4952 | <member name="M:HttpServer.FormDecoders.XmlDecoder.TraverseNode(HttpServer.IHttpInput,System.Xml.XmlNode)"> | ||
4953 | <summary> | ||
4954 | Recursive function that will go through an xml element and store it's content | ||
4955 | to the form item. | ||
4956 | </summary> | ||
4957 | <param name="item">(parent) Item in form that content should be added to.</param> | ||
4958 | <param name="node">Node that should be parsed.</param> | ||
4959 | </member> | ||
4960 | <member name="M:HttpServer.FormDecoders.XmlDecoder.CanParse(System.String)"> | ||
4961 | <summary> | ||
4962 | Checks if the decoder can handle the mime type | ||
4963 | </summary> | ||
4964 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
4965 | <returns>True if the decoder can parse the specified content type</returns> | ||
4966 | </member> | ||
4967 | <member name="T:HttpServer.ResponseCookies"> | ||
4968 | <summary> | ||
4969 | Cookies that should be set. | ||
4970 | </summary> | ||
4971 | </member> | ||
4972 | <member name="M:HttpServer.ResponseCookies.Add(HttpServer.ResponseCookie)"> | ||
4973 | <summary> | 4959 | <summary> |
4974 | Adds a cookie in the collection. | 4960 | Will contain helper functions for javascript. |
4975 | </summary> | 4961 | </summary> |
4976 | <param name="cookie">cookie to add</param> | ||
4977 | <exception cref="T:System.ArgumentNullException">cookie is null</exception> | ||
4978 | </member> | 4962 | </member> |
4979 | <member name="M:HttpServer.ResponseCookies.Add(HttpServer.RequestCookie,System.DateTime)"> | 4963 | <member name="M:HttpServer.Helpers.JSHelper.AjaxRequest(System.String,System.String[])"> |
4980 | <summary> | 4964 | <summary> |
4981 | Copy a request cookie | 4965 | Requests a url through ajax |
4982 | </summary> | 4966 | </summary> |
4983 | <param name="cookie"></param> | 4967 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> |
4984 | <param name="expires">When the cookie should expire</param> | 4968 | <param name="options">optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.</param> |
4969 | <returns>a link tag</returns> | ||
4970 | <remarks>onclick attribute is used by this method.</remarks> | ||
4971 | <example> | ||
4972 | <code> | ||
4973 | // plain text | ||
4974 | JSHelper.AjaxRequest("'/user/show/1'"); | ||
4975 | |||
4976 | // ajax request using this.href | ||
4977 | string link = "<a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/<call user</a>"; | ||
4978 | </code> | ||
4979 | </example> | ||
4985 | </member> | 4980 | </member> |
4986 | <member name="M:HttpServer.ResponseCookies.GetEnumerator"> | 4981 | <member name="M:HttpServer.Helpers.JSHelper.AjaxUpdater(System.String,System.String,System.String[])"> |
4987 | <summary> | 4982 | <summary> |
4988 | Gets a collection enumerator on the cookie list. | 4983 | Ajax requests that updates an element with |
4984 | the fetched content | ||
4989 | </summary> | 4985 | </summary> |
4990 | <returns>collection enumerator</returns> | 4986 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> |
4987 | <param name="targetId">element to update</param> | ||
4988 | <param name="options">options in format "key, value, key, value". All keys should end with colon.</param> | ||
4989 | <returns>A link tag.</returns> | ||
4990 | <example> | ||
4991 | <code> | ||
4992 | JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true"); | ||
4993 | </code> | ||
4994 | </example> | ||
4991 | </member> | 4995 | </member> |
4992 | <member name="M:HttpServer.ResponseCookies.Clear"> | 4996 | <member name="M:HttpServer.Helpers.JSHelper.CreateDialog(System.String,System.String,System.String[])"> |
4993 | <summary> | 4997 | <summary> |
4994 | Remove all cookies | 4998 | Opens contents in a dialog window. |
4995 | </summary> | 4999 | </summary> |
5000 | <param name="url">url to contents of dialog</param> | ||
5001 | <param name="title">link title</param> | ||
5002 | <param name="options">name, value, name, value, all parameter names should end with colon.</param> | ||
4996 | </member> | 5003 | </member> |
4997 | <member name="M:HttpServer.ResponseCookies.System#Collections#Generic#IEnumerable{HttpServer#ResponseCookie}#GetEnumerator"> | 5004 | <member name="M:HttpServer.Helpers.JSHelper.CloseDialog"> |
4998 | <summary> | 5005 | <summary> |
4999 | Returns an enumerator that iterates through the collection. | 5006 | Close a javascript dialog window/div. |
5000 | </summary> | 5007 | </summary> |
5001 | 5008 | <returns>javascript for closing a dialog.</returns> | |
5002 | <returns> | 5009 | <see cref="M:HttpServer.Helpers.JSHelper.CreateDialog(System.String,System.String,System.String[])"/> |
5003 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | ||
5004 | </returns> | ||
5005 | <filterpriority>1</filterpriority> | ||
5006 | </member> | 5010 | </member> |
5007 | <member name="P:HttpServer.ResponseCookies.Count"> | 5011 | <member name="T:HttpServer.ContentType"> |
5008 | <summary> | 5012 | <summary> |
5009 | Gets the count of cookies in the collection. | 5013 | Lists content type mime types. |
5010 | </summary> | 5014 | </summary> |
5011 | </member> | 5015 | </member> |
5012 | <member name="P:HttpServer.ResponseCookies.Item(System.String)"> | 5016 | <member name="F:HttpServer.ContentType.Text"> |
5013 | <summary> | 5017 | <summary> |
5014 | Gets the cookie of a given identifier (null if not existing). | 5018 | text/plain |
5015 | </summary> | 5019 | </summary> |
5016 | </member> | 5020 | </member> |
5017 | <member name="T:HttpServer.RequestCookies"> | 5021 | <member name="F:HttpServer.ContentType.Html"> |
5018 | <summary> | 5022 | <summary> |
5019 | This class is created as a wrapper, since there are two different cookie types in .Net (Cookie and HttpCookie). | 5023 | text/haml |
5020 | The framework might switch class in the future and we dont want to have to replace all instances | ||
5021 | </summary> | 5024 | </summary> |
5022 | </member> | 5025 | </member> |
5023 | <member name="M:HttpServer.RequestCookies.#ctor(System.String)"> | 5026 | <member name="F:HttpServer.ContentType.Javascript"> |
5024 | <summary> | 5027 | <summary> |
5025 | Let's copy all the cookies. | 5028 | content type for javascript documents = application/javascript |
5026 | </summary> | 5029 | </summary> |
5027 | <param name="cookies">value from cookie header.</param> | 5030 | <remarks> |
5031 | <para> | ||
5032 | RFC 4329 states that text/javascript have been superseeded by | ||
5033 | application/javascript. You might still want to check browser versions | ||
5034 | since older ones do not support application/javascript. | ||
5035 | </para> | ||
5036 | <para>Browser support: http://krijnhoetmer.nl/stuff/javascript/mime-types/</para> | ||
5037 | </remarks> | ||
5028 | </member> | 5038 | </member> |
5029 | <member name="M:HttpServer.RequestCookies.Add(HttpServer.RequestCookie)"> | 5039 | <member name="F:HttpServer.ContentType.Xml"> |
5030 | <summary> | 5040 | <summary> |
5031 | Adds a cookie in the collection. | 5041 | text/xml |
5032 | </summary> | 5042 | </summary> |
5033 | <param name="cookie">cookie to add</param> | ||
5034 | <exception cref="T:System.ArgumentNullException">cookie is null</exception> | ||
5035 | </member> | 5043 | </member> |
5036 | <member name="M:HttpServer.RequestCookies.GetEnumerator"> | 5044 | <member name="T:HttpServer.ContentTypes"> |
5037 | <summary> | 5045 | <summary> |
5038 | Gets a collection enumerator on the cookie list. | 5046 | A list of content types |
5039 | </summary> | 5047 | </summary> |
5040 | <returns>collection enumerator</returns> | ||
5041 | </member> | 5048 | </member> |
5042 | <member name="M:HttpServer.RequestCookies.Clear"> | 5049 | <member name="M:HttpServer.ContentTypes.#ctor(System.String)"> |
5043 | <summary> | 5050 | <summary> |
5044 | Remove all cookies. | 5051 | |
5045 | </summary> | 5052 | </summary> |
5053 | <param name="types">Semicolon separated content types.</param> | ||
5046 | </member> | 5054 | </member> |
5047 | <member name="M:HttpServer.RequestCookies.System#Collections#Generic#IEnumerable{HttpServer#RequestCookie}#GetEnumerator"> | 5055 | <member name="M:HttpServer.ContentTypes.GetEnumerator"> |
5048 | <summary> | 5056 | <summary> |
5049 | Returns an enumerator that iterates through the collection. | 5057 | Returns an enumerator that iterates through a collection. |
5050 | </summary> | 5058 | </summary> |
5051 | |||
5052 | <returns> | 5059 | <returns> |
5053 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | 5060 | An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection. |
5054 | </returns> | 5061 | </returns> |
5055 | <filterpriority>1</filterpriority> | ||
5056 | </member> | 5062 | </member> |
5057 | <member name="M:HttpServer.RequestCookies.Remove(System.String)"> | 5063 | <member name="M:HttpServer.ContentTypes.Contains(System.String)"> |
5058 | <summary> | ||
5059 | Remove a cookie from the collection. | ||
5060 | </summary> | ||
5061 | <param name="cookieName">Name of cookie.</param> | ||
5062 | </member> | ||
5063 | <member name="P:HttpServer.RequestCookies.Count"> | ||
5064 | <summary> | ||
5065 | Gets the count of cookies in the collection. | ||
5066 | </summary> | ||
5067 | </member> | ||
5068 | <member name="P:HttpServer.RequestCookies.Item(System.String)"> | ||
5069 | <summary> | 5064 | <summary> |
5070 | Gets the cookie of a given identifier (null if not existing). | 5065 | Searches for the specified type |
5071 | </summary> | 5066 | </summary> |
5067 | <param name="type">Can also be a part of a type (searching for "xml" would return true for "application/xml").</param> | ||
5068 | <returns>true if type was found.</returns> | ||
5072 | </member> | 5069 | </member> |
5073 | <member name="T:HttpServer.HttpListener"> | 5070 | <member name="P:HttpServer.ContentTypes.First"> |
5074 | <summary> | 5071 | <summary> |
5075 | New implementation of the HTTP listener. | 5072 | Get this first content type. |
5076 | </summary> | 5073 | </summary> |
5077 | <remarks> | ||
5078 | Use the <c>Create</c> methods to create a default listener. | ||
5079 | </remarks> | ||
5080 | </member> | 5074 | </member> |
5081 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory)"> | 5075 | <member name="P:HttpServer.ContentTypes.Item(System.String)"> |
5082 | <summary> | 5076 | <summary> |
5083 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. | 5077 | Fetch a content type |
5084 | </summary> | 5078 | </summary> |
5085 | <param name="address">IP Address to accept connections on</param> | 5079 | <param name="type">Part of type ("xml" would return "application/xml")</param> |
5086 | <param name="port">TCP Port to listen on, default HTTP port is 80.</param> | 5080 | <returns></returns> |
5087 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | 5081 | <remarks>All content types are in lower case.</remarks> |
5088 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | ||
5089 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | ||
5090 | </member> | 5082 | </member> |
5091 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate)"> | 5083 | <member name="T:HttpServer.RequestParserFactory"> |
5092 | <summary> | 5084 | <summary> |
5093 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. | 5085 | Creates request parsers when needed. |
5094 | </summary> | 5086 | </summary> |
5095 | <param name="address">The address.</param> | ||
5096 | <param name="port">The port.</param> | ||
5097 | <param name="factory">The factory.</param> | ||
5098 | <param name="certificate">The certificate.</param> | ||
5099 | </member> | 5087 | </member> |
5100 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> | 5088 | <member name="T:HttpServer.IRequestParserFactory"> |
5101 | <summary> | 5089 | <summary> |
5102 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. | 5090 | Creates request parsers when needed. |
5103 | </summary> | 5091 | </summary> |
5104 | <param name="address">The address.</param> | ||
5105 | <param name="port">The port.</param> | ||
5106 | <param name="factory">The factory.</param> | ||
5107 | <param name="certificate">The certificate.</param> | ||
5108 | <param name="protocol">The protocol.</param> | ||
5109 | </member> | 5092 | </member> |
5110 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32)"> | 5093 | <member name="M:HttpServer.IRequestParserFactory.CreateParser(HttpServer.ILogWriter)"> |
5111 | <summary> | 5094 | <summary> |
5112 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. | 5095 | Create a new request parser. |
5113 | </summary> | 5096 | </summary> |
5114 | <param name="address">Address that the listener should accept connections on.</param> | 5097 | <param name="logWriter">Used when logging should be enabled.</param> |
5115 | <param name="port">Port that listener should accept connections on.</param> | 5098 | <returns>A new request parser.</returns> |
5116 | <returns>Created HTTP listener.</returns> | ||
5117 | </member> | 5099 | </member> |
5118 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate)"> | 5100 | <member name="M:HttpServer.RequestParserFactory.CreateParser(HttpServer.ILogWriter)"> |
5119 | <summary> | 5101 | <summary> |
5120 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. | 5102 | Create a new request parser. |
5121 | </summary> | 5103 | </summary> |
5122 | <param name="address">Address that the listener should accept connections on.</param> | 5104 | <param name="logWriter">Used when logging should be enabled.</param> |
5123 | <param name="port">Port that listener should accept connections on.</param> | 5105 | <returns>A new request parser.</returns> |
5124 | <param name="certificate">Certificate to use</param> | ||
5125 | <returns>Created HTTP listener.</returns> | ||
5126 | </member> | 5106 | </member> |
5127 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> | 5107 | <member name="T:HttpServer.Exceptions.UnauthorizedException"> |
5128 | <summary> | 5108 | <summary> |
5129 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. | 5109 | The request requires user authentication. The response MUST include a |
5110 | WWW-Authenticate header field (section 14.47) containing a challenge | ||
5111 | applicable to the requested resource. | ||
5112 | |||
5113 | The client MAY repeat the request with a suitable Authorization header | ||
5114 | field (section 14.8). If the request already included Authorization | ||
5115 | credentials, then the 401 response indicates that authorization has been | ||
5116 | refused for those credentials. If the 401 response contains the same challenge | ||
5117 | as the prior response, and the user agent has already attempted authentication | ||
5118 | at least once, then the user SHOULD be presented the entity that was given in the response, | ||
5119 | since that entity might include relevant diagnostic information. | ||
5120 | |||
5121 | HTTP access authentication is explained in rfc2617: | ||
5122 | http://www.ietf.org/rfc/rfc2617.txt | ||
5123 | |||
5124 | (description is taken from | ||
5125 | http://www.submissionchamber.com/help-guides/error-codes.php#sec10.4.2) | ||
5130 | </summary> | 5126 | </summary> |
5131 | <param name="address">Address that the listener should accept connections on.</param> | ||
5132 | <param name="port">Port that listener should accept connections on.</param> | ||
5133 | <param name="certificate">Certificate to use</param> | ||
5134 | <param name="protocol">which HTTPS protocol to use, default is TLS.</param> | ||
5135 | <returns>Created HTTP listener.</returns> | ||
5136 | </member> | 5127 | </member> |
5137 | <member name="M:HttpServer.HttpListener.OnAcceptingSocket(System.Net.Sockets.Socket)"> | 5128 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor"> |
5138 | <summary> | 5129 | <summary> |
5139 | Can be used to create filtering of new connections. | 5130 | Create a new unauhtorized exception. |
5140 | </summary> | 5131 | </summary> |
5141 | <param name="socket">Accepted socket</param> | 5132 | <seealso cref="T:HttpServer.Exceptions.UnauthorizedException"/> |
5142 | <returns> | ||
5143 | true if connection can be accepted; otherwise false. | ||
5144 | </returns> | ||
5145 | </member> | 5133 | </member> |
5146 | <member name="E:HttpServer.HttpListener.Accepted"> | 5134 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor(System.String,System.Exception)"> |
5147 | <summary> | 5135 | <summary> |
5148 | A client have been accepted, but not handled, by the listener. | 5136 | Create a new unauhtorized exception. |
5149 | </summary> | 5137 | </summary> |
5138 | <param name="message">reason to why the request was unauthorized.</param> | ||
5139 | <param name="inner">inner exception</param> | ||
5150 | </member> | 5140 | </member> |
5151 | <member name="T:HttpServer.HttpHelper"> | 5141 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor(System.String)"> |
5152 | <summary> | 5142 | <summary> |
5153 | Generic helper functions for HTTP | 5143 | Create a new unauhtorized exception. |
5154 | </summary> | 5144 | </summary> |
5145 | <param name="message">reason to why the request was unauthorized.</param> | ||
5155 | </member> | 5146 | </member> |
5156 | <member name="F:HttpServer.HttpHelper.HTTP10"> | 5147 | <member name="T:HttpServer.HttpModules.FileModule"> |
5157 | <summary> | 5148 | <summary> |
5158 | Version string for HTTP v1.0 | 5149 | The purpose of this module is to serve files. |
5159 | </summary> | 5150 | </summary> |
5160 | </member> | 5151 | </member> |
5161 | <member name="F:HttpServer.HttpHelper.HTTP11"> | 5152 | <member name="M:HttpServer.HttpModules.FileModule.#ctor(System.String,System.String,System.Boolean)"> |
5162 | <summary> | 5153 | <summary> |
5163 | Version string for HTTP v1.1 | 5154 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.FileModule"/> class. |
5164 | </summary> | 5155 | </summary> |
5156 | <param name="baseUri">Uri to serve, for instance "/files/"</param> | ||
5157 | <param name="basePath">Path on hard drive where we should start looking for files</param> | ||
5158 | <param name="useLastModifiedHeader">If true a Last-Modifed header will be sent upon requests urging web browser to cache files</param> | ||
5165 | </member> | 5159 | </member> |
5166 | <member name="F:HttpServer.HttpHelper.EmptyUri"> | 5160 | <member name="M:HttpServer.HttpModules.FileModule.#ctor(System.String,System.String)"> |
5167 | <summary> | 5161 | <summary> |
5168 | An empty URI | 5162 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.FileModule"/> class. |
5169 | </summary> | 5163 | </summary> |
5164 | <param name="baseUri">Uri to serve, for instance "/files/"</param> | ||
5165 | <param name="basePath">Path on hard drive where we should start looking for files</param> | ||
5170 | </member> | 5166 | </member> |
5171 | <member name="M:HttpServer.HttpHelper.ParseQueryString(System.String)"> | 5167 | <member name="M:HttpServer.HttpModules.FileModule.AddDefaultMimeTypes"> |
5172 | <summary> | 5168 | <summary> |
5173 | Parses a query string. | 5169 | Mimtypes that this class can handle per default |
5174 | </summary> | 5170 | </summary> |
5175 | <param name="queryString">Query string (URI encoded)</param> | ||
5176 | <returns>A <see cref="T:HttpServer.HttpInput"/> object if successful; otherwise <see cref="F:HttpServer.HttpInput.Empty"/></returns> | ||
5177 | <exception cref="T:System.ArgumentNullException"><c>queryString</c> is null.</exception> | ||
5178 | <exception cref="T:System.FormatException">If string cannot be parsed.</exception> | ||
5179 | </member> | 5171 | </member> |
5180 | <member name="T:HttpServer.HttpModules.ReverseProxyModule"> | 5172 | <member name="M:HttpServer.HttpModules.FileModule.CanHandle(System.Uri)"> |
5181 | <summary> | 5173 | <summary> |
5182 | A reverse proxy are used to act as a bridge between local (protected/hidden) websites | 5174 | Determines if the request should be handled by this module. |
5183 | and public clients. | 5175 | Invoked by the <see cref="T:HttpServer.HttpServer"/> |
5184 | |||
5185 | A typical usage is to allow web servers on non standard ports to still be available | ||
5186 | to the public clients, or allow web servers on private ips to be available. | ||
5187 | </summary> | 5176 | </summary> |
5177 | <param name="uri"></param> | ||
5178 | <returns>true if this module should handle it.</returns> | ||
5188 | </member> | 5179 | </member> |
5189 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.#ctor(System.String,System.String)"> | 5180 | <member name="M:HttpServer.HttpModules.FileModule.GetPath(System.Uri)"> |
5190 | <summary> | 5181 | <exception cref="T:HttpServer.Exceptions.BadRequestException">Illegal path</exception> |
5191 | |||
5192 | </summary> | ||
5193 | <param name="source">Base url requested from browser</param> | ||
5194 | <param name="destination">Base url on private web server</param> | ||
5195 | <example> | ||
5196 | // this will return contents from http://192.168.1.128/view/jonas when client requests http://www.gauffin.com/user/view/jonas | ||
5197 | _server.Add(new ReverseProxyModule("http://www.gauffin.com/user/", "http://192.168.1.128/"); | ||
5198 | </example> | ||
5199 | </member> | 5182 | </member> |
5200 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.CanHandle(System.Uri)"> | 5183 | <member name="M:HttpServer.HttpModules.FileModule.Contains(System.String,System.Collections.Generic.IEnumerable{System.String})"> |
5201 | <summary> | 5184 | <summary> |
5202 | Method that determines if an url should be handled or not by the module | 5185 | check if source contains any of the chars. |
5203 | </summary> | 5186 | </summary> |
5204 | <param name="uri">Url requested by the client.</param> | 5187 | <param name="source"></param> |
5205 | <returns>true if module should handle the url.</returns> | 5188 | <param name="chars"></param> |
5189 | <returns></returns> | ||
5206 | </member> | 5190 | </member> |
5207 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 5191 | <member name="M:HttpServer.HttpModules.FileModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
5208 | <summary> | 5192 | <summary> |
5209 | Method that process the url | 5193 | Method that process the Uri. |
5210 | </summary> | 5194 | </summary> |
5211 | <param name="request">Information sent by the browser about the request</param> | 5195 | <param name="request">Information sent by the browser about the request</param> |
5212 | <param name="response">Information that is being sent back to the client.</param> | 5196 | <param name="response">Information that is being sent back to the client.</param> |
5213 | <param name="session">Session used to </param> | 5197 | <param name="session">Session used to </param> |
5198 | <exception cref="T:HttpServer.Exceptions.InternalServerException">Failed to find file extension</exception> | ||
5199 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">File type is forbidden.</exception> | ||
5214 | </member> | 5200 | </member> |
5215 | <member name="T:HttpServer.HttpModules.HttpModuleExceptionEventArgs"> | 5201 | <member name="M:HttpServer.HttpModules.FileModule.GetFileExtension(System.String)"> |
5216 | <summary> | 5202 | <summary> |
5217 | Used to inform http server that | 5203 | return a file extension from an absolute Uri path (or plain filename) |
5218 | </summary> | 5204 | </summary> |
5205 | <param name="uri"></param> | ||
5206 | <returns></returns> | ||
5219 | </member> | 5207 | </member> |
5220 | <member name="M:HttpServer.HttpModules.HttpModuleExceptionEventArgs.#ctor(System.Exception)"> | 5208 | <member name="P:HttpServer.HttpModules.FileModule.MimeTypes"> |
5221 | <summary> | 5209 | <summary> |
5222 | Eventarguments used when an exception is thrown by a module | 5210 | List with all mime-type that are allowed. |
5223 | </summary> | 5211 | </summary> |
5224 | <param name="e">the exception</param> | 5212 | <remarks>All other mime types will result in a Forbidden http status code.</remarks> |
5225 | </member> | 5213 | </member> |
5226 | <member name="P:HttpServer.HttpModules.HttpModuleExceptionEventArgs.Exception"> | 5214 | <member name="P:HttpServer.HttpModules.FileModule.ForbiddenChars"> |
5227 | <summary> | 5215 | <summary> |
5228 | Exception thrown in a module | 5216 | characters that may not exist in a path. |
5229 | </summary> | 5217 | </summary> |
5218 | <example> | ||
5219 | fileMod.ForbiddenChars = new string[]{ "\\", "..", ":" }; | ||
5220 | </example> | ||
5230 | </member> | 5221 | </member> |
5231 | <member name="T:HttpServer.Helpers.Implementations.PrototypeImp"> | 5222 | <member name="T:HttpServer.Helpers.WebHelper"> |
5232 | <summary> | 5223 | <summary> |
5233 | PrototypeJS implementation of the javascript functions. | 5224 | Webhelper provides helpers for common tasks in HTML. |
5234 | </summary> | 5225 | </summary> |
5235 | </member> | 5226 | </member> |
5236 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxRequest(System.String,System.String[])"> | 5227 | <member name="F:HttpServer.Helpers.WebHelper.JSImplementation"> |
5237 | <summary> | 5228 | <summary> |
5238 | Requests a url through ajax | 5229 | Used to let the website use different javascript libraries. |
5230 | Default is <see cref="T:HttpServer.Helpers.Implementations.PrototypeImp"/> | ||
5239 | </summary> | 5231 | </summary> |
5240 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | ||
5241 | <param name="options">optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.</param> | ||
5242 | <returns>a link tag</returns> | ||
5243 | <remarks>onclick attribute is used by this method.</remarks> | ||
5244 | <example> | ||
5245 | <code> | ||
5246 | // plain text | ||
5247 | JSHelper.AjaxRequest("'/user/show/1'"); | ||
5248 | |||
5249 | // ajax request using this.href | ||
5250 | string link = "<a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/<call user</a>"; | ||
5251 | </code> | ||
5252 | </example> | ||
5253 | </member> | 5232 | </member> |
5254 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.Contains(System.Collections.Generic.IEnumerable{System.String},System.String)"> | 5233 | <member name="M:HttpServer.Helpers.WebHelper.AjaxRequest(System.String,System.String,System.String[])"> |
5255 | <summary> | 5234 | <summary> |
5256 | Determins if a list of strings contains a specific value | 5235 | Creates a link that invokes through ajax. |
5257 | </summary> | 5236 | </summary> |
5258 | <param name="options">options to check in</param> | 5237 | <param name="url">url to fetch</param> |
5259 | <param name="value">value to find</param> | 5238 | <param name="title">link title</param> |
5260 | <returns>true if value was found</returns> | 5239 | <param name="options"> |
5261 | <remarks>case insensitive</remarks> | 5240 | optional options in format "key, value, key, value". |
5241 | Javascript options starts with ':'. | ||
5242 | </param> | ||
5243 | <returns>a link tag</returns> | ||
5244 | <example> | ||
5245 | WebHelper.AjaxRequest("/users/add/", "Add user", "method:", "post", "onclick", "validate('this');"); | ||
5246 | </example> | ||
5262 | </member> | 5247 | </member> |
5263 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxUpdater(System.String,System.String,System.String[])"> | 5248 | <member name="M:HttpServer.Helpers.WebHelper.AjaxUpdater(System.String,System.String,System.String,System.String[])"> |
5264 | <summary> | 5249 | <summary> |
5265 | Ajax requests that updates an element with | 5250 | Builds a link that updates an element with the fetched ajax content. |
5266 | the fetched content | ||
5267 | </summary> | 5251 | </summary> |
5268 | <param name="url">URL to fetch. URL is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | 5252 | <param name="url">Url to fetch content from</param> |
5269 | <param name="targetId">element to update</param> | 5253 | <param name="title">link title</param> |
5270 | <param name="options">options in format "key, value, key, value". All keys should end with colon.</param> | 5254 | <param name="targetId">html element to update with the results of the ajax request.</param> |
5255 | <param name="options">optional options in format "key, value, key, value"</param> | ||
5271 | <returns>A link tag.</returns> | 5256 | <returns>A link tag.</returns> |
5272 | <example> | ||
5273 | <code> | ||
5274 | JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true"); | ||
5275 | </code> | ||
5276 | </example> | ||
5277 | </member> | 5257 | </member> |
5278 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.DialogLink(System.String,System.String,System.String[])"> | 5258 | <member name="M:HttpServer.Helpers.WebHelper.DialogLink(System.String,System.String,System.String[])"> |
5279 | <summary> | 5259 | <summary> |
5280 | A link that pop ups a Dialog (overlay div) | 5260 | A link that pop ups a Dialog (overlay div) |
5281 | </summary> | 5261 | </summary> |
5282 | <param name="url">URL to contents of dialog</param> | 5262 | <param name="url">url to contents of dialog</param> |
5283 | <param name="title">link title</param> | 5263 | <param name="title">link title</param> |
5284 | <param name="htmlAttributes">name, value, name, value</param> | 5264 | <param name="htmlAttributes">name/value of html attributes.</param> |
5285 | <returns> | 5265 | <returns>A "a"-tag that popups a dialog when clicked</returns> |
5286 | A "a"-tag that popups a dialog when clicked | ||
5287 | </returns> | ||
5288 | <remarks><para>Requires Control.Modal found here: http://livepipe.net/projects/control_modal/</para> | ||
5289 | And the following JavaScript (load it in application.js): | ||
5290 | <code> | ||
5291 | Event.observe(window, 'load', | ||
5292 | function() { | ||
5293 | document.getElementsByClassName('modal').each(function(link){ new Control.Modal(link); }); | ||
5294 | } | ||
5295 | ); | ||
5296 | </code> | ||
5297 | </remarks> | ||
5298 | <example> | 5266 | <example> |
5299 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); | 5267 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); |
5300 | </example> | 5268 | </example> |
5301 | </member> | 5269 | </member> |
5302 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.CreateDialog(System.String,System.String,System.String[])"> | 5270 | <member name="M:HttpServer.Helpers.WebHelper.CreateDialog(System.String,System.String,System.String[])"> |
5303 | <summary> | 5271 | <summary> |
5304 | create a modal dialog (usually using DIVs) | 5272 | Create/Open a dialog box using ajax |
5305 | </summary> | 5273 | </summary> |
5306 | <param name="url">url to fetch</param> | 5274 | <param name="url"></param> |
5307 | <param name="title">dialog title</param> | 5275 | <param name="title"></param> |
5308 | <param name="options">javascript/html attributes. javascript options ends with colon ':'.</param> | 5276 | <param name="parameters"></param> |
5309 | <returns></returns> | 5277 | <returns></returns> |
5310 | </member> | 5278 | </member> |
5311 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.CloseDialog"> | 5279 | <member name="M:HttpServer.Helpers.WebHelper.CloseDialog"> |
5312 | <summary> | 5280 | <summary> |
5313 | Close a javascript dialog window/div. | 5281 | Close a javascript dialog window/div. |
5314 | </summary> | 5282 | </summary> |
5315 | <returns>javascript for closing a dialog.</returns> | 5283 | <returns>javascript for closing a dialog.</returns> |
5316 | <see cref="M:HttpServer.Helpers.Implementations.PrototypeImp.DialogLink(System.String,System.String,System.String[])"/> | 5284 | <see cref="M:HttpServer.Helpers.WebHelper.DialogLink(System.String,System.String,System.String[])"/> |
5317 | </member> | 5285 | </member> |
5318 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxFormOnSubmit(System.String[])"> | 5286 | <member name="M:HttpServer.Helpers.WebHelper.FormStart(System.String,System.String,System.Boolean)"> |
5319 | <summary> | 5287 | <summary> |
5320 | javascript action that should be added to the "onsubmit" event in the form tag. | 5288 | Create a <form> tag. |
5321 | </summary> | 5289 | </summary> |
5322 | <param name="options">remember to encapsulate strings in ''</param> | 5290 | <param name="name">name of form</param> |
5323 | <returns></returns> | 5291 | <param name="action">action to invoke on submit</param> |
5324 | <remarks>All javascript option names should end with colon.</remarks> | 5292 | <param name="isAjax">form should be posted as ajax</param> |
5293 | <returns>html code</returns> | ||
5325 | <example> | 5294 | <example> |
5326 | <code> | 5295 | WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax); |
5327 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | ||
5328 | </code> | ||
5329 | </example> | 5296 | </example> |
5330 | </member> | 5297 | </member> |
5331 | <member name="T:HttpServer.Authentication.DigestAuthentication"> | 5298 | <member name="M:HttpServer.Helpers.WebHelper.Link(System.String,System.String,System.String[])"> |
5332 | <summary> | ||
5333 | Implements HTTP Digest authentication. It's more secure than Basic auth since password is | ||
5334 | encrypted with a "key" from the server. | ||
5335 | </summary> | ||
5336 | <remarks> | ||
5337 | Keep in mind that the password is encrypted with MD5. Use a combination of SSL and digest auth to be secure. | ||
5338 | </remarks> | ||
5339 | </member> | ||
5340 | <member name="M:HttpServer.Authentication.DigestAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)"> | ||
5341 | <summary> | ||
5342 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.DigestAuthentication"/> class. | ||
5343 | </summary> | ||
5344 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | ||
5345 | <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param> | ||
5346 | </member> | ||
5347 | <member name="M:HttpServer.Authentication.DigestAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler)"> | ||
5348 | <summary> | ||
5349 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.DigestAuthentication"/> class. | ||
5350 | </summary> | ||
5351 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | ||
5352 | </member> | ||
5353 | <member name="F:HttpServer.Authentication.DigestAuthentication.DisableNonceCheck"> | ||
5354 | <summary> | 5299 | <summary> |
5355 | Used by test classes to be able to use hardcoded values | 5300 | Create a link tag. |
5356 | </summary> | 5301 | </summary> |
5302 | <param name="url">url to go to</param> | ||
5303 | <param name="title">link title (text that is displayed)</param> | ||
5304 | <param name="htmlAttributes">html attributes, name, value, name, value</param> | ||
5305 | <returns>html code</returns> | ||
5306 | <example> | ||
5307 | WebHelper.Link("/user/show/1", "Show user", "id", "showUser", "onclick", "return confirm('Are you shure?');"); | ||
5308 | </example> | ||
5357 | </member> | 5309 | </member> |
5358 | <member name="M:HttpServer.Authentication.DigestAuthentication.Authenticate(System.String,System.String,System.String,System.Object[])"> | 5310 | <member name="M:HttpServer.Helpers.WebHelper.BuildLink(System.String,System.String,System.String[])"> |
5359 | <summary> | 5311 | <summary> |
5360 | An authentication response have been received from the web browser. | 5312 | Build a link |
5361 | Check if it's correct | ||
5362 | </summary> | 5313 | </summary> |
5363 | <param name="authenticationHeader">Contents from the Authorization header</param> | 5314 | <param name="url">url to go to.</param> |
5364 | <param name="realm">Realm that should be authenticated</param> | 5315 | <param name="title">title of link (displayed text)</param> |
5365 | <param name="httpVerb">GET/POST/PUT/DELETE etc.</param> | 5316 | <param name="htmlAttributes">extra html attributes.</param> |
5366 | <param name="options">First option: true if username/password is correct but not cnonce</param> | 5317 | <returns>a complete link</returns> |
5367 | <returns> | ||
5368 | Authentication object that is stored for the request. A user class or something like that. | ||
5369 | </returns> | ||
5370 | <exception cref="T:System.ArgumentException">if authenticationHeader is invalid</exception> | ||
5371 | <exception cref="T:System.ArgumentNullException">If any of the paramters is empty or null.</exception> | ||
5372 | </member> | 5318 | </member> |
5373 | <member name="M:HttpServer.Authentication.DigestAuthentication.Encrypt(System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String,System.String)"> | 5319 | <member name="M:HttpServer.Helpers.WebHelper.BuildLink(System.String,System.String,System.String[],System.String[])"> |
5374 | <summary> | 5320 | <summary> |
5375 | Encrypts parameters into a Digest string | 5321 | Build a link |
5376 | </summary> | 5322 | </summary> |
5377 | <param name="realm">Realm that the user want to log into.</param> | 5323 | <param name="url">url to go to.</param> |
5378 | <param name="userName">User logging in</param> | 5324 | <param name="title">title of link (displayed text)</param> |
5379 | <param name="password">Users password.</param> | 5325 | <param name="htmlAttributes">extra html attributes.</param> |
5380 | <param name="method">HTTP method.</param> | 5326 | <returns>a complete link</returns> |
5381 | <param name="uri">Uri/domain that generated the login prompt.</param> | 5327 | <param name="options">more options</param> |
5382 | <param name="qop">Quality of Protection.</param> | ||
5383 | <param name="nonce">"Number used ONCE"</param> | ||
5384 | <param name="nc">Hexadecimal request counter.</param> | ||
5385 | <param name="cnonce">"Client Number used ONCE"</param> | ||
5386 | <returns>Digest encrypted string</returns> | ||
5387 | </member> | 5328 | </member> |
5388 | <member name="M:HttpServer.Authentication.DigestAuthentication.Encrypt(System.String,System.String,System.String,System.String,System.String,System.String)"> | 5329 | <member name="M:HttpServer.Helpers.WebHelper.Select(System.String,System.Collections.ICollection,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> |
5389 | <summary> | 5330 | <summary> |
5390 | 5331 | Obsolete | |
5391 | </summary> | 5332 | </summary> |
5392 | <param name="ha1">Md5 hex encoded "userName:realm:password", without the quotes.</param> | 5333 | <param name="name">Obsolete</param> |
5393 | <param name="ha2">Md5 hex encoded "method:uri", without the quotes</param> | 5334 | <param name="collection">Obsolete</param> |
5394 | <param name="qop">Quality of Protection</param> | 5335 | <param name="getIdTitle">Obsolete</param> |
5395 | <param name="nonce">"Number used ONCE"</param> | 5336 | <param name="selectedValue">Obsolete</param> |
5396 | <param name="nc">Hexadecimal request counter.</param> | 5337 | <param name="firstEmpty">Obsolete</param> |
5397 | <param name="cnonce">Client number used once</param> | 5338 | <returns>Obsolete</returns> |
5398 | <returns></returns> | ||
5399 | </member> | 5339 | </member> |
5400 | <member name="M:HttpServer.Authentication.DigestAuthentication.CreateResponse(System.String,System.Object[])"> | 5340 | <member name="M:HttpServer.Helpers.WebHelper.Select(System.String,System.String,System.Collections.ICollection,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> |
5401 | <summary> | 5341 | <summary> |
5402 | Create a response that can be sent in the WWW-Authenticate header. | 5342 | Obsolete |
5403 | </summary> | 5343 | </summary> |
5404 | <param name="realm">Realm that the user should authenticate in</param> | 5344 | <param name="name">Obsolete</param> |
5405 | <param name="options">First options specifies if true if username/password is correct but not cnonce.</param> | 5345 | <param name="id">Obsolete</param> |
5406 | <returns>A correct auth request.</returns> | 5346 | <param name="collection">Obsolete</param> |
5407 | <exception cref="T:System.ArgumentNullException">If realm is empty or null.</exception> | 5347 | <param name="getIdTitle">Obsolete</param> |
5348 | <param name="selectedValue">Obsolete</param> | ||
5349 | <param name="firstEmpty">Obsolete</param> | ||
5350 | <returns>Obsolete</returns> | ||
5408 | </member> | 5351 | </member> |
5409 | <member name="M:HttpServer.Authentication.DigestAuthentication.Decode(System.String,System.Text.Encoding)"> | 5352 | <member name="M:HttpServer.Helpers.WebHelper.List(System.Collections.Generic.IEnumerable{System.Object},System.String)"> |
5410 | <summary> | 5353 | <summary> |
5411 | Decodes authorization header value | 5354 | Render errors into a UL with class "errors" |
5412 | </summary> | 5355 | </summary> |
5413 | <param name="buffer">header value</param> | 5356 | <param name="className">class used by UL-tag.</param> |
5414 | <param name="encoding">Encoding that the buffer is in</param> | 5357 | <param name="theList">items to list</param> |
5415 | <returns>All headers and their values if successful; otherwise null</returns> | 5358 | <returns>an unordered html list.</returns> |
5416 | <example> | ||
5417 | NameValueCollection header = DigestAuthentication.Decode("response=\"6629fae49393a05397450978507c4ef1\",\r\nc=00001", Encoding.ASCII); | ||
5418 | </example> | ||
5419 | <remarks>Can handle lots of whitespaces and new lines without failing.</remarks> | ||
5420 | </member> | 5359 | </member> |
5421 | <member name="M:HttpServer.Authentication.DigestAuthentication.GetCurrentNonce"> | 5360 | <member name="M:HttpServer.Helpers.WebHelper.List(System.Collections.Specialized.NameValueCollection,System.String)"> |
5422 | <summary> | 5361 | <summary> |
5423 | Gets the current nonce. | 5362 | Render errors into a UL with class "errors" |
5424 | </summary> | 5363 | </summary> |
5425 | <returns></returns> | 5364 | <param name="className">class used by UL-tag.</param> |
5365 | <param name="theList">items to list</param> | ||
5366 | <returns>an unordered html list.</returns> | ||
5426 | </member> | 5367 | </member> |
5427 | <member name="M:HttpServer.Authentication.DigestAuthentication.GetMD5HashBinHex2(System.String)"> | 5368 | <member name="M:HttpServer.Helpers.WebHelper.Errors(System.Collections.Specialized.NameValueCollection)"> |
5428 | <summary> | 5369 | <summary> |
5429 | Gets the Md5 hash bin hex2. | 5370 | Render errors into a UL with class "errors" |
5430 | </summary> | 5371 | </summary> |
5431 | <param name="toBeHashed">To be hashed.</param> | 5372 | <param name="errors"></param> |
5432 | <returns></returns> | 5373 | <returns></returns> |
5433 | </member> | 5374 | </member> |
5434 | <member name="M:HttpServer.Authentication.DigestAuthentication.IsValidNonce(System.String)"> | 5375 | <member name="M:HttpServer.Helpers.WebHelper.GenerateHtmlAttributes(System.Text.StringBuilder,System.String[],System.String[])"> |
5435 | <summary> | 5376 | <summary> |
5436 | determines if the nonce is valid or has expired. | 5377 | Generates a list with html attributes. |
5437 | </summary> | 5378 | </summary> |
5438 | <param name="nonce">nonce value (check wikipedia for info)</param> | 5379 | <param name="sb">StringBuilder that the options should be added to.</param> |
5439 | <returns>true if the nonce has not expired.</returns> | 5380 | <param name="firstOptions">attributes set by user.</param> |
5381 | <param name="secondOptions">attributes set by any of the helper classes.</param> | ||
5440 | </member> | 5382 | </member> |
5441 | <member name="P:HttpServer.Authentication.DigestAuthentication.Name"> | 5383 | <member name="M:HttpServer.Helpers.WebHelper.GenerateHtmlAttributes(System.Text.StringBuilder,System.String[])"> |
5442 | <summary> | 5384 | <summary> |
5443 | name used in http request. | 5385 | Generates a list with html attributes. |
5444 | </summary> | 5386 | </summary> |
5387 | <param name="sb">StringBuilder that the options should be added to.</param> | ||
5388 | <param name="options"></param> | ||
5445 | </member> | 5389 | </member> |
5446 | <member name="P:HttpServer.Authentication.DigestAuthentication.TokenIsHA1"> | 5390 | <member name="T:HttpServer.Helpers.GetIdTitle"> |
5447 | <summary> | 5391 | <summary> |
5448 | Gets or sets whether the token supplied in <see cref="T:HttpServer.Authentication.AuthenticationHandler"/> is a | 5392 | Delegate used by <see cref="M:HttpServer.Helpers.FormHelper.Select(System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"/> to populate select options. |
5449 | HA1 generated string. | ||
5450 | </summary> | 5393 | </summary> |
5394 | <param name="obj">current object (for instance a User).</param> | ||
5395 | <param name="id">Text that should be displayed in the value part of a <optiongt;-tag.</param> | ||
5396 | <param name="title">Text shown in the select list.</param> | ||
5397 | <example> | ||
5398 | // Class that is going to be used in a SELECT-tag. | ||
5399 | public class User | ||
5400 | { | ||
5401 | private readonly string _realName; | ||
5402 | private readonly int _id; | ||
5403 | public User(int id, string realName) | ||
5404 | { | ||
5405 | _id = id; | ||
5406 | _realName = realName; | ||
5407 | } | ||
5408 | public string RealName | ||
5409 | { | ||
5410 | get { return _realName; } | ||
5411 | } | ||
5412 | |||
5413 | public int Id | ||
5414 | { | ||
5415 | get { return _id; } | ||
5416 | } | ||
5417 | } | ||
5418 | |||
5419 | // Using an inline delegate to generate the select list | ||
5420 | public void UserInlineDelegate() | ||
5421 | { | ||
5422 | List<User> items = new List<User>(); | ||
5423 | items.Add(new User(1, "adam")); | ||
5424 | items.Add(new User(2, "bertial")); | ||
5425 | items.Add(new User(3, "david")); | ||
5426 | string htmlSelect = Select("users", "users", items, delegate(object o, out object id, out object value) | ||
5427 | { | ||
5428 | User user = (User)o; | ||
5429 | id = user.Id; | ||
5430 | value = user.RealName; | ||
5431 | }, 2, true); | ||
5432 | } | ||
5433 | |||
5434 | // Using an method as delegate to generate the select list. | ||
5435 | public void UseExternalDelegate() | ||
5436 | { | ||
5437 | List<User> items = new List<User>(); | ||
5438 | items.Add(new User(1, "adam")); | ||
5439 | items.Add(new User(2, "bertial")); | ||
5440 | items.Add(new User(3, "david")); | ||
5441 | string htmlSelect = Select("users", "users", items, UserOptions, 1, true); | ||
5442 | } | ||
5443 | |||
5444 | // delegate returning id and title | ||
5445 | public static void UserOptions(object o, out object id, out object title) | ||
5446 | { | ||
5447 | User user = (User)o; | ||
5448 | id = user.Id; | ||
5449 | value = user.RealName; | ||
5450 | } /// </example> | ||
5451 | </member> | 5451 | </member> |
5452 | </members> | 5452 | </members> |
5453 | </doc> | 5453 | </doc> |