diff options
author | onefang | 2019-05-19 21:24:15 +1000 |
---|---|---|
committer | onefang | 2019-05-19 21:24:15 +1000 |
commit | 5e4d6cab00cb29cd088ab7b62ab13aff103b64cb (patch) | |
tree | a9fbc62df9eb2d1d9ba2698d8552eae71eca20d8 /bin/HttpServer_OpenSim.xml | |
parent | Add a build script. (diff) | |
download | opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.zip opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.gz opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.bz2 opensim-SC-5e4d6cab00cb29cd088ab7b62ab13aff103b64cb.tar.xz |
Dump OpenSim 0.9.0.1 into it's own branch.
Diffstat (limited to '')
-rw-r--r-- | bin/HttpServer_OpenSim.xml | 6634 |
1 files changed, 3317 insertions, 3317 deletions
diff --git a/bin/HttpServer_OpenSim.xml b/bin/HttpServer_OpenSim.xml index 61c3ad8..7b6912e 100644 --- a/bin/HttpServer_OpenSim.xml +++ b/bin/HttpServer_OpenSim.xml | |||
@@ -4,562 +4,522 @@ | |||
4 | <name>HttpServer_OpenSim</name> | 4 | <name>HttpServer_OpenSim</name> |
5 | </assembly> | 5 | </assembly> |
6 | <members> | 6 | <members> |
7 | <member name="T:HttpServer.RealmHandler"> | 7 | <member name="T:HttpServer.Authentication.AuthenticationHandler"> |
8 | <summary> | 8 | <summary> |
9 | Delegate used to find a realm/domain. | 9 | Delegate used to let authentication modules authenticate the user name and password. |
10 | </summary> | 10 | </summary> |
11 | <param name="domain"></param> | 11 | <param name="realm">Realm that the user want to authenticate in</param> |
12 | <returns></returns> | 12 | <param name="userName">User name specified by client</param> |
13 | <param name="token">Can either be user password or implementation specific token.</param> | ||
14 | <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> | ||
15 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">throw forbidden exception if too many attempts have been made.</exception> | ||
13 | <remarks> | 16 | <remarks> |
14 | Realms are used during HTTP Authentication | 17 | <para> |
18 | Use <see cref="P:HttpServer.Authentication.DigestAuthentication.TokenIsHA1"/> to specify that the token is a HA1 token. (MD5 generated | ||
19 | string from realm, user name and password); Md5String(userName + ":" + realm + ":" + password); | ||
20 | </para> | ||
15 | </remarks> | 21 | </remarks> |
16 | <seealso cref="T:HttpServer.Authentication.AuthenticationModule"/> | ||
17 | <seealso cref="T:HttpServer.Authentication.AuthenticationHandler"/> | ||
18 | </member> | ||
19 | <member name="T:HttpServer.HttpServer"> | ||
20 | <summary> | ||
21 | A complete HTTP server, you need to add a module to it to be able to handle incoming requests. | ||
22 | </summary> | ||
23 | <example> | ||
24 | <code> | ||
25 | // this small example will add two web site modules, thus handling | ||
26 | // two different sites. In reality you should add Controller modules or something | ||
27 | // two the website modules to be able to handle different requests. | ||
28 | HttpServer server = new HttpServer(); | ||
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"/> | ||
42 | </member> | 22 | </member> |
43 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.IComponentProvider)"> | 23 | <member name="T:HttpServer.Authentication.AuthenticationRequiredHandler"> |
44 | <summary> | 24 | <summary> |
45 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 25 | Let's you decide on a system level if authentication is required. |
46 | </summary> | 26 | </summary> |
47 | <param name="provider">Used to get all components used in the server..</param> | 27 | <param name="request">HTTP request from client</param> |
28 | <returns>true if user should be authenticated.</returns> | ||
29 | <remarks>throw <see cref="T:HttpServer.Exceptions.ForbiddenException"/> if no more attempts are allowed.</remarks> | ||
30 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">If no more attempts are allowed</exception> | ||
48 | </member> | 31 | </member> |
49 | <member name="M:HttpServer.HttpServer.#ctor"> | 32 | <member name="T:HttpServer.Authentication.AuthenticationModule"> |
50 | <summary> | 33 | <summary> |
51 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 34 | Authentication modules are used to implement different |
35 | kind of HTTP authentication. | ||
52 | </summary> | 36 | </summary> |
53 | </member> | 37 | </member> |
54 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider)"> | 38 | <member name="M:HttpServer.Authentication.AuthenticationModule.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)"> |
55 | <summary> | 39 | <summary> |
56 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 40 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.AuthenticationModule"/> class. |
57 | </summary> | 41 | </summary> |
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> | 42 | <param name="authenticator">Delegate used to provide information used during authentication.</param> |
59 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> | 43 | <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param> |
60 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> | ||
61 | </member> | 44 | </member> |
62 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.Sessions.IHttpSessionStore)"> | 45 | <member name="M:HttpServer.Authentication.AuthenticationModule.#ctor(HttpServer.Authentication.AuthenticationHandler)"> |
63 | <summary> | 46 | <summary> |
64 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 47 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.AuthenticationModule"/> class. |
65 | </summary> | 48 | </summary> |
66 | <param name="sessionStore">A session store is used to save and retrieve sessions</param> | 49 | <param name="authenticator">Delegate used to provide information used during authentication.</param> |
67 | <seealso cref="T:HttpServer.Sessions.IHttpSessionStore"/> | ||
68 | </member> | 50 | </member> |
69 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.ILogWriter)"> | 51 | <member name="P:HttpServer.Authentication.AuthenticationModule.Name"> |
70 | <summary> | 52 | <summary> |
71 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 53 | name used in HTTP request. |
72 | </summary> | 54 | </summary> |
73 | <param name="logWriter">The log writer.</param> | ||
74 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
75 | </member> | 55 | </member> |
76 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider,HttpServer.ILogWriter)"> | 56 | <member name="F:HttpServer.Authentication.AuthenticationModule.AuthenticationTag"> |
77 | <summary> | 57 | <summary> |
78 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 58 | Tag used for authentication. |
79 | </summary> | 59 | </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"/> | ||
85 | </member> | 60 | </member> |
86 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider,HttpServer.Sessions.IHttpSessionStore,HttpServer.ILogWriter)"> | 61 | <member name="M:HttpServer.Authentication.AuthenticationModule.CreateResponse(System.String,System.Object[])"> |
87 | <summary> | 62 | <summary> |
88 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | 63 | Create a response that can be sent in the WWW-Authenticate header. |
89 | </summary> | 64 | </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> | 65 | <param name="realm">Realm that the user should authenticate in</param> |
91 | <param name="sessionStore">A session store is used to save and retrieve sessions</param> | 66 | <param name="options">Array with optional options.</param> |
92 | <param name="logWriter">The log writer.</param> | 67 | <returns>A correct authentication request.</returns> |
93 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> | 68 | <exception cref="T:System.ArgumentNullException">If realm is empty or null.</exception> |
94 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> | ||
95 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
96 | <seealso cref="T:HttpServer.Sessions.IHttpSessionStore"/> | ||
97 | </member> | 69 | </member> |
98 | <member name="M:HttpServer.HttpServer.Add(HttpServer.Rules.IRule)"> | 70 | <member name="M:HttpServer.Authentication.AuthenticationModule.Authenticate(System.String,System.String,System.String,System.Object[])"> |
99 | <summary> | 71 | <summary> |
100 | Adds the specified rule. | 72 | An authentication response have been received from the web browser. |
73 | Check if it's correct | ||
101 | </summary> | 74 | </summary> |
102 | <param name="rule">The rule.</param> | 75 | <param name="authenticationHeader">Contents from the Authorization header</param> |
76 | <param name="realm">Realm that should be authenticated</param> | ||
77 | <param name="httpVerb">GET/POST/PUT/DELETE etc.</param> | ||
78 | <param name="options">options to specific implementations</param> | ||
79 | <returns>Authentication object that is stored for the request. A user class or something like that.</returns> | ||
80 | <exception cref="T:System.ArgumentException">if <paramref name="authenticationHeader"/> is invalid</exception> | ||
81 | <exception cref="T:System.ArgumentNullException">If any of the parameters is empty or null.</exception> | ||
103 | </member> | 82 | </member> |
104 | <member name="M:HttpServer.HttpServer.Add(HttpServer.HttpModules.HttpModule)"> | 83 | <member name="M:HttpServer.Authentication.AuthenticationModule.CheckAuthentication(System.String,System.String,System.String@,System.Object@)"> |
105 | <summary> | 84 | <summary> |
106 | Add a <see cref="T:HttpServer.HttpModules.HttpModule"/> to the server. | 85 | Used to invoke the authentication delegate that is used to lookup the user name/realm. |
107 | </summary> | 86 | </summary> |
108 | <param name="module">mode to add</param> | 87 | <param name="realm">Realm (domain) that user want to authenticate in</param> |
88 | <param name="userName">User name</param> | ||
89 | <param name="password">Password used for validation. Some implementations got password in clear text, they are then sent to client.</param> | ||
90 | <param name="login">object that will be stored in the request to help you identify the user if authentication was successful.</param> | ||
91 | <returns>true if authentication was successful</returns> | ||
109 | </member> | 92 | </member> |
110 | <member name="M:HttpServer.HttpServer.DecodeBody(HttpServer.IHttpRequest)"> | 93 | <member name="M:HttpServer.Authentication.AuthenticationModule.AuthenticationRequired(HttpServer.IHttpRequest)"> |
111 | <summary> | 94 | <summary> |
112 | Decodes the request body. | 95 | Determines if authentication is required. |
113 | </summary> | 96 | </summary> |
114 | <param name="request">The request.</param> | 97 | <param name="request">HTTP request from browser</param> |
115 | <exception cref="T:HttpServer.Exceptions.InternalServerException">Failed to decode form data.</exception> | 98 | <returns>true if user should be authenticated.</returns> |
99 | <remarks>throw <see cref="T:HttpServer.Exceptions.ForbiddenException"/> from your delegate if no more attempts are allowed.</remarks> | ||
100 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">If no more attempts are allowed</exception> | ||
116 | </member> | 101 | </member> |
117 | <member name="M:HttpServer.HttpServer.ErrorPage(HttpServer.IHttpResponse,System.Net.HttpStatusCode,System.String)"> | 102 | <member name="T:HttpServer.Authentication.BasicAuthentication"> |
118 | <summary> | 103 | <summary> |
119 | Generate a HTTP error page (that will be added to the response body). | 104 | The "basic" authentication scheme is based on the model that the |
120 | response status code is also set. | 105 | client must authenticate itself with a user-ID and a password for |
106 | each realm. The realm value should be considered an opaque string | ||
107 | which can only be compared for equality with other realms on that | ||
108 | server. The server will service the request only if it can validate | ||
109 | the user-ID and password for the protection space of the Request-URI. | ||
110 | There are no optional authentication parameters. | ||
121 | </summary> | 111 | </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> | ||
125 | </member> | 112 | </member> |
126 | <member name="M:HttpServer.HttpServer.ErrorPage(HttpServer.IHttpResponse,HttpServer.Exceptions.HttpException)"> | 113 | <member name="M:HttpServer.Authentication.BasicAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)"> |
127 | <summary> | 114 | <summary> |
128 | Generate a HTTP error page (that will be added to the response body). | 115 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.BasicAuthentication"/> class. |
129 | response status code is also set. | ||
130 | </summary> | 116 | </summary> |
131 | <param name="response">Response that the page will be generated in.</param> | 117 | <param name="authenticator">Delegate used to provide information used during authentication.</param> |
132 | <param name="err">exception.</param> | 118 | <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param> |
133 | </member> | 119 | </member> |
134 | <member name="M:HttpServer.HttpServer.GetRealm(HttpServer.IHttpRequest)"> | 120 | <member name="M:HttpServer.Authentication.BasicAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler)"> |
135 | <summary> | 121 | <summary> |
136 | Realms are used by the <see cref="T:HttpServer.Authentication.AuthenticationModule"/>s. | 122 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.BasicAuthentication"/> class. |
137 | </summary> | 123 | </summary> |
138 | <param name="request">HTTP request</param> | 124 | <param name="authenticator">Delegate used to provide information used during authentication.</param> |
139 | <returns>domain/realm.</returns> | ||
140 | </member> | 125 | </member> |
141 | <member name="M:HttpServer.HttpServer.HandleRequest(HttpServer.IHttpClientContext,HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 126 | <member name="M:HttpServer.Authentication.BasicAuthentication.CreateResponse(System.String,System.Object[])"> |
142 | <summary> | 127 | <summary> |
143 | Process an incoming request. | 128 | Create a response that can be sent in the WWW-Authenticate header. |
144 | </summary> | 129 | </summary> |
145 | <param name="context">connection to client</param> | 130 | <param name="realm">Realm that the user should authenticate in</param> |
146 | <param name="request">request information</param> | 131 | <param name="options">Not used in basic auth</param> |
147 | <param name="response">response that should be filled</param> | 132 | <returns>A correct auth request.</returns> |
148 | <param name="session">session information</param> | ||
149 | </member> | 133 | </member> |
150 | <member name="M:HttpServer.HttpServer.OnClientDisconnected(HttpServer.IHttpClientContext,System.Net.Sockets.SocketError)"> | 134 | <member name="M:HttpServer.Authentication.BasicAuthentication.Authenticate(System.String,System.String,System.String,System.Object[])"> |
151 | <summary> | 135 | <summary> |
152 | Can be overloaded to implement stuff when a client have been connected. | 136 | An authentication response have been received from the web browser. |
137 | Check if it's correct | ||
153 | </summary> | 138 | </summary> |
154 | <remarks> | 139 | <param name="authenticationHeader">Contents from the Authorization header</param> |
155 | Default implementation does nothing. | 140 | <param name="realm">Realm that should be authenticated</param> |
156 | </remarks> | 141 | <param name="httpVerb">GET/POST/PUT/DELETE etc.</param> |
157 | <param name="client">client that disconnected</param> | 142 | <param name="options">Not used in basic auth</param> |
158 | <param name="error">disconnect reason</param> | 143 | <returns>Authentication object that is stored for the request. A user class or something like that.</returns> |
144 | <exception cref="T:System.ArgumentException">if authenticationHeader is invalid</exception> | ||
145 | <exception cref="T:System.ArgumentNullException">If any of the paramters is empty or null.</exception> | ||
159 | </member> | 146 | </member> |
160 | <member name="M:HttpServer.HttpServer.ProcessAuthentication(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 147 | <member name="P:HttpServer.Authentication.BasicAuthentication.Name"> |
161 | <summary> | 148 | <summary> |
162 | Handle authentication | 149 | name used in http request. |
163 | </summary> | 150 | </summary> |
164 | <param name="request"></param> | ||
165 | <param name="response"></param> | ||
166 | <param name="session"></param> | ||
167 | <returns>true if request can be handled; false if not.</returns> | ||
168 | <exception cref="T:HttpServer.Exceptions.BadRequestException">Invalid authorization header</exception> | ||
169 | </member> | 151 | </member> |
170 | <member name="M:HttpServer.HttpServer.RequestAuthentication(HttpServer.Authentication.AuthenticationModule,HttpServer.IHttpRequest,HttpServer.IHttpResponse)"> | 152 | <member name="T:HttpServer.Authentication.DigestAuthentication"> |
171 | <summary> | 153 | <summary> |
172 | Will request authentication. | 154 | Implements HTTP Digest authentication. It's more secure than Basic auth since password is |
155 | encrypted with a "key" from the server. | ||
173 | </summary> | 156 | </summary> |
174 | <remarks> | 157 | <remarks> |
175 | Sends respond to client, nothing else can be done with the response after this. | 158 | Keep in mind that the password is encrypted with MD5. Use a combination of SSL and digest auth to be secure. |
176 | </remarks> | 159 | </remarks> |
177 | <param name="mod"></param> | ||
178 | <param name="request"></param> | ||
179 | <param name="response"></param> | ||
180 | </member> | 160 | </member> |
181 | <member name="M:HttpServer.HttpServer.OnRequest(System.Object,HttpServer.RequestEventArgs)"> | 161 | <member name="M:HttpServer.Authentication.DigestAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)"> |
182 | <summary> | 162 | <summary> |
183 | Received from a <see cref="T:HttpServer.IHttpClientContext"/> when a request have been parsed successfully. | 163 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.DigestAuthentication"/> class. |
184 | </summary> | 164 | </summary> |
185 | <param name="source"><see cref="T:HttpServer.IHttpClientContext"/> that received the request.</param> | 165 | <param name="authenticator">Delegate used to provide information used during authentication.</param> |
186 | <param name="args">The request.</param> | 166 | <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param> |
187 | </member> | 167 | </member> |
188 | <member name="M:HttpServer.HttpServer.ProcessRequestWrapper(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> | 168 | <member name="M:HttpServer.Authentication.DigestAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler)"> |
189 | <summary> | 169 | <summary> |
190 | To be able to track request count. | 170 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.DigestAuthentication"/> class. |
191 | </summary> | 171 | </summary> |
192 | <param name="context"></param> | 172 | <param name="authenticator">Delegate used to provide information used during authentication.</param> |
193 | <param name="request"></param> | ||
194 | </member> | 173 | </member> |
195 | <member name="M:HttpServer.HttpServer.Start(System.Net.IPAddress,System.Int32)"> | 174 | <member name="F:HttpServer.Authentication.DigestAuthentication.DisableNonceCheck"> |
196 | <summary> | 175 | <summary> |
197 | Start the web server using regular HTTP. | 176 | Used by test classes to be able to use hardcoded values |
198 | </summary> | 177 | </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> | ||
203 | </member> | 178 | </member> |
204 | <member name="M:HttpServer.HttpServer.Start(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate)"> | 179 | <member name="P:HttpServer.Authentication.DigestAuthentication.Name"> |
205 | <summary> | 180 | <summary> |
206 | Accept secure connections. | 181 | name used in http request. |
207 | </summary> | 182 | </summary> |
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> | ||
213 | </member> | 183 | </member> |
214 | <member name="M:HttpServer.HttpServer.Stop"> | 184 | <member name="M:HttpServer.Authentication.DigestAuthentication.Authenticate(System.String,System.String,System.String,System.Object[])"> |
215 | <summary> | 185 | <summary> |
216 | shut down the server and listeners | 186 | An authentication response have been received from the web browser. |
187 | Check if it's correct | ||
217 | </summary> | 188 | </summary> |
189 | <param name="authenticationHeader">Contents from the Authorization header</param> | ||
190 | <param name="realm">Realm that should be authenticated</param> | ||
191 | <param name="httpVerb">GET/POST/PUT/DELETE etc.</param> | ||
192 | <param name="options">First option: true if username/password is correct but not cnonce</param> | ||
193 | <returns> | ||
194 | Authentication object that is stored for the request. A user class or something like that. | ||
195 | </returns> | ||
196 | <exception cref="T:System.ArgumentException">if authenticationHeader is invalid</exception> | ||
197 | <exception cref="T:System.ArgumentNullException">If any of the paramters is empty or null.</exception> | ||
218 | </member> | 198 | </member> |
219 | <member name="M:HttpServer.HttpServer.WriteLog(HttpServer.LogPrio,System.String)"> | 199 | <member name="P:HttpServer.Authentication.DigestAuthentication.TokenIsHA1"> |
220 | <summary> | 200 | <summary> |
221 | write an entry to the log file | 201 | Gets or sets whether the token supplied in <see cref="T:HttpServer.Authentication.AuthenticationHandler"/> is a |
202 | HA1 generated string. | ||
222 | </summary> | 203 | </summary> |
223 | <param name="prio">importance of the message</param> | ||
224 | <param name="message">log message</param> | ||
225 | </member> | 204 | </member> |
226 | <member name="M:HttpServer.HttpServer.WriteLog(System.Object,HttpServer.LogPrio,System.String)"> | 205 | <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)"> |
227 | <summary> | 206 | <summary> |
228 | write an entry to the log file | 207 | Encrypts parameters into a Digest string |
229 | </summary> | 208 | </summary> |
230 | <param name="source">object that wrote the message</param> | 209 | <param name="realm">Realm that the user want to log into.</param> |
231 | <param name="prio">importance of the message</param> | 210 | <param name="userName">User logging in</param> |
232 | <param name="message">log message</param> | 211 | <param name="password">Users password.</param> |
212 | <param name="method">HTTP method.</param> | ||
213 | <param name="uri">Uri/domain that generated the login prompt.</param> | ||
214 | <param name="qop">Quality of Protection.</param> | ||
215 | <param name="nonce">"Number used ONCE"</param> | ||
216 | <param name="nc">Hexadecimal request counter.</param> | ||
217 | <param name="cnonce">"Client Number used ONCE"</param> | ||
218 | <returns>Digest encrypted string</returns> | ||
233 | </member> | 219 | </member> |
234 | <member name="P:HttpServer.HttpServer.Current"> | 220 | <member name="M:HttpServer.Authentication.DigestAuthentication.Encrypt(System.String,System.String,System.String,System.String,System.String,System.String)"> |
235 | <summary> | 221 | <summary> |
236 | Server that is handling the current request. | 222 | |
237 | </summary> | 223 | </summary> |
238 | <remarks> | 224 | <param name="ha1">Md5 hex encoded "userName:realm:password", without the quotes.</param> |
239 | Will be set as soon as a request arrives to the <see cref="T:HttpServer.HttpServer"/> object. | 225 | <param name="ha2">Md5 hex encoded "method:uri", without the quotes</param> |
240 | </remarks> | 226 | <param name="qop">Quality of Protection</param> |
227 | <param name="nonce">"Number used ONCE"</param> | ||
228 | <param name="nc">Hexadecimal request counter.</param> | ||
229 | <param name="cnonce">Client number used once</param> | ||
230 | <returns></returns> | ||
241 | </member> | 231 | </member> |
242 | <member name="P:HttpServer.HttpServer.AuthenticationModules"> | 232 | <member name="M:HttpServer.Authentication.DigestAuthentication.CreateResponse(System.String,System.Object[])"> |
243 | <summary> | 233 | <summary> |
244 | Modules used for authentication. The module that is is added first is used as | 234 | Create a response that can be sent in the WWW-Authenticate header. |
245 | the default authentication module. | ||
246 | </summary> | 235 | </summary> |
247 | <remarks>Use the corresponding property | 236 | <param name="realm">Realm that the user should authenticate in</param> |
248 | in the <see cref="T:HttpServer.HttpModules.WebSiteModule"/> if you are using multiple websites.</remarks> | 237 | <param name="options">First options specifies if true if username/password is correct but not cnonce.</param> |
238 | <returns>A correct auth request.</returns> | ||
239 | <exception cref="T:System.ArgumentNullException">If realm is empty or null.</exception> | ||
249 | </member> | 240 | </member> |
250 | <member name="P:HttpServer.HttpServer.FormDecoderProviders"> | 241 | <member name="M:HttpServer.Authentication.DigestAuthentication.Decode(System.String,System.Text.Encoding)"> |
251 | <summary> | 242 | <summary> |
252 | Form decoder providers are used to decode request body (which normally contains form data). | 243 | Decodes authorization header value |
253 | </summary> | 244 | </summary> |
245 | <param name="buffer">header value</param> | ||
246 | <param name="encoding">Encoding that the buffer is in</param> | ||
247 | <returns>All headers and their values if successful; otherwise null</returns> | ||
248 | <example> | ||
249 | NameValueCollection header = DigestAuthentication.Decode("response=\"6629fae49393a05397450978507c4ef1\",\r\nc=00001", Encoding.ASCII); | ||
250 | </example> | ||
251 | <remarks>Can handle lots of whitespaces and new lines without failing.</remarks> | ||
254 | </member> | 252 | </member> |
255 | <member name="P:HttpServer.HttpServer.ServerName"> | 253 | <member name="M:HttpServer.Authentication.DigestAuthentication.GetCurrentNonce"> |
256 | <summary> | 254 | <summary> |
257 | Server name sent in HTTP responses. | 255 | Gets the current nonce. |
258 | </summary> | 256 | </summary> |
259 | <remarks> | 257 | <returns></returns> |
260 | Do NOT include version in name, since it makes it | ||
261 | easier for hackers. | ||
262 | </remarks> | ||
263 | </member> | 258 | </member> |
264 | <member name="P:HttpServer.HttpServer.SessionCookieName"> | 259 | <member name="M:HttpServer.Authentication.DigestAuthentication.GetMD5HashBinHex2(System.String)"> |
265 | <summary> | 260 | <summary> |
266 | Name of cookie where session id is stored. | 261 | Gets the Md5 hash bin hex2. |
267 | </summary> | 262 | </summary> |
263 | <param name="toBeHashed">To be hashed.</param> | ||
264 | <returns></returns> | ||
268 | </member> | 265 | </member> |
269 | <member name="P:HttpServer.HttpServer.LogWriter"> | 266 | <member name="M:HttpServer.Authentication.DigestAuthentication.IsValidNonce(System.String)"> |
270 | <summary> | 267 | <summary> |
271 | Specified where logging should go. | 268 | determines if the nonce is valid or has expired. |
272 | </summary> | 269 | </summary> |
273 | <seealso cref="T:HttpServer.NullLogWriter"/> | 270 | <param name="nonce">nonce value (check wikipedia for info)</param> |
274 | <seealso cref="T:HttpServer.ConsoleLogWriter"/> | 271 | <returns>true if the nonce has not expired.</returns> |
275 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
276 | </member> | 272 | </member> |
277 | <member name="P:HttpServer.HttpServer.BackLog"> | 273 | <member name="T:HttpServer.Check"> |
278 | <summary> | 274 | <summary> |
279 | Number of connections that can wait to be accepted by the server. | 275 | Small design by contract implementation. |
280 | </summary> | 276 | </summary> |
281 | <remarks>Default is 10.</remarks> | ||
282 | </member> | 277 | </member> |
283 | <member name="P:HttpServer.HttpServer.MaxRequestCount"> | 278 | <member name="M:HttpServer.Check.NotEmpty(System.String,System.String)"> |
284 | <summary> | 279 | <summary> |
285 | Gets or sets maximum number of allowed simultaneous requests. | 280 | Check whether a parameter is empty. |
286 | </summary> | 281 | </summary> |
287 | <remarks> | 282 | <param name="value">Parameter value</param> |
288 | <para> | 283 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> |
289 | This property is useful in busy systems. The HTTP server | 284 | <exception cref="T:System.ArgumentException">value is empty.</exception> |
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> | ||
297 | </member> | 285 | </member> |
298 | <member name="P:HttpServer.HttpServer.MaxQueueSize"> | 286 | <member name="M:HttpServer.Check.Require(System.Object,System.String)"> |
299 | <summary> | 287 | <summary> |
300 | Gets or sets maximum number of requests queuing to be handled. | 288 | Checks whether a parameter is null. |
301 | </summary> | 289 | </summary> |
302 | <remarks> | 290 | <param name="value">Parameter value</param> |
303 | <para> | 291 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> |
304 | The WebServer will start turning requests away if response code | 292 | <exception cref="T:System.ArgumentNullException">value is null.</exception> |
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> | ||
308 | </remarks> | ||
309 | </member> | 293 | </member> |
310 | <member name="E:HttpServer.HttpServer.RealmWanted"> | 294 | <member name="M:HttpServer.Check.Min(System.Int32,System.Object,System.String)"> |
311 | <summary> | 295 | <summary> |
312 | Realms are used during HTTP authentication. | 296 | Checks whether a parameter is null. |
313 | Default realm is same as server name. | ||
314 | </summary> | 297 | </summary> |
298 | <param name="minValue"></param> | ||
299 | <param name="value">Parameter value</param> | ||
300 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> | ||
301 | <exception cref="T:System.ArgumentException">value is null.</exception> | ||
315 | </member> | 302 | </member> |
316 | <member name="E:HttpServer.HttpServer.ExceptionThrown"> | 303 | <member name="T:HttpServer.ClientAcceptedEventArgs"> |
317 | <summary> | 304 | <summary> |
318 | Let's to receive unhandled exceptions from the threads. | 305 | Invoked when a client have been accepted by the <see cref="T:HttpServer.HttpListener"/> |
319 | </summary> | 306 | </summary> |
320 | <remarks> | 307 | <remarks> |
321 | Exceptions will be thrown during debug mode if this event is not used, | 308 | Can be used to revoke incoming connections |
322 | exceptions will be printed to console and suppressed during release mode. | ||
323 | </remarks> | 309 | </remarks> |
324 | </member> | 310 | </member> |
325 | <member name="T:HttpServer.HttpModules.ResourceFileModule"> | 311 | <member name="M:HttpServer.ClientAcceptedEventArgs.#ctor(System.Net.Sockets.Socket)"> |
326 | <summary> | 312 | <summary> |
327 | Serves files that are stored in embedded resources. | 313 | Initializes a new instance of the <see cref="T:HttpServer.ClientAcceptedEventArgs"/> class. |
328 | </summary> | 314 | </summary> |
315 | <param name="socket">The socket.</param> | ||
329 | </member> | 316 | </member> |
330 | <member name="T:HttpServer.HttpModules.HttpModule"> | 317 | <member name="P:HttpServer.ClientAcceptedEventArgs.Socket"> |
331 | <summary> | 318 | <summary> |
332 | A HttpModule can be used to serve Uri's. The module itself | 319 | Accepted socket. |
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. | ||
336 | </summary> | 320 | </summary> |
337 | <remarks> | ||
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. | ||
339 | </remarks> | ||
340 | </member> | 321 | </member> |
341 | <member name="M:HttpServer.HttpModules.HttpModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 322 | <member name="P:HttpServer.ClientAcceptedEventArgs.Revoked"> |
342 | <summary> | 323 | <summary> |
343 | Method that process the url | 324 | Client should be revoked. |
344 | </summary> | 325 | </summary> |
345 | <param name="request">Information sent by the browser about the request</param> | ||
346 | <param name="response">Information that is being sent back to the client.</param> | ||
347 | <param name="session">Session used to </param> | ||
348 | <returns>true if this module handled the request.</returns> | ||
349 | </member> | 326 | </member> |
350 | <member name="M:HttpServer.HttpModules.HttpModule.SetLogWriter(HttpServer.ILogWriter)"> | 327 | <member name="M:HttpServer.ClientAcceptedEventArgs.Revoke"> |
351 | <summary> | 328 | <summary> |
352 | Set the log writer to use. | 329 | Client may not be handled. |
353 | </summary> | 330 | </summary> |
354 | <param name="writer">logwriter to use.</param> | ||
355 | </member> | 331 | </member> |
356 | <member name="M:HttpServer.HttpModules.HttpModule.Write(HttpServer.LogPrio,System.String)"> | 332 | <member name="M:HttpServer.ComponentProvider.AddInstance``1(System.Object)"> |
357 | <summary> | 333 | <summary> |
358 | Log something. | 334 | Add a component instance |
359 | </summary> | 335 | </summary> |
360 | <param name="prio">importance of log message</param> | 336 | <typeparam name="T">Interface type</typeparam> |
361 | <param name="message">message</param> | 337 | <param name="instance">Instance to add</param> |
362 | </member> | 338 | </member> |
363 | <member name="P:HttpServer.HttpModules.HttpModule.AllowSecondaryProcessing"> | 339 | <member name="M:HttpServer.ComponentProvider.Get``1"> |
364 | <summary> | 340 | <summary> |
365 | If true specifies that the module doesn't consume the processing of a request so that subsequent modules | 341 | Get a component. |
366 | can continue processing afterwards. Default is false. | ||
367 | </summary> | 342 | </summary> |
343 | <typeparam name="T">Interface type</typeparam> | ||
344 | <returns>Component if registered, otherwise null.</returns> | ||
345 | <remarks> | ||
346 | Component will get created if needed. | ||
347 | </remarks> | ||
368 | </member> | 348 | </member> |
369 | <member name="M:HttpServer.HttpModules.ResourceFileModule.#ctor"> | 349 | <member name="M:HttpServer.ComponentProvider.Create(HttpServer.ComponentProvider.TypeInformation)"> |
370 | <summary> | 350 | <exception cref="T:System.InvalidOperationException">If instance cannot be created.</exception> |
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. | ||
374 | </summary> | ||
375 | </member> | 351 | </member> |
376 | <member name="M:HttpServer.HttpModules.ResourceFileModule.#ctor(HttpServer.ILogWriter)"> | 352 | <member name="M:HttpServer.ComponentProvider.Contains(System.Type)"> |
377 | <summary> | 353 | <summary> |
378 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.ResourceFileModule"/> class. | 354 | Checks if the specified component interface have been added. |
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. | ||
381 | </summary> | 355 | </summary> |
382 | <param name="logWriter">The log writer to use when logging events</param> | 356 | <param name="interfaceType"></param> |
357 | <returns>true if found; otherwise false.</returns> | ||
383 | </member> | 358 | </member> |
384 | <member name="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"> | 359 | <member name="M:HttpServer.ComponentProvider.Add``2"> |
385 | <summary> | 360 | <summary> |
386 | Mimtypes that this class can handle per default | 361 | Add a component. |
387 | </summary> | 362 | </summary> |
363 | <typeparam name="InterfaceType">Type being requested.</typeparam> | ||
364 | <typeparam name="InstanceType">Type being created.</typeparam> | ||
365 | <exception cref="T:System.InvalidOperationException">Type have already been mapped.</exception> | ||
388 | </member> | 366 | </member> |
389 | <member name="M:HttpServer.HttpModules.ResourceFileModule.AddResources(System.String,System.Reflection.Assembly,System.String)"> | 367 | <member name="T:HttpServer.ContentType"> |
390 | <summary> | 368 | <summary> |
391 | Loads resources from a namespace in the given assembly to an uri | 369 | Lists content type mime types. |
392 | </summary> | 370 | </summary> |
393 | <param name="toUri">The uri to map the resources to</param> | ||
394 | <param name="fromAssembly">The assembly in which the resources reside</param> | ||
395 | <param name="fromNamespace">The namespace from which to load the resources</param> | ||
396 | <usage> | ||
397 | resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views"); | ||
398 | |||
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> | ||
402 | </member> | 371 | </member> |
403 | <member name="M:HttpServer.HttpModules.ResourceFileModule.CanHandle(HttpServer.IHttpRequest)"> | 372 | <member name="F:HttpServer.ContentType.Text"> |
404 | <summary> | 373 | <summary> |
405 | Returns true if the module can handle the request | 374 | text/plain |
406 | </summary> | 375 | </summary> |
407 | </member> | 376 | </member> |
408 | <member name="M:HttpServer.HttpModules.ResourceFileModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 377 | <member name="F:HttpServer.ContentType.Html"> |
409 | <summary> | 378 | <summary> |
410 | Method that process the url | 379 | text/haml |
411 | </summary> | 380 | </summary> |
412 | <param name="request">Information sent by the browser about the request</param> | ||
413 | <param name="response">Information that is being sent back to the client.</param> | ||
414 | <param name="session">Session used to </param> | ||
415 | <returns>true if this module handled the request.</returns> | ||
416 | </member> | 381 | </member> |
417 | <member name="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"> | 382 | <member name="F:HttpServer.ContentType.Javascript"> |
418 | <summary> | 383 | <summary> |
419 | List with all mime-type that are allowed. | 384 | content type for javascript documents = application/javascript |
420 | </summary> | 385 | </summary> |
421 | <remarks>All other mime types will result in a Forbidden http status code.</remarks> | 386 | <remarks> |
387 | <para> | ||
388 | RFC 4329 states that text/javascript have been superseeded by | ||
389 | application/javascript. You might still want to check browser versions | ||
390 | since older ones do not support application/javascript. | ||
391 | </para> | ||
392 | <para>Browser support: http://krijnhoetmer.nl/stuff/javascript/mime-types/</para> | ||
393 | </remarks> | ||
422 | </member> | 394 | </member> |
423 | <member name="T:HttpServer.HttpInput"> | 395 | <member name="F:HttpServer.ContentType.Xml"> |
424 | <summary> | 396 | <summary> |
425 | Contains some kind of input from the browser/client. | 397 | text/xml |
426 | can be QueryString, form data or any other request body content. | ||
427 | </summary> | 398 | </summary> |
428 | </member> | 399 | </member> |
429 | <member name="T:HttpServer.IHttpInput"> | 400 | <member name="T:HttpServer.ContentTypes"> |
430 | <summary> | 401 | <summary> |
431 | Base class for request data containers | 402 | A list of content types |
432 | </summary> | 403 | </summary> |
433 | </member> | 404 | </member> |
434 | <member name="M:HttpServer.IHttpInput.Add(System.String,System.String)"> | 405 | <member name="M:HttpServer.ContentTypes.#ctor(System.String)"> |
435 | <summary> | 406 | <summary> |
436 | Adds a parameter mapped to the presented name | 407 | |
437 | </summary> | 408 | </summary> |
438 | <param name="name">The name to map the parameter to</param> | 409 | <param name="types">Semicolon separated content types.</param> |
439 | <param name="value">The parameter value</param> | ||
440 | </member> | 410 | </member> |
441 | <member name="M:HttpServer.IHttpInput.Contains(System.String)"> | 411 | <member name="P:HttpServer.ContentTypes.First"> |
442 | <summary> | 412 | <summary> |
443 | Returns true if the container contains the requested parameter | 413 | Get this first content type. |
444 | </summary> | 414 | </summary> |
445 | <param name="name">Parameter id</param> | ||
446 | <returns>True if parameter exists</returns> | ||
447 | </member> | 415 | </member> |
448 | <member name="P:HttpServer.IHttpInput.Item(System.String)"> | 416 | <member name="P:HttpServer.ContentTypes.Item(System.String)"> |
449 | <summary> | 417 | <summary> |
450 | Returns a request parameter | 418 | Fetch a content type |
451 | </summary> | 419 | </summary> |
452 | <param name="name">The name associated with the parameter</param> | 420 | <param name="type">Part of type ("xml" would return "application/xml")</param> |
453 | <returns></returns> | 421 | <returns></returns> |
422 | <remarks>All content types are in lower case.</remarks> | ||
454 | </member> | 423 | </member> |
455 | <member name="F:HttpServer.HttpInput.Empty"> | 424 | <member name="M:HttpServer.ContentTypes.GetEnumerator"> |
456 | <summary> Representation of a non-initialized class instance </summary> | ||
457 | </member> | ||
458 | <member name="F:HttpServer.HttpInput._ignoreChanges"> | ||
459 | <summary> Variable telling the class that it is non-initialized <see cref="F:HttpServer.HttpInput.Empty"/> </summary> | ||
460 | </member> | ||
461 | <member name="M:HttpServer.HttpInput.#ctor(System.String)"> | ||
462 | <summary> | 425 | <summary> |
463 | Initializes a new instance of the <see cref="T:HttpServer.HttpInput"/> class. | 426 | Returns an enumerator that iterates through a collection. |
464 | </summary> | 427 | </summary> |
465 | <param name="name">form name.</param> | 428 | <returns> |
429 | An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection. | ||
430 | </returns> | ||
466 | </member> | 431 | </member> |
467 | <member name="M:HttpServer.HttpInput.#ctor(System.String,System.Boolean)"> | 432 | <member name="M:HttpServer.ContentTypes.Contains(System.String)"> |
468 | <summary> | 433 | <summary> |
469 | Initializes a new instance of the <see cref="T:HttpServer.HttpInput"/> class. | 434 | Searches for the specified type |
470 | </summary> | 435 | </summary> |
471 | <param name="name">form name.</param> | 436 | <param name="type">Can also be a part of a type (searching for "xml" would return true for "application/xml").</param> |
472 | <param name="ignoreChanges">if set to <c>true</c> all changes will be ignored. </param> | 437 | <returns>true if type was found.</returns> |
473 | <remarks>this constructor should only be used by Empty</remarks> | ||
474 | </member> | ||
475 | <member name="M:HttpServer.HttpInput.#ctor(HttpServer.HttpInput)"> | ||
476 | <summary>Creates a deep copy of the HttpInput class</summary> | ||
477 | <param name="input">The object to copy</param> | ||
478 | <remarks>The function makes a deep copy of quite a lot which can be slow</remarks> | ||
479 | </member> | 438 | </member> |
480 | <member name="M:HttpServer.HttpInput.Add(System.String,System.String)"> | 439 | <member name="T:HttpServer.ContextTimeoutManager"> |
481 | <summary> | 440 | <summary> |
482 | Add a new element. Form array elements are parsed | 441 | Timeout Manager. Checks for dead clients. Clients with open connections that are not doing anything. Closes sessions opened with keepalive. |
483 | and added in a correct hierarchy. | ||
484 | </summary> | 442 | </summary> |
485 | <param name="name">Name is converted to lower case.</param> | ||
486 | <param name="value"></param> | ||
487 | <exception cref="T:System.ArgumentNullException"><c>name</c> is null.</exception> | ||
488 | <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception> | ||
489 | </member> | 443 | </member> |
490 | <member name="M:HttpServer.HttpInput.Contains(System.String)"> | 444 | <member name="T:HttpServer.ContextTimeoutManager.MonitorType"> |
491 | <summary> | 445 | <summary> |
492 | Returns true if the class contains a <see cref="T:HttpServer.HttpInput"/> with the corresponding name. | 446 | Use a Thread or a Timer to monitor the ugly |
493 | </summary> | 447 | </summary> |
494 | <param name="name">The field/query string name</param> | ||
495 | <returns>True if the value exists</returns> | ||
496 | </member> | 448 | </member> |
497 | <member name="M:HttpServer.HttpInput.ParseItem(System.String,System.String)"> | 449 | <member name="M:HttpServer.ContextTimeoutManager.ProcessContextTimeouts"> |
498 | <summary> | 450 | <summary> |
499 | Parses an item and returns it. | 451 | Causes the watcher to immediately check the connections. |
500 | This function is primarily used to parse array items as in user[name]. | ||
501 | </summary> | 452 | </summary> |
502 | <param name="name"></param> | ||
503 | <param name="value"></param> | ||
504 | <returns></returns> | ||
505 | </member> | ||
506 | <member name="M:HttpServer.HttpInput.ToString"> | ||
507 | <summary> Outputs the instance representing all its values joined together </summary> | ||
508 | <returns></returns> | ||
509 | </member> | 453 | </member> |
510 | <member name="M:HttpServer.HttpInput.ToString(System.Boolean)"> | 454 | <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCount"> |
511 | <summary>Returns all items as an unescaped query string.</summary> | 455 | <summary> |
456 | Environment.TickCount is an int but it counts all 32 bits so it goes positive | ||
457 | and negative every 24.9 days. This trims down TickCount so it doesn't wrap | ||
458 | for the callers. | ||
459 | This trims it to a 12 day interval so don't let your frame time get too long. | ||
460 | </summary> | ||
512 | <returns></returns> | 461 | <returns></returns> |
513 | </member> | 462 | </member> |
514 | <member name="M:HttpServer.HttpInput.ExtractOne(System.String)"> | 463 | <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCountSubtract(System.Int32,System.Int32)"> |
515 | <summary> | 464 | <summary> |
516 | Extracts one parameter from an array | 465 | Environment.TickCount is an int but it counts all 32 bits so it goes positive |
466 | and negative every 24.9 days. Subtracts the passed value (previously fetched by | ||
467 | 'EnvironmentTickCount()') and accounts for any wrapping. | ||
517 | </summary> | 468 | </summary> |
518 | <param name="value">Containing the string array</param> | 469 | <param name="newValue"></param> |
519 | <returns>All but the first value</returns> | 470 | <param name="prevValue"></param> |
520 | <example> | 471 | <returns>subtraction of passed prevValue from current Environment.TickCount</returns> |
521 | string test1 = ExtractOne("system[user][extension][id]"); | ||
522 | string test2 = ExtractOne(test1); | ||
523 | string test3 = ExtractOne(test2); | ||
524 | // test1 = user[extension][id] | ||
525 | // test2 = extension[id] | ||
526 | // test3 = id | ||
527 | </example> | ||
528 | </member> | 472 | </member> |
529 | <member name="M:HttpServer.HttpInput.Clear"> | 473 | <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCountAdd(System.Int32,System.Int32)"> |
530 | <summary>Resets all data contained by class</summary> | 474 | <summary> |
475 | Environment.TickCount is an int but it counts all 32 bits so it goes positive | ||
476 | and negative every 24.9 days. Subtracts the passed value (previously fetched by | ||
477 | 'EnvironmentTickCount()') and accounts for any wrapping. | ||
478 | </summary> | ||
479 | <param name="newValue"></param> | ||
480 | <param name="prevValue"></param> | ||
481 | <returns>subtraction of passed prevValue from current Environment.TickCount</returns> | ||
531 | </member> | 482 | </member> |
532 | <member name="M:HttpServer.HttpInput.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator"> | 483 | <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCountSubtract(System.Int32)"> |
533 | <summary> | 484 | <summary> |
534 | Returns an enumerator that iterates through the collection. | 485 | Environment.TickCount is an int but it counts all 32 bits so it goes positive |
486 | and negative every 24.9 days. Subtracts the passed value (previously fetched by | ||
487 | 'EnvironmentTickCount()') and accounts for any wrapping. | ||
535 | </summary> | 488 | </summary> |
536 | 489 | <returns>subtraction of passed prevValue from current Environment.TickCount</returns> | |
537 | <returns> | ||
538 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | ||
539 | </returns> | ||
540 | <filterpriority>1</filterpriority> | ||
541 | </member> | 490 | </member> |
542 | <member name="M:HttpServer.HttpInput.GetEnumerator"> | 491 | <member name="T:HttpServer.ExceptionHandler"> |
543 | <summary> | 492 | <summary> |
544 | Returns an enumerator that iterates through a collection. | 493 | We dont want to let the server to die due to exceptions thrown in worker threads. |
494 | therefore we use this delegate to give you a change to handle uncaught exceptions. | ||
545 | </summary> | 495 | </summary> |
496 | <param name="source">Class that the exception was thrown in.</param> | ||
497 | <param name="exception">Exception</param> | ||
498 | <remarks> | ||
499 | Server will throw a InternalServerException in release version if you dont | ||
500 | handle this delegate. | ||
501 | </remarks> | ||
502 | </member> | ||
503 | <member name="T:HttpServer.Exceptions.BadRequestException"> | ||
504 | <summary> | ||
505 | The request could not be understood by the server due to malformed syntax. | ||
506 | The client SHOULD NOT repeat the request without modifications. | ||
546 | 507 | ||
547 | <returns> | 508 | Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php |
548 | An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection. | 509 | </summary> |
549 | </returns> | ||
550 | <filterpriority>2</filterpriority> | ||
551 | </member> | 510 | </member> |
552 | <member name="P:HttpServer.HttpInput.Name"> | 511 | <member name="M:HttpServer.Exceptions.BadRequestException.#ctor(System.String)"> |
553 | <summary> | 512 | <summary> |
554 | Form name as lower case | 513 | Create a new bad request exception. |
555 | </summary> | 514 | </summary> |
515 | <param name="errMsg">reason to why the request was bad.</param> | ||
556 | </member> | 516 | </member> |
557 | <member name="P:HttpServer.HttpInput.Item(System.String)"> | 517 | <member name="M:HttpServer.Exceptions.BadRequestException.#ctor(System.String,System.Exception)"> |
558 | <summary> | 518 | <summary> |
559 | Get a form item. | 519 | Create a new bad request exception. |
560 | </summary> | 520 | </summary> |
561 | <param name="name"></param> | 521 | <param name="errMsg">reason to why the request was bad.</param> |
562 | <returns>Returns <see cref="F:HttpServer.HttpInputItem.Empty"/> if item was not found.</returns> | 522 | <param name="inner">inner exception</param> |
563 | </member> | 523 | </member> |
564 | <member name="T:HttpServer.Exceptions.ForbiddenException"> | 524 | <member name="T:HttpServer.Exceptions.ForbiddenException"> |
565 | <summary> | 525 | <summary> |
@@ -572,6 +532,12 @@ | |||
572 | Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php | 532 | Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php |
573 | </summary> | 533 | </summary> |
574 | </member> | 534 | </member> |
535 | <member name="M:HttpServer.Exceptions.ForbiddenException.#ctor(System.String)"> | ||
536 | <summary> | ||
537 | Initializes a new instance of the <see cref="T:HttpServer.Exceptions.ForbiddenException"/> class. | ||
538 | </summary> | ||
539 | <param name="errorMsg">error message</param> | ||
540 | </member> | ||
575 | <member name="T:HttpServer.Exceptions.HttpException"> | 541 | <member name="T:HttpServer.Exceptions.HttpException"> |
576 | <summary> | 542 | <summary> |
577 | All HTTP based exceptions will derive this class. | 543 | All HTTP based exceptions will derive this class. |
@@ -597,354 +563,693 @@ | |||
597 | status code to use in the response. | 563 | status code to use in the response. |
598 | </summary> | 564 | </summary> |
599 | </member> | 565 | </member> |
600 | <member name="M:HttpServer.Exceptions.ForbiddenException.#ctor(System.String)"> | 566 | <member name="T:HttpServer.Exceptions.InternalServerException"> |
601 | <summary> | 567 | <summary> |
602 | Initializes a new instance of the <see cref="T:HttpServer.Exceptions.ForbiddenException"/> class. | 568 | The server encountered an unexpected condition which prevented it from fulfilling the request. |
603 | </summary> | 569 | </summary> |
604 | <param name="errorMsg">error message</param> | ||
605 | </member> | 570 | </member> |
606 | <member name="T:HttpServer.RequestCookies"> | 571 | <member name="M:HttpServer.Exceptions.InternalServerException.#ctor"> |
607 | <summary> | 572 | <summary> |
608 | This class is created as a wrapper, since there are two different cookie types in .Net (Cookie and HttpCookie). | 573 | Initializes a new instance of the <see cref="T:HttpServer.Exceptions.InternalServerException"/> class. |
609 | The framework might switch class in the future and we dont want to have to replace all instances | ||
610 | </summary> | 574 | </summary> |
611 | </member> | 575 | </member> |
612 | <member name="M:HttpServer.RequestCookies.#ctor(System.String)"> | 576 | <member name="M:HttpServer.Exceptions.InternalServerException.#ctor(System.String)"> |
613 | <summary> | 577 | <summary> |
614 | Let's copy all the cookies. | 578 | Initializes a new instance of the <see cref="T:HttpServer.Exceptions.InternalServerException"/> class. |
615 | </summary> | 579 | </summary> |
616 | <param name="cookies">value from cookie header.</param> | 580 | <param name="message">error message.</param> |
617 | </member> | 581 | </member> |
618 | <member name="M:HttpServer.RequestCookies.Add(HttpServer.RequestCookie)"> | 582 | <member name="M:HttpServer.Exceptions.InternalServerException.#ctor(System.String,System.Exception)"> |
619 | <summary> | 583 | <summary> |
620 | Adds a cookie in the collection. | 584 | Initializes a new instance of the <see cref="T:HttpServer.Exceptions.InternalServerException"/> class. |
621 | </summary> | 585 | </summary> |
622 | <param name="cookie">cookie to add</param> | 586 | <param name="message">error message.</param> |
623 | <exception cref="T:System.ArgumentNullException">cookie is null</exception> | 587 | <param name="inner">inner exception.</param> |
624 | </member> | 588 | </member> |
625 | <member name="M:HttpServer.RequestCookies.GetEnumerator"> | 589 | <member name="T:HttpServer.Exceptions.NotFoundException"> |
626 | <summary> | 590 | <summary> |
627 | Gets a collection enumerator on the cookie list. | 591 | The requested resource was not found in the web server. |
628 | </summary> | 592 | </summary> |
629 | <returns>collection enumerator</returns> | ||
630 | </member> | 593 | </member> |
631 | <member name="M:HttpServer.RequestCookies.Clear"> | 594 | <member name="M:HttpServer.Exceptions.NotFoundException.#ctor(System.String,System.Exception)"> |
632 | <summary> | 595 | <summary> |
633 | Remove all cookies. | 596 | Create a new exception |
634 | </summary> | 597 | </summary> |
598 | <param name="message">message describing the error</param> | ||
599 | <param name="inner">inner exception</param> | ||
635 | </member> | 600 | </member> |
636 | <member name="M:HttpServer.RequestCookies.System#Collections#Generic#IEnumerable{HttpServer#RequestCookie}#GetEnumerator"> | 601 | <member name="M:HttpServer.Exceptions.NotFoundException.#ctor(System.String)"> |
637 | <summary> | 602 | <summary> |
638 | Returns an enumerator that iterates through the collection. | 603 | Create a new exception |
639 | </summary> | 604 | </summary> |
605 | <param name="message">message describing the error</param> | ||
606 | </member> | ||
607 | <member name="T:HttpServer.Exceptions.UnauthorizedException"> | ||
608 | <summary> | ||
609 | The request requires user authentication. The response MUST include a | ||
610 | WWW-Authenticate header field (section 14.47) containing a challenge | ||
611 | applicable to the requested resource. | ||
640 | 612 | ||
641 | <returns> | 613 | The client MAY repeat the request with a suitable Authorization header |
642 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | 614 | field (section 14.8). If the request already included Authorization |
643 | </returns> | 615 | credentials, then the 401 response indicates that authorization has been |
644 | <filterpriority>1</filterpriority> | 616 | refused for those credentials. If the 401 response contains the same challenge |
617 | as the prior response, and the user agent has already attempted authentication | ||
618 | at least once, then the user SHOULD be presented the entity that was given in the response, | ||
619 | since that entity might include relevant diagnostic information. | ||
620 | |||
621 | HTTP access authentication is explained in rfc2617: | ||
622 | http://www.ietf.org/rfc/rfc2617.txt | ||
623 | |||
624 | (description is taken from | ||
625 | http://www.submissionchamber.com/help-guides/error-codes.php#sec10.4.2) | ||
626 | </summary> | ||
645 | </member> | 627 | </member> |
646 | <member name="M:HttpServer.RequestCookies.Remove(System.String)"> | 628 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor"> |
647 | <summary> | 629 | <summary> |
648 | Remove a cookie from the collection. | 630 | Create a new unauhtorized exception. |
649 | </summary> | 631 | </summary> |
650 | <param name="cookieName">Name of cookie.</param> | 632 | <seealso cref="T:HttpServer.Exceptions.UnauthorizedException"/> |
651 | </member> | 633 | </member> |
652 | <member name="P:HttpServer.RequestCookies.Count"> | 634 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor(System.String,System.Exception)"> |
653 | <summary> | 635 | <summary> |
654 | Gets the count of cookies in the collection. | 636 | Create a new unauhtorized exception. |
655 | </summary> | 637 | </summary> |
638 | <param name="message">reason to why the request was unauthorized.</param> | ||
639 | <param name="inner">inner exception</param> | ||
656 | </member> | 640 | </member> |
657 | <member name="P:HttpServer.RequestCookies.Item(System.String)"> | 641 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor(System.String)"> |
658 | <summary> | 642 | <summary> |
659 | Gets the cookie of a given identifier (null if not existing). | 643 | Create a new unauhtorized exception. |
660 | </summary> | 644 | </summary> |
645 | <param name="message">reason to why the request was unauthorized.</param> | ||
661 | </member> | 646 | </member> |
662 | <member name="T:HttpServer.IHttpClientContext"> | 647 | <member name="T:HttpServer.FormDecoders.FormDecoderProvider"> |
663 | <summary> | 648 | <summary> |
664 | Contains a connection to a browser/client. | 649 | This provider is used to let us implement any type of form decoding we want without |
650 | having to rewrite anything else in the server. | ||
665 | </summary> | 651 | </summary> |
666 | </member> | 652 | </member> |
667 | <member name="M:HttpServer.IHttpClientContext.Disconnect(System.Net.Sockets.SocketError)"> | 653 | <member name="M:HttpServer.FormDecoders.FormDecoderProvider.Decode(System.String,System.IO.Stream,System.Text.Encoding)"> |
668 | <summary> | 654 | <summary> |
669 | Disconnect from client | 655 | |
670 | </summary> | 656 | </summary> |
671 | <param name="error">error to report in the <see cref="E:HttpServer.IHttpClientContext.Disconnected"/> event.</param> | 657 | <param name="contentType">Should contain boundary and type, as in: multipart/form-data; boundary=---------------------------230051238959</param> |
658 | <param name="stream">Stream containing form data.</param> | ||
659 | <param name="encoding">Encoding used when decoding the stream</param> | ||
660 | <returns><see cref="F:HttpServer.HttpInput.Empty"/> if no parser was found.</returns> | ||
661 | <exception cref="T:System.ArgumentException">If stream is null or not readable.</exception> | ||
662 | <exception cref="T:System.IO.InvalidDataException">If stream contents cannot be decoded properly.</exception> | ||
672 | </member> | 663 | </member> |
673 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String,System.String,System.String)"> | 664 | <member name="M:HttpServer.FormDecoders.FormDecoderProvider.Add(HttpServer.FormDecoders.IFormDecoder)"> |
674 | <summary> | 665 | <summary> |
675 | Send a response. | 666 | Add a decoder. |
676 | </summary> | 667 | </summary> |
677 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> | 668 | <param name="decoder"></param> |
678 | <param name="statusCode">HTTP status code</param> | 669 | <exception cref="T:System.ArgumentNullException"></exception> |
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> | ||
683 | </member> | 670 | </member> |
684 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String)"> | 671 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.Count"> |
685 | <summary> | 672 | <summary> |
686 | Send a response. | 673 | Number of added decoders. |
687 | </summary> | 674 | </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> | ||
691 | </member> | 675 | </member> |
692 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String)"> | 676 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.Decoders"> |
693 | <summary> | 677 | <summary> |
694 | Send a response. | 678 | Use with care. |
695 | </summary> | 679 | </summary> |
696 | <exception cref="T:System.ArgumentNullException"></exception> | ||
697 | </member> | 680 | </member> |
698 | <member name="M:HttpServer.IHttpClientContext.Send(System.Byte[])"> | 681 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.DefaultDecoder"> |
699 | <summary> | 682 | <summary> |
700 | send a whole buffer | 683 | Decoder used for unknown content types. |
701 | </summary> | 684 | </summary> |
702 | <param name="buffer">buffer to send</param> | ||
703 | <exception cref="T:System.ArgumentNullException"></exception> | ||
704 | </member> | 685 | </member> |
705 | <member name="M:HttpServer.IHttpClientContext.Send(System.Byte[],System.Int32,System.Int32)"> | 686 | <member name="T:HttpServer.FormDecoders.HttpMultipart.Element"> |
687 | <summary>Represents a field in a multipart form</summary> | ||
688 | </member> | ||
689 | <member name="M:HttpServer.FormDecoders.HttpMultipart.ReadLine"> | ||
706 | <summary> | 690 | <summary> |
707 | Send data using the stream | 691 | |
708 | </summary> | 692 | </summary> |
709 | <param name="buffer">Contains data to send</param> | 693 | <returns></returns> |
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> | 694 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> |
695 | <exception cref="T:System.ObjectDisposedException"></exception> | ||
714 | </member> | 696 | </member> |
715 | <member name="M:HttpServer.IHttpClientContext.Close"> | 697 | <member name="T:HttpServer.FormDecoders.IFormDecoder"> |
716 | <summary> | 698 | <summary> |
717 | Closes the streams and disposes of the unmanaged resources | 699 | Interface for form content decoders. |
718 | </summary> | 700 | </summary> |
719 | </member> | 701 | </member> |
720 | <member name="P:HttpServer.IHttpClientContext.Secured"> | 702 | <member name="M:HttpServer.FormDecoders.IFormDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> |
721 | <summary> | 703 | <summary> |
722 | Using SSL or other encryption method. | 704 | |
723 | </summary> | 705 | </summary> |
706 | <param name="stream">Stream containing the content</param> | ||
707 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
708 | <param name="encoding">Stream enconding</param> | ||
709 | <returns>A http form, or null if content could not be parsed.</returns> | ||
710 | <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception> | ||
724 | </member> | 711 | </member> |
725 | <member name="P:HttpServer.IHttpClientContext.IsSecured"> | 712 | <member name="M:HttpServer.FormDecoders.IFormDecoder.CanParse(System.String)"> |
726 | <summary> | 713 | <summary> |
727 | Using SSL or other encryption method. | 714 | Checks if the decoder can handle the mime type |
728 | </summary> | 715 | </summary> |
716 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
717 | <returns>True if the decoder can parse the specified content type</returns> | ||
729 | </member> | 718 | </member> |
730 | <member name="E:HttpServer.IHttpClientContext.Disconnected"> | 719 | <member name="T:HttpServer.FormDecoders.MultipartDecoder"> |
731 | <summary> | 720 | <summary> |
732 | The context have been disconnected. | 721 | |
733 | </summary> | 722 | </summary> |
734 | <remarks> | 723 | <remarks> |
735 | Event can be used to clean up a context, or to reuse it. | 724 | http://www.faqs.org/rfcs/rfc1867.html |
736 | </remarks> | 725 | </remarks> |
737 | </member> | 726 | </member> |
738 | <member name="E:HttpServer.IHttpClientContext.RequestReceived"> | 727 | <member name="F:HttpServer.FormDecoders.MultipartDecoder.MimeType"> |
739 | <summary> | 728 | <summary> |
740 | A request have been received in the context. | 729 | multipart/form-data |
741 | </summary> | 730 | </summary> |
742 | </member> | 731 | </member> |
743 | <member name="T:HttpServer.DisconnectedEventArgs"> | 732 | <member name="F:HttpServer.FormDecoders.MultipartDecoder.FormData"> |
744 | <summary> | 733 | <summary> |
745 | A <see cref="T:HttpServer.IHttpClientContext"/> have been disconnected. | 734 | form-data |
746 | </summary> | 735 | </summary> |
747 | </member> | 736 | </member> |
748 | <member name="M:HttpServer.DisconnectedEventArgs.#ctor(System.Net.Sockets.SocketError)"> | 737 | <member name="M:HttpServer.FormDecoders.MultipartDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> |
749 | <summary> | 738 | <summary> |
750 | Initializes a new instance of the <see cref="T:HttpServer.DisconnectedEventArgs"/> class. | 739 | |
751 | </summary> | 740 | </summary> |
752 | <param name="error">Reason to disconnection.</param> | 741 | <param name="stream">Stream containing the content</param> |
742 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
743 | <param name="encoding">Stream enconding</param> | ||
744 | <returns>A http form, or null if content could not be parsed.</returns> | ||
745 | <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception> | ||
746 | <exception cref="T:System.ArgumentNullException">If any parameter is null</exception> | ||
753 | </member> | 747 | </member> |
754 | <member name="P:HttpServer.DisconnectedEventArgs.Error"> | 748 | <member name="M:HttpServer.FormDecoders.MultipartDecoder.CanParse(System.String)"> |
755 | <summary> | 749 | <summary> |
756 | Gets reason to why client disconnected. | 750 | Checks if the decoder can handle the mime type |
757 | </summary> | 751 | </summary> |
752 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
753 | <returns>True if the decoder can parse the specified content type</returns> | ||
758 | </member> | 754 | </member> |
759 | <member name="T:HttpServer.RequestEventArgs"> | 755 | <member name="T:HttpServer.FormDecoders.UrlDecoder"> |
760 | <summary> | 756 | <summary> |
761 | 757 | Can handle application/x-www-form-urlencoded | |
762 | </summary> | 758 | </summary> |
763 | </member> | 759 | </member> |
764 | <member name="M:HttpServer.RequestEventArgs.#ctor(HttpServer.IHttpRequest)"> | 760 | <member name="M:HttpServer.FormDecoders.UrlDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> |
765 | <summary> | 761 | <summary> |
766 | Initializes a new instance of the <see cref="T:HttpServer.RequestEventArgs"/> class. | ||
767 | </summary> | 762 | </summary> |
768 | <param name="request">The request.</param> | 763 | <param name="stream">Stream containing the content</param> |
764 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
765 | <param name="encoding">Stream encoding</param> | ||
766 | <returns> | ||
767 | A HTTP form, or null if content could not be parsed. | ||
768 | </returns> | ||
769 | <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception> | ||
769 | </member> | 770 | </member> |
770 | <member name="P:HttpServer.RequestEventArgs.Request"> | 771 | <member name="M:HttpServer.FormDecoders.UrlDecoder.CanParse(System.String)"> |
771 | <summary> | 772 | <summary> |
772 | Gets received request. | 773 | Checks if the decoder can handle the mime type |
773 | </summary> | 774 | </summary> |
775 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | ||
776 | <returns>True if the decoder can parse the specified content type</returns> | ||
774 | </member> | 777 | </member> |
775 | <member name="T:HttpServer.HttpParam"> | 778 | <member name="T:HttpServer.FormDecoders.XmlDecoder"> |
776 | <summary> | 779 | <summary> |
777 | Returns item either from a form or a query string (checks them in that order) | 780 | This decoder converts XML documents to form items. |
781 | Each element becomes a subitem in the form, and each attribute becomes an item. | ||
778 | </summary> | 782 | </summary> |
783 | <example> | ||
784 | // xml: <hello id="1">something<world id="2">data</world></hello> | ||
785 | // result: | ||
786 | // form["hello"].Value = "something" | ||
787 | // form["hello"]["id"].Value = 1 | ||
788 | // form["hello"]["world]["id"].Value = 1 | ||
789 | // form["hello"]["world"].Value = "data" | ||
790 | </example> | ||
791 | <remarks> | ||
792 | The original xml document is stored in form["__xml__"].Value. | ||
793 | </remarks> | ||
779 | </member> | 794 | </member> |
780 | <member name="F:HttpServer.HttpParam.Empty"> | 795 | <member name="M:HttpServer.FormDecoders.XmlDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> |
781 | <summary> Representation of a non-initialized HttpParam </summary> | 796 | <summary> |
797 | |||
798 | </summary> | ||
799 | <param name="stream">Stream containing the content</param> | ||
800 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | ||
801 | <param name="encoding">Stream encoding</param> | ||
802 | Note: contentType and encoding are not used? | ||
803 | <returns>A http form, or null if content could not be parsed.</returns> | ||
804 | <exception cref="T:System.IO.InvalidDataException"></exception> | ||
782 | </member> | 805 | </member> |
783 | <member name="M:HttpServer.HttpParam.#ctor(HttpServer.IHttpInput,HttpServer.IHttpInput)"> | 806 | <member name="M:HttpServer.FormDecoders.XmlDecoder.TraverseNode(HttpServer.IHttpInput,System.Xml.XmlNode)"> |
784 | <summary>Initialises the class to hold a value either from a post request or a querystring request</summary> | 807 | <summary> |
808 | Recursive function that will go through an xml element and store it's content | ||
809 | to the form item. | ||
810 | </summary> | ||
811 | <param name="item">(parent) Item in form that content should be added to.</param> | ||
812 | <param name="node">Node that should be parsed.</param> | ||
785 | </member> | 813 | </member> |
786 | <member name="M:HttpServer.HttpParam.Add(System.String,System.String)"> | 814 | <member name="M:HttpServer.FormDecoders.XmlDecoder.CanParse(System.String)"> |
787 | <summary> | 815 | <summary> |
788 | The add method is not availible for HttpParam | 816 | Checks if the decoder can handle the mime type |
789 | since HttpParam checks both Request.Form and Request.QueryString | ||
790 | </summary> | 817 | </summary> |
791 | <param name="name">name identifying the value</param> | 818 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> |
792 | <param name="value">value to add</param> | 819 | <returns>True if the decoder can parse the specified content type</returns> |
793 | <exception cref="T:System.NotImplementedException"></exception> | ||
794 | </member> | 820 | </member> |
795 | <member name="M:HttpServer.HttpParam.Contains(System.String)"> | 821 | <member name="T:HttpServer.Helpers.FormHelper"> |
796 | <summary> | 822 | <summary> |
797 | Checks whether the form or querystring has the specified value | 823 | Helpers making it easier to work with forms. |
798 | </summary> | 824 | </summary> |
799 | <param name="name">Name, case sensitive</param> | 825 | <seealso cref="T:HttpServer.Helpers.ObjectForm"/> |
800 | <returns>true if found; otherwise false.</returns> | ||
801 | </member> | 826 | </member> |
802 | <member name="M:HttpServer.HttpParam.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator"> | 827 | <member name="F:HttpServer.Helpers.FormHelper.JSImplementation"> |
803 | <summary> | 828 | <summary> |
804 | Returns an enumerator that iterates through the collection. | 829 | Used to let the website use different JavaScript libraries. |
830 | Default is <see cref="T:HttpServer.Helpers.Implementations.PrototypeImp"/> | ||
831 | </summary> | ||
832 | </member> | ||
833 | <member name="M:HttpServer.Helpers.FormHelper.Start(System.String,System.String,System.Boolean,System.String[])"> | ||
834 | <summary> | ||
835 | Create a <form> tag. | ||
805 | </summary> | 836 | </summary> |
837 | <param name="id">name of form</param> | ||
838 | <param name="action">action to invoke on submit</param> | ||
839 | <param name="isAjax">form should be posted as Ajax</param> | ||
840 | <returns>HTML code</returns> | ||
841 | <example> | ||
842 | <code> | ||
843 | // without options | ||
844 | WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax); | ||
806 | 845 | ||
807 | <returns> | 846 | // with options |
808 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | 847 | WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax, "style", "display:inline", "class", "greenForm"); |
809 | </returns> | 848 | </code> |
810 | <filterpriority>1</filterpriority> | 849 | </example> |
850 | <param name="options">HTML attributes or JavaScript options.</param> | ||
851 | <remarks>Method will ALWAYS be POST.</remarks> | ||
852 | <exception cref="T:System.ArgumentException">options must consist of name, value, name, value</exception> | ||
811 | </member> | 853 | </member> |
812 | <member name="M:HttpServer.HttpParam.GetEnumerator"> | 854 | <member name="M:HttpServer.Helpers.FormHelper.Select(System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> |
813 | <summary> | 855 | <summary> |
814 | Returns an enumerator that iterates through a collection. | 856 | Creates a select list with the values in a collection. |
815 | </summary> | 857 | </summary> |
858 | <param name="name">Name of the SELECT-tag</param> | ||
859 | <param name="collection">collection used to generate options.</param> | ||
860 | <param name="getIdTitle">delegate used to return id and title from objects.</param> | ||
861 | <param name="selectedValue">value that should be marked as selected.</param> | ||
862 | <param name="firstEmpty">First row should contain an empty value.</param> | ||
863 | <returns>string containing a SELECT-tag.</returns> | ||
864 | <seealso cref="T:HttpServer.Helpers.GetIdTitle"/> | ||
865 | </member> | ||
866 | <member name="M:HttpServer.Helpers.FormHelper.Select(System.String,System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> | ||
867 | <summary> | ||
868 | Creates a select list with the values in a collection. | ||
869 | </summary> | ||
870 | <param name="name">Name of the SELECT-tag</param> | ||
871 | <param name="id">Id of the SELECT-tag</param> | ||
872 | <param name="collection">collection used to generate options.</param> | ||
873 | <param name="getIdTitle">delegate used to return id and title from objects.</param> | ||
874 | <param name="selectedValue">value that should be marked as selected.</param> | ||
875 | <param name="firstEmpty">First row should contain an empty value.</param> | ||
876 | <returns>string containing a SELECT-tag.</returns> | ||
877 | <seealso cref="T:HttpServer.Helpers.GetIdTitle"/> | ||
878 | <example> | ||
879 | <code> | ||
880 | // Class that is going to be used in a SELECT-tag. | ||
881 | public class User | ||
882 | { | ||
883 | private readonly string _realName; | ||
884 | private readonly int _id; | ||
885 | public User(int id, string realName) | ||
886 | { | ||
887 | _id = id; | ||
888 | _realName = realName; | ||
889 | } | ||
890 | public string RealName | ||
891 | { | ||
892 | get { return _realName; } | ||
893 | } | ||
816 | 894 | ||
817 | <returns> | 895 | public int Id |
818 | An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection. | 896 | { |
819 | </returns> | 897 | get { return _id; } |
820 | <filterpriority>2</filterpriority> | 898 | } |
899 | } | ||
900 | |||
901 | // Using an inline delegate to generate the select list | ||
902 | public void UserInlineDelegate() | ||
903 | { | ||
904 | List<User> items = new List<User>(); | ||
905 | items.Add(new User(1, "adam")); | ||
906 | items.Add(new User(2, "bertial")); | ||
907 | items.Add(new User(3, "david")); | ||
908 | string htmlSelect = Select("users", "users", items, delegate(object o, out object id, out object value) | ||
909 | { | ||
910 | User user = (User)o; | ||
911 | id = user.Id; | ||
912 | value = user.RealName; | ||
913 | }, 2, true); | ||
914 | } | ||
915 | |||
916 | // Using an method as delegate to generate the select list. | ||
917 | public void UseExternalDelegate() | ||
918 | { | ||
919 | List<User> items = new List<User>(); | ||
920 | items.Add(new User(1, "adam")); | ||
921 | items.Add(new User(2, "bertial")); | ||
922 | items.Add(new User(3, "david")); | ||
923 | string htmlSelect = Select("users", "users", items, UserOptions, 1, true); | ||
924 | } | ||
925 | |||
926 | // delegate returning id and title | ||
927 | public static void UserOptions(object o, out object id, out object title) | ||
928 | { | ||
929 | User user = (User)o; | ||
930 | id = user.Id; | ||
931 | value = user.RealName; | ||
932 | } | ||
933 | </code> | ||
934 | </example> | ||
935 | <exception cref="T:System.ArgumentNullException"><c>name</c>, <c>id</c>, <c>collection</c> or <c>getIdTitle</c> is null.</exception> | ||
821 | </member> | 936 | </member> |
822 | <member name="P:HttpServer.HttpParam.Item(System.String)"> | 937 | <member name="M:HttpServer.Helpers.FormHelper.Select(System.String,System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean,System.String[])"> |
823 | <summary> | 938 | <summary> |
824 | Fetch an item from the form or querystring (in that order). | 939 | Creates a select list with the values in a collection. |
825 | </summary> | 940 | </summary> |
826 | <param name="name"></param> | 941 | <param name="name">Name of the SELECT-tag</param> |
827 | <returns>Item if found; otherwise HttpInputItem.EmptyLanguageNode</returns> | 942 | <param name="id">Id of the SELECT-tag</param> |
943 | <param name="collection">collection used to generate options.</param> | ||
944 | <param name="getIdTitle">delegate used to return id and title from objects.</param> | ||
945 | <param name="selectedValue">value that should be marked as selected.</param> | ||
946 | <param name="firstEmpty">First row should contain an empty value.</param> | ||
947 | <param name="htmlAttributes">name, value collection of extra HTML attributes.</param> | ||
948 | <returns>string containing a SELECT-tag.</returns> | ||
949 | <seealso cref="T:HttpServer.Helpers.GetIdTitle"/> | ||
950 | <exception cref="T:System.ArgumentNullException"><c>name</c>, <c>id</c>, <c>collection</c> or <c>getIdTitle</c> is null.</exception> | ||
951 | <exception cref="T:System.ArgumentException">Invalid HTML attribute list.</exception> | ||
828 | </member> | 952 | </member> |
829 | <member name="T:HttpServer.HttpFile"> | 953 | <member name="M:HttpServer.Helpers.FormHelper.Options(System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> |
830 | <summary> | 954 | <summary> |
831 | Container class for posted files | 955 | Generate a list of HTML options |
832 | </summary> | 956 | </summary> |
957 | <param name="collection">collection used to generate options.</param> | ||
958 | <param name="getIdTitle">delegate used to return id and title from objects.</param> | ||
959 | <param name="selectedValue">value that should be marked as selected.</param> | ||
960 | <param name="firstEmpty">First row should contain an empty value.</param> | ||
961 | <returns></returns> | ||
962 | <exception cref="T:System.ArgumentNullException"><c>collection</c> or <c>getIdTitle</c> is null.</exception> | ||
833 | </member> | 963 | </member> |
834 | <member name="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String,System.String)"> | 964 | <member name="M:HttpServer.Helpers.FormHelper.Options(System.Text.StringBuilder,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> |
965 | <exception cref="T:System.ArgumentNullException"><c>sb</c> is null.</exception> | ||
966 | </member> | ||
967 | <member name="M:HttpServer.Helpers.FormHelper.CheckBox(System.String,System.Object,System.Object,System.String[])"> | ||
835 | <summary> | 968 | <summary> |
836 | Creates a container for a posted file | 969 | Creates a check box. |
837 | </summary> | 970 | </summary> |
838 | <param name="name">The identifier of the post field</param> | 971 | <param name="name">element name</param> |
839 | <param name="filename">The file path</param> | 972 | <param name="value">element value</param> |
840 | <param name="contentType">The content type of the file</param> | 973 | <param name="isChecked">determines if the check box is selected or not. This is done differently depending on the |
841 | <param name="uploadFilename">The name of the file uploaded</param> | 974 | type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if |
842 | <exception cref="T:System.ArgumentNullException">If any parameter is null or empty</exception> | 975 | the box is checked or not. </param> |
976 | <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param> | ||
977 | <returns>a generated radio button</returns> | ||
843 | </member> | 978 | </member> |
844 | <member name="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String)"> | 979 | <member name="M:HttpServer.Helpers.FormHelper.CheckBox(System.String,System.String,System.Object,System.Object,System.String[])"> |
845 | <summary> | 980 | <summary> |
846 | Creates a container for a posted file <see cref="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String,System.String)"/> | 981 | Creates a check box. |
847 | </summary> | 982 | </summary> |
848 | <exception cref="T:System.ArgumentNullException">If any parameter is null or empty</exception> | 983 | <param name="name">element name</param> |
984 | <param name="id">element id</param> | ||
985 | <param name="value">element value</param> | ||
986 | <param name="isChecked">determines if the check box is selected or not. This is done differently depending on the | ||
987 | type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if | ||
988 | the box is checked or not. </param> | ||
989 | <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param> | ||
990 | <returns>a generated radio button</returns> | ||
991 | <remarks> | ||
992 | value in your business object. (check box will be selected if it matches the element value) | ||
993 | </remarks> | ||
849 | </member> | 994 | </member> |
850 | <member name="M:HttpServer.HttpFile.Finalize"> | 995 | <member name="M:HttpServer.Helpers.FormHelper.CheckBox(System.String,System.String,System.Object,System.String[])"> |
851 | <summary>Destructor disposing the file</summary> | 996 | <summary> |
997 | Creates a check box. | ||
998 | </summary> | ||
999 | <param name="name">element name</param> | ||
1000 | <param name="id">element id</param> | ||
1001 | <param name="isChecked">determines if the check box is selected or not. This is done differently depending on the | ||
1002 | type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if | ||
1003 | the box is checked or not. </param> | ||
1004 | <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param> | ||
1005 | <returns>a generated radio button</returns> | ||
1006 | <remarks>will set value to "1".</remarks> | ||
852 | </member> | 1007 | </member> |
853 | <member name="M:HttpServer.HttpFile.Dispose(System.Boolean)"> | 1008 | <member name="M:HttpServer.Helpers.FormHelper.RadioButton(System.String,System.Object,System.Object,System.String[])"> |
854 | <summary> | 1009 | <summary> |
855 | Deletes the temporary file | 1010 | Creates a RadioButton. |
856 | </summary> | 1011 | </summary> |
857 | <param name="disposing">True if manual dispose</param> | 1012 | <param name="name">element name</param> |
1013 | <param name="value">element value</param> | ||
1014 | <param name="isSelected">determines if the radio button is selected or not. This is done differently depending on the | ||
1015 | type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if | ||
1016 | the box is checked or not. </param> | ||
1017 | <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param> | ||
1018 | <returns>a generated radio button</returns> | ||
858 | </member> | 1019 | </member> |
859 | <member name="M:HttpServer.HttpFile.Dispose"> | 1020 | <member name="M:HttpServer.Helpers.FormHelper.RadioButton(System.String,System.String,System.Object,System.Object,System.String[])"> |
860 | <summary> | 1021 | <summary> |
861 | Disposing interface, cleans up managed resources (the temporary file) and suppresses finalization | 1022 | Creates a RadioButton. |
862 | </summary> | 1023 | </summary> |
1024 | <param name="name">element name</param> | ||
1025 | <param name="id">element id</param> | ||
1026 | <param name="value">element value</param> | ||
1027 | <param name="isSelected">determines if the radio button is selected or not. This is done differently depending on the | ||
1028 | type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if | ||
1029 | the box is checked or not. </param> | ||
1030 | <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param> | ||
1031 | <returns>a generated radio button</returns> | ||
863 | </member> | 1032 | </member> |
864 | <member name="P:HttpServer.HttpFile.Name"> | 1033 | <member name="M:HttpServer.Helpers.FormHelper.End"> |
865 | <summary> | 1034 | <summary> |
866 | The name/id of the file | 1035 | form close tag |
867 | </summary> | 1036 | </summary> |
1037 | <returns></returns> | ||
868 | </member> | 1038 | </member> |
869 | <member name="P:HttpServer.HttpFile.Filename"> | 1039 | <member name="T:HttpServer.Helpers.GetIdTitle"> |
870 | <summary> | 1040 | <summary> |
871 | The full file path | 1041 | 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. |
872 | </summary> | 1042 | </summary> |
1043 | <param name="obj">current object (for instance a User).</param> | ||
1044 | <param name="id">Text that should be displayed in the value part of a <optiongt;-tag.</param> | ||
1045 | <param name="title">Text shown in the select list.</param> | ||
1046 | <example> | ||
1047 | // Class that is going to be used in a SELECT-tag. | ||
1048 | public class User | ||
1049 | { | ||
1050 | private readonly string _realName; | ||
1051 | private readonly int _id; | ||
1052 | public User(int id, string realName) | ||
1053 | { | ||
1054 | _id = id; | ||
1055 | _realName = realName; | ||
1056 | } | ||
1057 | public string RealName | ||
1058 | { | ||
1059 | get { return _realName; } | ||
1060 | } | ||
1061 | |||
1062 | public int Id | ||
1063 | { | ||
1064 | get { return _id; } | ||
1065 | } | ||
1066 | } | ||
1067 | |||
1068 | // Using an inline delegate to generate the select list | ||
1069 | public void UserInlineDelegate() | ||
1070 | { | ||
1071 | List<User> items = new List<User>(); | ||
1072 | items.Add(new User(1, "adam")); | ||
1073 | items.Add(new User(2, "bertial")); | ||
1074 | items.Add(new User(3, "david")); | ||
1075 | string htmlSelect = Select("users", "users", items, delegate(object o, out object id, out object value) | ||
1076 | { | ||
1077 | User user = (User)o; | ||
1078 | id = user.Id; | ||
1079 | value = user.RealName; | ||
1080 | }, 2, true); | ||
1081 | } | ||
1082 | |||
1083 | // Using an method as delegate to generate the select list. | ||
1084 | public void UseExternalDelegate() | ||
1085 | { | ||
1086 | List<User> items = new List<User>(); | ||
1087 | items.Add(new User(1, "adam")); | ||
1088 | items.Add(new User(2, "bertial")); | ||
1089 | items.Add(new User(3, "david")); | ||
1090 | string htmlSelect = Select("users", "users", items, UserOptions, 1, true); | ||
1091 | } | ||
1092 | |||
1093 | // delegate returning id and title | ||
1094 | public static void UserOptions(object o, out object id, out object title) | ||
1095 | { | ||
1096 | User user = (User)o; | ||
1097 | id = user.Id; | ||
1098 | value = user.RealName; | ||
1099 | } /// </example> | ||
873 | </member> | 1100 | </member> |
874 | <member name="P:HttpServer.HttpFile.UploadFilename"> | 1101 | <member name="T:HttpServer.Helpers.Implementations.PrototypeImp"> |
875 | <summary> | 1102 | <summary> |
876 | The name of the uploaded file | 1103 | PrototypeJS implementation of the javascript functions. |
877 | </summary> | 1104 | </summary> |
878 | </member> | 1105 | </member> |
879 | <member name="P:HttpServer.HttpFile.ContentType"> | 1106 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxRequest(System.String,System.String[])"> |
880 | <summary> | 1107 | <summary> |
881 | The type of file | 1108 | Requests a url through ajax |
1109 | </summary> | ||
1110 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | ||
1111 | <param name="options">optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.</param> | ||
1112 | <returns>a link tag</returns> | ||
1113 | <remarks>onclick attribute is used by this method.</remarks> | ||
1114 | <example> | ||
1115 | <code> | ||
1116 | // plain text | ||
1117 | JSHelper.AjaxRequest("'/user/show/1'"); | ||
1118 | |||
1119 | // ajax request using this.href | ||
1120 | string link = "<a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/<call user</a>"; | ||
1121 | </code> | ||
1122 | </example> | ||
1123 | </member> | ||
1124 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.Contains(System.Collections.Generic.IEnumerable{System.String},System.String)"> | ||
1125 | <summary> | ||
1126 | Determins if a list of strings contains a specific value | ||
882 | </summary> | 1127 | </summary> |
1128 | <param name="options">options to check in</param> | ||
1129 | <param name="value">value to find</param> | ||
1130 | <returns>true if value was found</returns> | ||
1131 | <remarks>case insensitive</remarks> | ||
883 | </member> | 1132 | </member> |
884 | <member name="T:HttpServer.FormDecoders.XmlDecoder"> | 1133 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxUpdater(System.String,System.String,System.String[])"> |
885 | <summary> | 1134 | <summary> |
886 | This decoder converts XML documents to form items. | 1135 | Ajax requests that updates an element with |
887 | Each element becomes a subitem in the form, and each attribute becomes an item. | 1136 | the fetched content |
888 | </summary> | 1137 | </summary> |
1138 | <param name="url">URL to fetch. URL is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | ||
1139 | <param name="targetId">element to update</param> | ||
1140 | <param name="options">options in format "key, value, key, value". All keys should end with colon.</param> | ||
1141 | <returns>A link tag.</returns> | ||
889 | <example> | 1142 | <example> |
890 | // xml: <hello id="1">something<world id="2">data</world></hello> | 1143 | <code> |
891 | // result: | 1144 | JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true"); |
892 | // form["hello"].Value = "something" | 1145 | </code> |
893 | // form["hello"]["id"].Value = 1 | ||
894 | // form["hello"]["world]["id"].Value = 1 | ||
895 | // form["hello"]["world"].Value = "data" | ||
896 | </example> | 1146 | </example> |
897 | <remarks> | 1147 | </member> |
898 | The original xml document is stored in form["__xml__"].Value. | 1148 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.DialogLink(System.String,System.String,System.String[])"> |
1149 | <summary> | ||
1150 | A link that pop ups a Dialog (overlay div) | ||
1151 | </summary> | ||
1152 | <param name="url">URL to contents of dialog</param> | ||
1153 | <param name="title">link title</param> | ||
1154 | <param name="htmlAttributes">name, value, name, value</param> | ||
1155 | <returns> | ||
1156 | A "a"-tag that popups a dialog when clicked | ||
1157 | </returns> | ||
1158 | <remarks><para>Requires Control.Modal found here: http://livepipe.net/projects/control_modal/</para> | ||
1159 | And the following JavaScript (load it in application.js): | ||
1160 | <code> | ||
1161 | Event.observe(window, 'load', | ||
1162 | function() { | ||
1163 | document.getElementsByClassName('modal').each(function(link){ new Control.Modal(link); }); | ||
1164 | } | ||
1165 | ); | ||
1166 | </code> | ||
899 | </remarks> | 1167 | </remarks> |
1168 | <example> | ||
1169 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); | ||
1170 | </example> | ||
900 | </member> | 1171 | </member> |
901 | <member name="T:HttpServer.FormDecoders.IFormDecoder"> | 1172 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.CreateDialog(System.String,System.String,System.String[])"> |
902 | <summary> | 1173 | <summary> |
903 | Interface for form content decoders. | 1174 | create a modal dialog (usually using DIVs) |
904 | </summary> | 1175 | </summary> |
1176 | <param name="url">url to fetch</param> | ||
1177 | <param name="title">dialog title</param> | ||
1178 | <param name="options">javascript/html attributes. javascript options ends with colon ':'.</param> | ||
1179 | <returns></returns> | ||
905 | </member> | 1180 | </member> |
906 | <member name="M:HttpServer.FormDecoders.IFormDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> | 1181 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.CloseDialog"> |
907 | <summary> | 1182 | <summary> |
908 | 1183 | Close a javascript dialog window/div. | |
909 | </summary> | 1184 | </summary> |
910 | <param name="stream">Stream containing the content</param> | 1185 | <returns>javascript for closing a dialog.</returns> |
911 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | 1186 | <see cref="M:HttpServer.Helpers.Implementations.PrototypeImp.DialogLink(System.String,System.String,System.String[])" /> |
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> | 1187 | </member> |
916 | <member name="M:HttpServer.FormDecoders.IFormDecoder.CanParse(System.String)"> | 1188 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxFormOnSubmit(System.String[])"> |
917 | <summary> | 1189 | <summary> |
918 | Checks if the decoder can handle the mime type | 1190 | javascript action that should be added to the "onsubmit" event in the form tag. |
919 | </summary> | 1191 | </summary> |
920 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | 1192 | <param name="options">remember to encapsulate strings in ''</param> |
921 | <returns>True if the decoder can parse the specified content type</returns> | 1193 | <returns></returns> |
1194 | <remarks>All javascript option names should end with colon.</remarks> | ||
1195 | <example> | ||
1196 | <code> | ||
1197 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | ||
1198 | </code> | ||
1199 | </example> | ||
922 | </member> | 1200 | </member> |
923 | <member name="M:HttpServer.FormDecoders.XmlDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> | 1201 | <member name="T:HttpServer.Helpers.JSHelper"> |
1202 | <summary> | ||
1203 | Will contain helper functions for javascript. | ||
1204 | </summary> | ||
1205 | </member> | ||
1206 | <member name="M:HttpServer.Helpers.JSHelper.AjaxRequest(System.String,System.String[])"> | ||
924 | <summary> | 1207 | <summary> |
1208 | Requests a url through ajax | ||
1209 | </summary> | ||
1210 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | ||
1211 | <param name="options">optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.</param> | ||
1212 | <returns>a link tag</returns> | ||
1213 | <remarks>onclick attribute is used by this method.</remarks> | ||
1214 | <example> | ||
1215 | <code> | ||
1216 | // plain text | ||
1217 | JSHelper.AjaxRequest("'/user/show/1'"); | ||
925 | 1218 | ||
1219 | // ajax request using this.href | ||
1220 | string link = "<a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/<call user</a>"; | ||
1221 | </code> | ||
1222 | </example> | ||
1223 | </member> | ||
1224 | <member name="M:HttpServer.Helpers.JSHelper.AjaxUpdater(System.String,System.String,System.String[])"> | ||
1225 | <summary> | ||
1226 | Ajax requests that updates an element with | ||
1227 | the fetched content | ||
926 | </summary> | 1228 | </summary> |
927 | <param name="stream">Stream containing the content</param> | 1229 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> |
928 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | 1230 | <param name="targetId">element to update</param> |
929 | <param name="encoding">Stream encoding</param> | 1231 | <param name="options">options in format "key, value, key, value". All keys should end with colon.</param> |
930 | Note: contentType and encoding are not used? | 1232 | <returns>A link tag.</returns> |
931 | <returns>A http form, or null if content could not be parsed.</returns> | 1233 | <example> |
932 | <exception cref="T:System.IO.InvalidDataException"></exception> | 1234 | <code> |
1235 | JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true"); | ||
1236 | </code> | ||
1237 | </example> | ||
933 | </member> | 1238 | </member> |
934 | <member name="M:HttpServer.FormDecoders.XmlDecoder.TraverseNode(HttpServer.IHttpInput,System.Xml.XmlNode)"> | 1239 | <member name="M:HttpServer.Helpers.JSHelper.CreateDialog(System.String,System.String,System.String[])"> |
935 | <summary> | 1240 | <summary> |
936 | Recursive function that will go through an xml element and store it's content | 1241 | Opens contents in a dialog window. |
937 | to the form item. | ||
938 | </summary> | 1242 | </summary> |
939 | <param name="item">(parent) Item in form that content should be added to.</param> | 1243 | <param name="url">url to contents of dialog</param> |
940 | <param name="node">Node that should be parsed.</param> | 1244 | <param name="title">link title</param> |
1245 | <param name="options">name, value, name, value, all parameter names should end with colon.</param> | ||
941 | </member> | 1246 | </member> |
942 | <member name="M:HttpServer.FormDecoders.XmlDecoder.CanParse(System.String)"> | 1247 | <member name="M:HttpServer.Helpers.JSHelper.CloseDialog"> |
943 | <summary> | 1248 | <summary> |
944 | Checks if the decoder can handle the mime type | 1249 | Close a javascript dialog window/div. |
945 | </summary> | 1250 | </summary> |
946 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | 1251 | <returns>javascript for closing a dialog.</returns> |
947 | <returns>True if the decoder can parse the specified content type</returns> | 1252 | <see cref="M:HttpServer.Helpers.JSHelper.CreateDialog(System.String,System.String,System.String[])" /> |
948 | </member> | 1253 | </member> |
949 | <member name="T:HttpServer.Helpers.ObjectForm"> | 1254 | <member name="T:HttpServer.Helpers.ObjectForm"> |
950 | <summary> | 1255 | <summary> |
@@ -1063,3013 +1368,2916 @@ | |||
1063 | </summary> | 1368 | </summary> |
1064 | <returns>html</returns> | 1369 | <returns>html</returns> |
1065 | </member> | 1370 | </member> |
1066 | <member name="T:HttpServer.FormDecoders.MultipartDecoder"> | 1371 | <member name="T:HttpServer.Helpers.ResourceInfo"> |
1067 | <summary> | 1372 | <summary> |
1068 | 1373 | Container to bind resource names to assemblies | |
1069 | </summary> | 1374 | </summary> |
1070 | <remarks> | ||
1071 | http://www.faqs.org/rfcs/rfc1867.html | ||
1072 | </remarks> | ||
1073 | </member> | 1375 | </member> |
1074 | <member name="F:HttpServer.FormDecoders.MultipartDecoder.MimeType"> | 1376 | <member name="M:HttpServer.Helpers.ResourceInfo.#ctor(System.String,System.String,System.Reflection.Assembly)"> |
1075 | <summary> | 1377 | <summary> |
1076 | multipart/form-data | 1378 | Instantiates an instance of <see cref="T:HttpServer.Helpers.ResourceInfo"/> |
1077 | </summary> | 1379 | </summary> |
1380 | <param name="uri">The dot seperated uri the resource maps to</param> | ||
1381 | <param name="resourceName">The full resource name</param> | ||
1382 | <param name="assembly">The assembly the resource exists in</param> | ||
1078 | </member> | 1383 | </member> |
1079 | <member name="F:HttpServer.FormDecoders.MultipartDecoder.FormData"> | 1384 | <member name="P:HttpServer.Helpers.ResourceInfo.Assembly"> |
1080 | <summary> | 1385 | <summary> |
1081 | form-data | 1386 | Retrieves the assembly the resource resides in |
1082 | </summary> | 1387 | </summary> |
1083 | </member> | 1388 | </member> |
1084 | <member name="M:HttpServer.FormDecoders.MultipartDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> | 1389 | <member name="P:HttpServer.Helpers.ResourceInfo.Uri"> |
1085 | <summary> | 1390 | <summary> |
1086 | 1391 | Retrieves the full name/path of the assembly | |
1087 | </summary> | 1392 | </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> | ||
1094 | </member> | 1393 | </member> |
1095 | <member name="M:HttpServer.FormDecoders.MultipartDecoder.CanParse(System.String)"> | 1394 | <member name="P:HttpServer.Helpers.ResourceInfo.Extension"> |
1096 | <summary> | 1395 | <summary> |
1097 | Checks if the decoder can handle the mime type | 1396 | Retrieves the extension of the resource |
1098 | </summary> | 1397 | </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> | ||
1101 | </member> | 1398 | </member> |
1102 | <member name="T:HttpServer.Exceptions.BadRequestException"> | 1399 | <member name="P:HttpServer.Helpers.ResourceInfo.ExtensionLessUri"> |
1400 | <summary>Returns the Uri without extension</summary> | ||
1401 | </member> | ||
1402 | <member name="P:HttpServer.Helpers.ResourceInfo.ResourceName"> | ||
1403 | <summary>Retrieves the full path name to the resource file</summary> | ||
1404 | </member> | ||
1405 | <member name="M:HttpServer.Helpers.ResourceInfo.GetStream"> | ||
1103 | <summary> | 1406 | <summary> |
1104 | The request could not be understood by the server due to malformed syntax. | 1407 | Retrieves a stream to the resource |
1105 | The client SHOULD NOT repeat the request without modifications. | ||
1106 | |||
1107 | Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php | ||
1108 | </summary> | 1408 | </summary> |
1409 | <returns>Null if the resource couldn't be located somehow</returns> | ||
1109 | </member> | 1410 | </member> |
1110 | <member name="M:HttpServer.Exceptions.BadRequestException.#ctor(System.String)"> | 1411 | <member name="T:HttpServer.Helpers.ResourceManager"> |
1412 | <summary>Class to handle loading of resource files</summary> | ||
1413 | </member> | ||
1414 | <member name="M:HttpServer.Helpers.ResourceManager.#ctor"> | ||
1111 | <summary> | 1415 | <summary> |
1112 | Create a new bad request exception. | 1416 | Initializes a new instance of the <see cref="T:HttpServer.Helpers.ResourceManager"/> class. |
1113 | </summary> | 1417 | </summary> |
1114 | <param name="errMsg">reason to why the request was bad.</param> | ||
1115 | </member> | 1418 | </member> |
1116 | <member name="M:HttpServer.Exceptions.BadRequestException.#ctor(System.String,System.Exception)"> | 1419 | <member name="M:HttpServer.Helpers.ResourceManager.#ctor(HttpServer.ILogWriter)"> |
1117 | <summary> | 1420 | <summary> |
1118 | Create a new bad request exception. | 1421 | Initializes a new instance of the <see cref="T:HttpServer.Helpers.ResourceManager"/> class. |
1119 | </summary> | 1422 | </summary> |
1120 | <param name="errMsg">reason to why the request was bad.</param> | 1423 | <param name="writer">logger.</param> |
1121 | <param name="inner">inner exception</param> | ||
1122 | </member> | 1424 | </member> |
1123 | <member name="T:HttpServer.ResponseCookies"> | 1425 | <member name="M:HttpServer.Helpers.ResourceManager.LoadResources(System.String,System.Reflection.Assembly,System.String)"> |
1124 | <summary> | 1426 | <summary> |
1125 | Cookies that should be set. | 1427 | Loads resources from a namespace in the given assembly to an URI |
1126 | </summary> | 1428 | </summary> |
1429 | <param name="toUri">The URI to map the resources to</param> | ||
1430 | <param name="fromAssembly">The assembly in which the resources reside</param> | ||
1431 | <param name="fromNamespace">The namespace from which to load the resources</param> | ||
1432 | <usage> | ||
1433 | <code> | ||
1434 | resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views"); | ||
1435 | </code> | ||
1436 | Will make the resource MyLib.Models.User.Views.list.Haml accessible via /user/list.haml or /user/list/ | ||
1437 | </usage> | ||
1438 | <returns>The amount of loaded files, giving you the possibility of making sure the resources needed gets loaded</returns> | ||
1439 | <exception cref="T:System.InvalidOperationException">If a resource has already been mapped to an uri</exception> | ||
1127 | </member> | 1440 | </member> |
1128 | <member name="M:HttpServer.ResponseCookies.Add(HttpServer.ResponseCookie)"> | 1441 | <member name="M:HttpServer.Helpers.ResourceManager.GetResourceStream(System.String)"> |
1129 | <summary> | 1442 | <summary> |
1130 | Adds a cookie in the collection. | 1443 | Retrieves a stream for the specified resource path if loaded otherwise null |
1131 | </summary> | 1444 | </summary> |
1132 | <param name="cookie">cookie to add</param> | 1445 | <param name="path">Path to the resource to retrieve a stream for</param> |
1133 | <exception cref="T:System.ArgumentNullException">cookie is null</exception> | 1446 | <returns>A stream or null if the resource couldn't be found</returns> |
1134 | </member> | 1447 | </member> |
1135 | <member name="M:HttpServer.ResponseCookies.Add(HttpServer.RequestCookie,System.DateTime)"> | 1448 | <member name="M:HttpServer.Helpers.ResourceManager.GetFiles(System.String)"> |
1136 | <summary> | 1449 | <summary> |
1137 | Copy a request cookie | 1450 | Fetch all files from the resource that matches the specified arguments. |
1138 | </summary> | 1451 | </summary> |
1139 | <param name="cookie"></param> | 1452 | <param name="path">The path to the resource to extract</param> |
1140 | <param name="expires">When the cookie should expire</param> | 1453 | <returns> |
1454 | a list of files if found; or an empty array if no files are found. | ||
1455 | </returns> | ||
1456 | <exception cref="T:System.ArgumentException">Search path must end with an asterisk for finding arbitrary files</exception> | ||
1141 | </member> | 1457 | </member> |
1142 | <member name="M:HttpServer.ResponseCookies.GetEnumerator"> | 1458 | <member name="M:HttpServer.Helpers.ResourceManager.GetFiles(System.String,System.String)"> |
1143 | <summary> | 1459 | <summary> |
1144 | Gets a collection enumerator on the cookie list. | 1460 | Fetch all files from the resource that matches the specified arguments. |
1145 | </summary> | 1461 | </summary> |
1146 | <returns>collection enumerator</returns> | 1462 | <param name="path">Where the file should reside.</param> |
1463 | <param name="filename">Files to check</param> | ||
1464 | <returns> | ||
1465 | a list of files if found; or an empty array if no files are found. | ||
1466 | </returns> | ||
1147 | </member> | 1467 | </member> |
1148 | <member name="M:HttpServer.ResponseCookies.Clear"> | 1468 | <member name="M:HttpServer.Helpers.ResourceManager.ContainsResource(System.String)"> |
1149 | <summary> | 1469 | <summary> |
1150 | Remove all cookies | 1470 | Returns whether or not the loader has an instance of the file requested |
1151 | </summary> | 1471 | </summary> |
1472 | <param name="filename">The name of the template/file</param> | ||
1473 | <returns>True if the loader can provide the file</returns> | ||
1152 | </member> | 1474 | </member> |
1153 | <member name="M:HttpServer.ResponseCookies.System#Collections#Generic#IEnumerable{HttpServer#ResponseCookie}#GetEnumerator"> | 1475 | <member name="T:HttpServer.Helpers.WebHelper"> |
1154 | <summary> | 1476 | <summary> |
1155 | Returns an enumerator that iterates through the collection. | 1477 | Webhelper provides helpers for common tasks in HTML. |
1156 | </summary> | 1478 | </summary> |
1157 | |||
1158 | <returns> | ||
1159 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | ||
1160 | </returns> | ||
1161 | <filterpriority>1</filterpriority> | ||
1162 | </member> | 1479 | </member> |
1163 | <member name="P:HttpServer.ResponseCookies.Count"> | 1480 | <member name="F:HttpServer.Helpers.WebHelper.JSImplementation"> |
1164 | <summary> | 1481 | <summary> |
1165 | Gets the count of cookies in the collection. | 1482 | Used to let the website use different javascript libraries. |
1483 | Default is <see cref="T:HttpServer.Helpers.Implementations.PrototypeImp"/> | ||
1166 | </summary> | 1484 | </summary> |
1167 | </member> | 1485 | </member> |
1168 | <member name="P:HttpServer.ResponseCookies.Item(System.String)"> | 1486 | <member name="M:HttpServer.Helpers.WebHelper.AjaxRequest(System.String,System.String,System.String[])"> |
1169 | <summary> | 1487 | <summary> |
1170 | Gets the cookie of a given identifier (null if not existing). | 1488 | Creates a link that invokes through ajax. |
1171 | </summary> | 1489 | </summary> |
1490 | <param name="url">url to fetch</param> | ||
1491 | <param name="title">link title</param> | ||
1492 | <param name="options"> | ||
1493 | optional options in format "key, value, key, value". | ||
1494 | Javascript options starts with ':'. | ||
1495 | </param> | ||
1496 | <returns>a link tag</returns> | ||
1497 | <example> | ||
1498 | WebHelper.AjaxRequest("/users/add/", "Add user", "method:", "post", "onclick", "validate('this');"); | ||
1499 | </example> | ||
1172 | </member> | 1500 | </member> |
1173 | <member name="T:HttpServer.ResponseCookie"> | 1501 | <member name="M:HttpServer.Helpers.WebHelper.AjaxUpdater(System.String,System.String,System.String,System.String[])"> |
1174 | <summary> | 1502 | <summary> |
1175 | cookie being sent back to the browser. | 1503 | Builds a link that updates an element with the fetched ajax content. |
1176 | </summary> | 1504 | </summary> |
1177 | <seealso cref="T:HttpServer.ResponseCookie"/> | 1505 | <param name="url">Url to fetch content from</param> |
1506 | <param name="title">link title</param> | ||
1507 | <param name="targetId">html element to update with the results of the ajax request.</param> | ||
1508 | <param name="options">optional options in format "key, value, key, value"</param> | ||
1509 | <returns>A link tag.</returns> | ||
1178 | </member> | 1510 | </member> |
1179 | <member name="T:HttpServer.RequestCookie"> | 1511 | <member name="M:HttpServer.Helpers.WebHelper.DialogLink(System.String,System.String,System.String[])"> |
1180 | <summary> | 1512 | <summary> |
1181 | cookie sent by the client/browser | 1513 | A link that pop ups a Dialog (overlay div) |
1182 | </summary> | 1514 | </summary> |
1183 | <seealso cref="T:HttpServer.ResponseCookie"/> | 1515 | <param name="url">url to contents of dialog</param> |
1516 | <param name="title">link title</param> | ||
1517 | <param name="htmlAttributes">name/value of html attributes.</param> | ||
1518 | <returns>A "a"-tag that popups a dialog when clicked</returns> | ||
1519 | <example> | ||
1520 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); | ||
1521 | </example> | ||
1184 | </member> | 1522 | </member> |
1185 | <member name="M:HttpServer.RequestCookie.#ctor(System.String,System.String)"> | 1523 | <member name="M:HttpServer.Helpers.WebHelper.CreateDialog(System.String,System.String,System.String[])"> |
1186 | <summary> | 1524 | <summary> |
1187 | Constructor. | 1525 | Create/Open a dialog box using ajax |
1188 | </summary> | 1526 | </summary> |
1189 | <param name="id">cookie identifier</param> | 1527 | <param name="url"></param> |
1190 | <param name="content">cookie content</param> | 1528 | <param name="title"></param> |
1191 | <exception cref="T:System.ArgumentNullException">id or content is null</exception> | 1529 | <param name="parameters"></param> |
1192 | <exception cref="T:System.ArgumentException">id is empty</exception> | 1530 | <returns></returns> |
1193 | </member> | 1531 | </member> |
1194 | <member name="M:HttpServer.RequestCookie.ToString"> | 1532 | <member name="M:HttpServer.Helpers.WebHelper.CloseDialog"> |
1195 | <summary> | 1533 | <summary> |
1196 | Gets the cookie HTML representation. | 1534 | Close a javascript dialog window/div. |
1197 | </summary> | 1535 | </summary> |
1198 | <returns>cookie string</returns> | 1536 | <returns>javascript for closing a dialog.</returns> |
1537 | <see cref="M:HttpServer.Helpers.WebHelper.DialogLink(System.String,System.String,System.String[])"/> | ||
1199 | </member> | 1538 | </member> |
1200 | <member name="P:HttpServer.RequestCookie.Name"> | 1539 | <member name="M:HttpServer.Helpers.WebHelper.FormStart(System.String,System.String,System.Boolean)"> |
1201 | <summary> | 1540 | <summary> |
1202 | Gets the cookie identifier. | 1541 | Create a <form> tag. |
1203 | </summary> | 1542 | </summary> |
1543 | <param name="name">name of form</param> | ||
1544 | <param name="action">action to invoke on submit</param> | ||
1545 | <param name="isAjax">form should be posted as ajax</param> | ||
1546 | <returns>html code</returns> | ||
1547 | <example> | ||
1548 | WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax); | ||
1549 | </example> | ||
1204 | </member> | 1550 | </member> |
1205 | <member name="P:HttpServer.RequestCookie.Value"> | 1551 | <member name="M:HttpServer.Helpers.WebHelper.Link(System.String,System.String,System.String[])"> |
1206 | <summary> | 1552 | <summary> |
1207 | Cookie value. Set to null to remove cookie. | 1553 | Create a link tag. |
1208 | </summary> | 1554 | </summary> |
1555 | <param name="url">url to go to</param> | ||
1556 | <param name="title">link title (text that is displayed)</param> | ||
1557 | <param name="htmlAttributes">html attributes, name, value, name, value</param> | ||
1558 | <returns>html code</returns> | ||
1559 | <example> | ||
1560 | WebHelper.Link("/user/show/1", "Show user", "id", "showUser", "onclick", "return confirm('Are you shure?');"); | ||
1561 | </example> | ||
1209 | </member> | 1562 | </member> |
1210 | <member name="M:HttpServer.ResponseCookie.#ctor(System.String,System.String,System.DateTime)"> | 1563 | <member name="M:HttpServer.Helpers.WebHelper.BuildLink(System.String,System.String,System.String[])"> |
1211 | <summary> | 1564 | <summary> |
1212 | Constructor. | 1565 | Build a link |
1213 | </summary> | 1566 | </summary> |
1214 | <param name="id">cookie identifier</param> | 1567 | <param name="url">url to go to.</param> |
1215 | <param name="content">cookie content</param> | 1568 | <param name="title">title of link (displayed text)</param> |
1216 | <param name="expiresAt">cookie expiration date. Use DateTime.MinValue for session cookie.</param> | 1569 | <param name="htmlAttributes">extra html attributes.</param> |
1217 | <exception cref="T:System.ArgumentNullException">id or content is null</exception> | 1570 | <returns>a complete link</returns> |
1218 | <exception cref="T:System.ArgumentException">id is empty</exception> | ||
1219 | </member> | 1571 | </member> |
1220 | <member name="M:HttpServer.ResponseCookie.#ctor(System.String,System.String,System.DateTime,System.String,System.String)"> | 1572 | <member name="M:HttpServer.Helpers.WebHelper.BuildLink(System.String,System.String,System.String[],System.String[])"> |
1221 | <summary> | 1573 | <summary> |
1222 | Create a new cookie | 1574 | Build a link |
1223 | </summary> | 1575 | </summary> |
1224 | <param name="name">name identifying the cookie</param> | 1576 | <param name="url">url to go to.</param> |
1225 | <param name="value">cookie value</param> | 1577 | <param name="title">title of link (displayed text)</param> |
1226 | <param name="expires">when the cookie expires. Setting DateTime.MinValue will delete the cookie when the session is closed.</param> | 1578 | <param name="htmlAttributes">extra html attributes.</param> |
1227 | <param name="path">Path to where the cookie is valid</param> | 1579 | <returns>a complete link</returns> |
1228 | <param name="domain">Domain that the cookie is valid for.</param> | 1580 | <param name="options">more options</param> |
1229 | </member> | 1581 | </member> |
1230 | <member name="M:HttpServer.ResponseCookie.#ctor(HttpServer.RequestCookie,System.DateTime)"> | 1582 | <member name="M:HttpServer.Helpers.WebHelper.Select(System.String,System.Collections.ICollection,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> |
1231 | <summary> | 1583 | <summary> |
1232 | Create a new cookie | 1584 | Obsolete |
1233 | </summary> | 1585 | </summary> |
1234 | <param name="cookie">Name and value will be used</param> | 1586 | <param name="name">Obsolete</param> |
1235 | <param name="expires">when the cookie expires.</param> | 1587 | <param name="collection">Obsolete</param> |
1588 | <param name="getIdTitle">Obsolete</param> | ||
1589 | <param name="selectedValue">Obsolete</param> | ||
1590 | <param name="firstEmpty">Obsolete</param> | ||
1591 | <returns>Obsolete</returns> | ||
1236 | </member> | 1592 | </member> |
1237 | <member name="M:HttpServer.ResponseCookie.ToString"> | 1593 | <member name="M:HttpServer.Helpers.WebHelper.Select(System.String,System.String,System.Collections.ICollection,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> |
1238 | <summary> | 1594 | <summary> |
1239 | Gets the cookie HTML representation. | 1595 | Obsolete |
1240 | </summary> | 1596 | </summary> |
1241 | <returns>cookie string</returns> | 1597 | <param name="name">Obsolete</param> |
1598 | <param name="id">Obsolete</param> | ||
1599 | <param name="collection">Obsolete</param> | ||
1600 | <param name="getIdTitle">Obsolete</param> | ||
1601 | <param name="selectedValue">Obsolete</param> | ||
1602 | <param name="firstEmpty">Obsolete</param> | ||
1603 | <returns>Obsolete</returns> | ||
1242 | </member> | 1604 | </member> |
1243 | <member name="P:HttpServer.ResponseCookie.Expires"> | 1605 | <member name="M:HttpServer.Helpers.WebHelper.List(System.Collections.Generic.IEnumerable{System.Object},System.String)"> |
1244 | <summary> | 1606 | <summary> |
1245 | When the cookie expires. | 1607 | Render errors into a UL with class "errors" |
1246 | DateTime.MinValue means that the cookie expires when the session do so. | ||
1247 | </summary> | 1608 | </summary> |
1609 | <param name="className">class used by UL-tag.</param> | ||
1610 | <param name="theList">items to list</param> | ||
1611 | <returns>an unordered html list.</returns> | ||
1248 | </member> | 1612 | </member> |
1249 | <member name="P:HttpServer.ResponseCookie.Path"> | 1613 | <member name="M:HttpServer.Helpers.WebHelper.List(System.Collections.Specialized.NameValueCollection,System.String)"> |
1250 | <summary> | 1614 | <summary> |
1251 | Cookie is only valid under this path. | 1615 | Render errors into a UL with class "errors" |
1252 | </summary> | 1616 | </summary> |
1617 | <param name="className">class used by UL-tag.</param> | ||
1618 | <param name="theList">items to list</param> | ||
1619 | <returns>an unordered html list.</returns> | ||
1253 | </member> | 1620 | </member> |
1254 | <member name="T:HttpServer.IComponentProvider"> | 1621 | <member name="M:HttpServer.Helpers.WebHelper.Errors(System.Collections.Specialized.NameValueCollection)"> |
1255 | <summary> | 1622 | <summary> |
1256 | Inversion of control interface. | 1623 | Render errors into a UL with class "errors" |
1257 | </summary> | 1624 | </summary> |
1625 | <param name="errors"></param> | ||
1626 | <returns></returns> | ||
1258 | </member> | 1627 | </member> |
1259 | <member name="M:HttpServer.IComponentProvider.AddInstance``1(System.Object)"> | 1628 | <member name="M:HttpServer.Helpers.WebHelper.GenerateHtmlAttributes(System.Text.StringBuilder,System.String[],System.String[])"> |
1260 | <summary> | 1629 | <summary> |
1261 | Add a component instance | 1630 | Generates a list with html attributes. |
1262 | </summary> | 1631 | </summary> |
1263 | <typeparam name="T">Interface type</typeparam> | 1632 | <param name="sb">StringBuilder that the options should be added to.</param> |
1264 | <param name="instance">Instance to add</param> | 1633 | <param name="firstOptions">attributes set by user.</param> |
1634 | <param name="secondOptions">attributes set by any of the helper classes.</param> | ||
1265 | </member> | 1635 | </member> |
1266 | <member name="M:HttpServer.IComponentProvider.Get``1"> | 1636 | <member name="M:HttpServer.Helpers.WebHelper.GenerateHtmlAttributes(System.Text.StringBuilder,System.String[])"> |
1267 | <summary> | 1637 | <summary> |
1268 | Get a component. | 1638 | Generates a list with html attributes. |
1269 | </summary> | 1639 | </summary> |
1270 | <typeparam name="T">Interface type</typeparam> | 1640 | <param name="sb">StringBuilder that the options should be added to.</param> |
1271 | <returns>Component if registered, otherwise null.</returns> | 1641 | <param name="options"></param> |
1272 | <remarks> | ||
1273 | Component will get created if needed. | ||
1274 | </remarks> | ||
1275 | </member> | 1642 | </member> |
1276 | <member name="M:HttpServer.IComponentProvider.Contains(System.Type)"> | 1643 | <member name="T:HttpServer.Helpers.JavascriptHelperImplementation"> |
1277 | <summary> | 1644 | <summary> |
1278 | Checks if the specified component interface have been added. | 1645 | Purpose of this class is to create a javascript toolkit independent javascript helper. |
1279 | </summary> | 1646 | </summary> |
1280 | <param name="interfaceType"></param> | ||
1281 | <returns>true if found; otherwise false.</returns> | ||
1282 | </member> | 1647 | </member> |
1283 | <member name="M:HttpServer.IComponentProvider.Add``2"> | 1648 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.GenerateOptions(System.Text.StringBuilder,System.String[],System.Boolean)"> |
1284 | <summary> | 1649 | <summary> |
1285 | Add a component. | 1650 | Generates a list with JS options. |
1286 | </summary> | 1651 | </summary> |
1287 | <typeparam name="InterfaceType">Type being requested.</typeparam> | 1652 | <param name="sb">StringBuilder that the options should be added to.</param> |
1288 | <typeparam name="InstanceType">Type being created.</typeparam> | 1653 | <param name="options">the javascript options. name, value pairs. each string value should be escaped by YOU!</param> |
1654 | <param name="startWithComma">true if we should start with a comma.</param> | ||
1289 | </member> | 1655 | </member> |
1290 | <member name="T:HttpServer.HttpListenerBase"> | 1656 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.RemoveJavascriptOptions(System.String[])"> |
1291 | <summary> | 1657 | <summary> |
1292 | Contains a listener that doesn't do anything with the connections. | 1658 | Removes any javascript parameters from an array of parameters |
1293 | </summary> | 1659 | </summary> |
1660 | <param name="options">The array of parameters to remove javascript params from</param> | ||
1661 | <returns>An array of html parameters</returns> | ||
1294 | </member> | 1662 | </member> |
1295 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory)"> | 1663 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxFormOnSubmit(System.String[])"> |
1296 | <summary> | 1664 | <summary> |
1297 | Listen for regular HTTP connections | 1665 | javascript action that should be added to the "onsubmit" event in the form tag. |
1298 | </summary> | 1666 | </summary> |
1299 | <param name="address">IP Address to accept connections on</param> | 1667 | <returns></returns> |
1300 | <param name="port">TCP Port to listen on, default HTTP port is 80.</param> | 1668 | <remarks>All javascript option names should end with colon.</remarks> |
1301 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | 1669 | <example> |
1302 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | 1670 | <code> |
1303 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | 1671 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); |
1672 | </code> | ||
1673 | </example> | ||
1304 | </member> | 1674 | </member> |
1305 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate)"> | 1675 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxRequest(System.String,System.String[])"> |
1306 | <summary> | 1676 | <summary> |
1307 | Initializes a new instance of the <see cref="T:HttpServer.HttpListenerBase"/> class. | 1677 | Requests a url through ajax |
1308 | </summary> | 1678 | </summary> |
1309 | <param name="address">IP Address to accept connections on</param> | 1679 | <param name="url">url to fetch</param> |
1310 | <param name="port">TCP Port to listen on, default HTTPS port is 443</param> | 1680 | <param name="options">optional options in format "key, value, key, value", used in JS request object.</param> |
1311 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | 1681 | <returns>a link tag</returns> |
1312 | <param name="certificate">Certificate to use</param> | 1682 | <remarks>All javascript option names should end with colon.</remarks> |
1683 | <example> | ||
1684 | <code> | ||
1685 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | ||
1686 | </code> | ||
1687 | </example> | ||
1313 | </member> | 1688 | </member> |
1314 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> | 1689 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxUpdater(System.String,System.String,System.String[])"> |
1315 | <summary> | 1690 | <summary> |
1316 | Initializes a new instance of the <see cref="T:HttpServer.HttpListenerBase"/> class. | 1691 | Ajax requests that updates an element with |
1692 | the fetched content | ||
1317 | </summary> | 1693 | </summary> |
1318 | <param name="address">IP Address to accept connections on</param> | 1694 | <param name="url">Url to fetch content from</param> |
1319 | <param name="port">TCP Port to listen on, default HTTPS port is 443</param> | 1695 | <param name="targetId">element to update</param> |
1320 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | 1696 | <param name="options">optional options in format "key, value, key, value", used in JS updater object.</param> |
1321 | <param name="certificate">Certificate to use</param> | 1697 | <returns>A link tag.</returns> |
1322 | <param name="protocol">which HTTPS protocol to use, default is TLS.</param> | 1698 | <remarks>All javascript option names should end with colon.</remarks> |
1323 | </member> | 1699 | <example> |
1324 | <member name="M:HttpServer.HttpListenerBase.OnAccept(System.IAsyncResult)"> | 1700 | <code> |
1325 | <exception cref="T:System.Exception"><c>Exception</c>.</exception> | 1701 | JSHelper.AjaxUpdater("/user/show/1", "userInfo", "onsuccess:", "alert('Successful!');"); |
1702 | </code> | ||
1703 | </example> | ||
1326 | </member> | 1704 | </member> |
1327 | <member name="M:HttpServer.HttpListenerBase.RetryBeginAccept"> | 1705 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.DialogLink(System.String,System.String,System.String[])"> |
1328 | <summary> | 1706 | <summary> |
1329 | Will try to accept connections one more time. | 1707 | A link that pop ups a Dialog (overlay div) |
1330 | </summary> | 1708 | </summary> |
1331 | <exception cref="T:System.Exception">If any exceptions is thrown.</exception> | 1709 | <param name="url">url to contents of dialog</param> |
1710 | <param name="title">link title</param> | ||
1711 | <returns>A "a"-tag that popups a dialog when clicked</returns> | ||
1712 | <param name="htmlAttributes">name/value of html attributes</param> | ||
1713 | <example> | ||
1714 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); | ||
1715 | </example> | ||
1332 | </member> | 1716 | </member> |
1333 | <member name="M:HttpServer.HttpListenerBase.OnAcceptingSocket(System.Net.Sockets.Socket)"> | 1717 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.CloseDialog"> |
1334 | <summary> | 1718 | <summary> |
1335 | Can be used to create filtering of new connections. | 1719 | Close a javascript dialog window/div. |
1336 | </summary> | 1720 | </summary> |
1337 | <param name="socket">Accepted socket</param> | 1721 | <returns>javascript for closing a dialog.</returns> |
1338 | <returns>true if connection can be accepted; otherwise false.</returns> | 1722 | <see cref="M:HttpServer.Helpers.JavascriptHelperImplementation.DialogLink(System.String,System.String,System.String[])"/> |
1339 | </member> | 1723 | </member> |
1340 | <member name="M:HttpServer.HttpListenerBase.Start(System.Int32)"> | 1724 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.CreateDialog(System.String,System.String,System.String[])"> |
1341 | <summary> | 1725 | <summary> |
1342 | Start listen for new connections | 1726 | Creates a new modal dialog window |
1343 | </summary> | 1727 | </summary> |
1344 | <param name="backlog">Number of connections that can stand in a queue to be accepted.</param> | 1728 | <param name="url">url to open in window.</param> |
1345 | <exception cref="T:System.InvalidOperationException">Listener have already been started.</exception> | 1729 | <param name="title">window title (may not be supported by all js implementations)</param> |
1730 | <param name="options"></param> | ||
1731 | <returns></returns> | ||
1346 | </member> | 1732 | </member> |
1347 | <member name="M:HttpServer.HttpListenerBase.Stop"> | 1733 | <member name="T:HttpServer.Helpers.XmlHelper"> |
1348 | <summary> | 1734 | <summary> |
1349 | Stop the listener | 1735 | Helpers to make XML handling easier |
1350 | </summary> | 1736 | </summary> |
1351 | <exception cref="T:System.Net.Sockets.SocketException"></exception> | ||
1352 | </member> | 1737 | </member> |
1353 | <member name="P:HttpServer.HttpListenerBase.LogWriter"> | 1738 | <member name="M:HttpServer.Helpers.XmlHelper.Serialize(System.Object)"> |
1354 | <summary> | 1739 | <summary> |
1355 | Gives you a change to receive log entries for all internals of the HTTP library. | 1740 | Serializes object to XML. |
1356 | </summary> | 1741 | </summary> |
1742 | <param name="value">object to serialize.</param> | ||
1743 | <returns>XML</returns> | ||
1357 | <remarks> | 1744 | <remarks> |
1358 | You may not switch log writer after starting the listener. | 1745 | Removes name spaces and adds indentation |
1359 | </remarks> | 1746 | </remarks> |
1360 | </member> | 1747 | </member> |
1361 | <member name="P:HttpServer.HttpListenerBase.UseTraceLogs"> | 1748 | <member name="M:HttpServer.Helpers.XmlHelper.Deserialize``1(System.String)"> |
1362 | <summary> | 1749 | <summary> |
1363 | True if we should turn on trace logs. | 1750 | Create an object from a XML string |
1364 | </summary> | 1751 | </summary> |
1752 | <typeparam name="T">Type of object</typeparam> | ||
1753 | <param name="xml">XML string</param> | ||
1754 | <returns>object</returns> | ||
1365 | </member> | 1755 | </member> |
1366 | <member name="E:HttpServer.HttpListenerBase.ExceptionThrown"> | 1756 | <member name="T:HttpServer.HttpClientContext"> |
1367 | <summary> | 1757 | <summary> |
1368 | Catch exceptions not handled by the listener. | 1758 | Contains a connection to a browser/client. |
1369 | </summary> | 1759 | </summary> |
1370 | <remarks> | 1760 | <remarks> |
1371 | Exceptions will be thrown during debug mode if this event is not used, | 1761 | Remember to <see cref="M:HttpServer.HttpClientContext.Start"/> after you have hooked the <see cref="E:HttpServer.HttpClientContext.RequestReceived"/> event. |
1372 | exceptions will be printed to console and suppressed during release mode. | ||
1373 | </remarks> | 1762 | </remarks> |
1763 | TODO: Maybe this class should be broken up into HttpClientChannel and HttpClientContext? | ||
1374 | </member> | 1764 | </member> |
1375 | <member name="E:HttpServer.HttpListenerBase.RequestReceived"> | 1765 | <member name="E:HttpServer.HttpClientContext.Cleaned"> |
1376 | <summary> | 1766 | <summary> |
1377 | A request have been received from a <see cref="T:HttpServer.IHttpClientContext"/>. | 1767 | This context have been cleaned, which means that it can be reused. |
1378 | </summary> | 1768 | </summary> |
1379 | </member> | 1769 | </member> |
1380 | <member name="T:HttpServer.HttpListener"> | 1770 | <member name="E:HttpServer.HttpClientContext.Started"> |
1381 | <summary> | 1771 | <summary> |
1382 | New implementation of the HTTP listener. | 1772 | Context have been started (a new client have connected) |
1383 | </summary> | 1773 | </summary> |
1384 | <remarks> | ||
1385 | Use the <c>Create</c> methods to create a default listener. | ||
1386 | </remarks> | ||
1387 | </member> | 1774 | </member> |
1388 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory)"> | 1775 | <member name="M:HttpServer.HttpClientContext.#ctor(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,HttpServer.IRequestParserFactory,System.Int32,System.Net.Sockets.Socket)"> |
1389 | <summary> | 1776 | <summary> |
1390 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. | 1777 | Initializes a new instance of the <see cref="T:HttpServer.HttpClientContext"/> class. |
1391 | </summary> | 1778 | </summary> |
1392 | <param name="address">IP Address to accept connections on</param> | 1779 | <param name="secured">true if the connection is secured (SSL/TLS)</param> |
1393 | <param name="port">TCP Port to listen on, default HTTP port is 80.</param> | 1780 | <param name="remoteEndPoint">client that connected.</param> |
1394 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | 1781 | <param name="stream">Stream used for communication</param> |
1395 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | 1782 | <param name="parserFactory">Used to create a <see cref="T:HttpServer.IHttpRequestParser"/>.</param> |
1396 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | 1783 | <param name="bufferSize">Size of buffer to use when reading data. Must be at least 4096 bytes.</param> |
1784 | <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> | ||
1785 | <exception cref="T:System.ArgumentException">Stream must be writable and readable.</exception> | ||
1397 | </member> | 1786 | </member> |
1398 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate)"> | 1787 | <member name="M:HttpServer.HttpClientContext.OnBodyBytesReceived(System.Object,HttpServer.Parser.BodyEventArgs)"> |
1399 | <summary> | 1788 | <summary> |
1400 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. | 1789 | Process incoming body bytes. |
1401 | </summary> | 1790 | </summary> |
1402 | <param name="address">The address.</param> | 1791 | <param name="sender"><see cref="T:HttpServer.IHttpRequestParser"/></param> |
1403 | <param name="port">The port.</param> | 1792 | <param name="e">Bytes</param> |
1404 | <param name="factory">The factory.</param> | ||
1405 | <param name="certificate">The certificate.</param> | ||
1406 | </member> | 1793 | </member> |
1407 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> | 1794 | <member name="M:HttpServer.HttpClientContext.OnHeaderReceived(System.Object,HttpServer.Parser.HeaderEventArgs)"> |
1408 | <summary> | 1795 | <summary> |
1409 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. | 1796 | |
1410 | </summary> | 1797 | </summary> |
1411 | <param name="address">The address.</param> | 1798 | <param name="sender"></param> |
1412 | <param name="port">The port.</param> | 1799 | <param name="e"></param> |
1413 | <param name="factory">The factory.</param> | ||
1414 | <param name="certificate">The certificate.</param> | ||
1415 | <param name="protocol">The protocol.</param> | ||
1416 | </member> | 1800 | </member> |
1417 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32)"> | 1801 | <member name="P:HttpServer.HttpClientContext.CurrentRequest"> |
1418 | <summary> | 1802 | <summary> |
1419 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. | 1803 | Overload to specify own type. |
1420 | </summary> | 1804 | </summary> |
1421 | <param name="address">Address that the listener should accept connections on.</param> | 1805 | <remarks> |
1422 | <param name="port">Port that listener should accept connections on.</param> | 1806 | Must be specified before the context is being used. |
1423 | <returns>Created HTTP listener.</returns> | 1807 | </remarks> |
1424 | </member> | 1808 | </member> |
1425 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate)"> | 1809 | <member name="M:HttpServer.HttpClientContext.Start"> |
1426 | <summary> | 1810 | <summary> |
1427 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. | 1811 | Start reading content. |
1428 | </summary> | 1812 | </summary> |
1429 | <param name="address">Address that the listener should accept connections on.</param> | 1813 | <remarks> |
1430 | <param name="port">Port that listener should accept connections on.</param> | 1814 | Make sure to call base.Start() if you override this method. |
1431 | <param name="certificate">Certificate to use</param> | 1815 | </remarks> |
1432 | <returns>Created HTTP listener.</returns> | ||
1433 | </member> | 1816 | </member> |
1434 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> | 1817 | <member name="M:HttpServer.HttpClientContext.Cleanup"> |
1435 | <summary> | 1818 | <summary> |
1436 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. | 1819 | Clean up context. |
1437 | </summary> | 1820 | </summary> |
1438 | <param name="address">Address that the listener should accept connections on.</param> | 1821 | <remarks> |
1439 | <param name="port">Port that listener should accept connections on.</param> | 1822 | Make sure to call base.Cleanup() if you override the method. |
1440 | <param name="certificate">Certificate to use</param> | 1823 | </remarks> |
1441 | <param name="protocol">which HTTPS protocol to use, default is TLS.</param> | ||
1442 | <returns>Created HTTP listener.</returns> | ||
1443 | </member> | 1824 | </member> |
1444 | <member name="M:HttpServer.HttpListener.OnAcceptingSocket(System.Net.Sockets.Socket)"> | 1825 | <member name="P:HttpServer.HttpClientContext.Secured"> |
1445 | <summary> | 1826 | <summary> |
1446 | Can be used to create filtering of new connections. | 1827 | Using SSL or other encryption method. |
1447 | </summary> | 1828 | </summary> |
1448 | <param name="socket">Accepted socket</param> | ||
1449 | <returns> | ||
1450 | true if connection can be accepted; otherwise false. | ||
1451 | </returns> | ||
1452 | </member> | 1829 | </member> |
1453 | <member name="E:HttpServer.HttpListener.Accepted"> | 1830 | <member name="P:HttpServer.HttpClientContext.IsSecured"> |
1454 | <summary> | 1831 | <summary> |
1455 | A client have been accepted, but not handled, by the listener. | 1832 | Using SSL or other encryption method. |
1456 | </summary> | 1833 | </summary> |
1457 | </member> | 1834 | </member> |
1458 | <member name="T:HttpServer.Rules.RedirectRule"> | 1835 | <member name="P:HttpServer.HttpClientContext.LogWriter"> |
1459 | <summary> | 1836 | <summary> |
1460 | redirects from one URL to another. | 1837 | Specify which logger to use. |
1461 | </summary> | 1838 | </summary> |
1462 | </member> | 1839 | </member> |
1463 | <member name="T:HttpServer.Rules.IRule"> | 1840 | <member name="P:HttpServer.HttpClientContext.Stream"> |
1464 | <summary> | 1841 | <summary> |
1465 | Rules are used to perform operations before a request is being handled. | 1842 | Gets or sets the network stream. |
1466 | Rules can be used to create routing etc. | ||
1467 | </summary> | 1843 | </summary> |
1468 | </member> | 1844 | </member> |
1469 | <member name="M:HttpServer.Rules.IRule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse)"> | 1845 | <member name="P:HttpServer.HttpClientContext.RemoteAddress"> |
1470 | <summary> | 1846 | <summary> |
1471 | Process the incoming request. | 1847 | Gets or sets IP address that the client connected from. |
1472 | </summary> | 1848 | </summary> |
1473 | <param name="request">incoming HTTP request</param> | ||
1474 | <param name="response">outgoing HTTP response</param> | ||
1475 | <returns>true if response should be sent to the browser directly (no other rules or modules will be processed).</returns> | ||
1476 | <remarks> | ||
1477 | returning true means that no modules will get the request. Returning true is typically being done | ||
1478 | for redirects. | ||
1479 | </remarks> | ||
1480 | <exception cref="T:System.ArgumentNullException">If request or response is null.</exception> | ||
1481 | </member> | 1849 | </member> |
1482 | <member name="M:HttpServer.Rules.RedirectRule.#ctor(System.String,System.String)"> | 1850 | <member name="P:HttpServer.HttpClientContext.RemotePort"> |
1483 | <summary> | 1851 | <summary> |
1484 | Initializes a new instance of the <see cref="T:HttpServer.Rules.RedirectRule"/> class. | 1852 | Gets or sets port that the client connected from. |
1485 | </summary> | 1853 | </summary> |
1486 | <param name="fromUrl">Absolute path (no server name)</param> | ||
1487 | <param name="toUrl">Absolute path (no server name)</param> | ||
1488 | <example> | ||
1489 | server.Add(new RedirectRule("/", "/user/index")); | ||
1490 | </example> | ||
1491 | </member> | 1854 | </member> |
1492 | <member name="M:HttpServer.Rules.RedirectRule.#ctor(System.String,System.String,System.Boolean)"> | 1855 | <member name="M:HttpServer.HttpClientContext.Disconnect(System.Net.Sockets.SocketError)"> |
1493 | <summary> | 1856 | <summary> |
1494 | Initializes a new instance of the <see cref="T:HttpServer.Rules.RedirectRule"/> class. | 1857 | Disconnect from client |
1495 | </summary> | 1858 | </summary> |
1496 | <param name="fromUrl">Absolute path (no server name)</param> | 1859 | <param name="error">error to report in the <see cref="E:HttpServer.HttpClientContext.Disconnected"/> event.</param> |
1497 | <param name="toUrl">Absolute path (no server name)</param> | ||
1498 | <param name="shouldRedirect">true if request should be redirected, false if the request URI should be replaced.</param> | ||
1499 | <example> | ||
1500 | server.Add(new RedirectRule("/", "/user/index")); | ||
1501 | </example> | ||
1502 | </member> | 1860 | </member> |
1503 | <member name="M:HttpServer.Rules.RedirectRule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse)"> | 1861 | <member name="M:HttpServer.HttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String,System.String,System.String)"> |
1504 | <summary> | 1862 | <summary> |
1505 | Process the incoming request. | 1863 | Send a response. |
1506 | </summary> | 1864 | </summary> |
1507 | <param name="request">incoming HTTP request</param> | 1865 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> |
1508 | <param name="response">outgoing HTTP response</param> | 1866 | <param name="statusCode">HTTP status code</param> |
1509 | <returns>true if response should be sent to the browser directly (no other rules or modules will be processed).</returns> | 1867 | <param name="reason">reason for the status code.</param> |
1510 | <remarks> | 1868 | <param name="body">HTML body contents, can be null or empty.</param> |
1511 | returning true means that no modules will get the request. Returning true is typically being done | 1869 | <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> |
1512 | for redirects. | 1870 | <exception cref="T:System.ArgumentException">If <paramref name="httpVersion"/> is invalid.</exception> |
1513 | </remarks> | ||
1514 | </member> | 1871 | </member> |
1515 | <member name="P:HttpServer.Rules.RedirectRule.FromUrl"> | 1872 | <member name="M:HttpServer.HttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String)"> |
1516 | <summary> | 1873 | <summary> |
1517 | Gets string to match request URI with. | 1874 | Send a response. |
1518 | </summary> | 1875 | </summary> |
1519 | <remarks>Is compared to request.Uri.AbsolutePath</remarks> | 1876 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> |
1877 | <param name="statusCode">HTTP status code</param> | ||
1878 | <param name="reason">reason for the status code.</param> | ||
1520 | </member> | 1879 | </member> |
1521 | <member name="P:HttpServer.Rules.RedirectRule.ToUrl"> | 1880 | <member name="M:HttpServer.HttpClientContext.Respond(System.String)"> |
1522 | <summary> | 1881 | <summary> |
1523 | Gets where to redirect. | 1882 | Send a response. |
1524 | </summary> | 1883 | </summary> |
1884 | <exception cref="T:System.ArgumentNullException"></exception> | ||
1525 | </member> | 1885 | </member> |
1526 | <member name="P:HttpServer.Rules.RedirectRule.ShouldRedirect"> | 1886 | <member name="M:HttpServer.HttpClientContext.Send(System.Byte[])"> |
1527 | <summary> | 1887 | <summary> |
1528 | Gets whether server should redirect client. | 1888 | send a whole buffer |
1529 | </summary> | 1889 | </summary> |
1530 | <remarks> | 1890 | <param name="buffer">buffer to send</param> |
1531 | <c>false</c> means that the rule will replace | 1891 | <exception cref="T:System.ArgumentNullException"></exception> |
1532 | the current request URI with the new one from this class. | ||
1533 | <c>true</c> means that a redirect response is sent to the client. | ||
1534 | </remarks> | ||
1535 | </member> | 1892 | </member> |
1536 | <member name="T:HttpServer.Parser.HttpRequestParser"> | 1893 | <member name="M:HttpServer.HttpClientContext.Send(System.Byte[],System.Int32,System.Int32)"> |
1537 | <summary> | 1894 | <summary> |
1538 | Parses a HTTP request directly from a stream | 1895 | Send data using the stream |
1539 | </summary> | 1896 | </summary> |
1897 | <param name="buffer">Contains data to send</param> | ||
1898 | <param name="offset">Start position in buffer</param> | ||
1899 | <param name="size">number of bytes to send</param> | ||
1900 | <exception cref="T:System.ArgumentNullException"></exception> | ||
1901 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> | ||
1540 | </member> | 1902 | </member> |
1541 | <member name="T:HttpServer.IHttpRequestParser"> | 1903 | <member name="E:HttpServer.HttpClientContext.Disconnected"> |
1542 | <summary> | 1904 | <summary> |
1543 | Event driven parser used to parse incoming HTTP requests. | 1905 | The context have been disconnected. |
1544 | </summary> | 1906 | </summary> |
1545 | <remarks> | 1907 | <remarks> |
1546 | The parser supports partial messages and keeps the states between | 1908 | Event can be used to clean up a context, or to reuse it. |
1547 | each parsed buffer. It's therefore important that the parser gets | ||
1548 | <see cref="M:HttpServer.IHttpRequestParser.Clear"/>ed if a client disconnects. | ||
1549 | </remarks> | 1909 | </remarks> |
1550 | </member> | 1910 | </member> |
1551 | <member name="M:HttpServer.IHttpRequestParser.Parse(System.Byte[],System.Int32,System.Int32)"> | 1911 | <member name="E:HttpServer.HttpClientContext.RequestReceived"> |
1552 | <summary> | 1912 | <summary> |
1553 | Parse partial or complete message. | 1913 | A request have been received in the context. |
1554 | </summary> | 1914 | </summary> |
1555 | <param name="buffer">buffer containing incoming bytes</param> | ||
1556 | <param name="offset">where in buffer that parsing should start</param> | ||
1557 | <param name="count">number of bytes to parse</param> | ||
1558 | <returns>Unparsed bytes left in buffer.</returns> | ||
1559 | <exception cref="T:HttpServer.Exceptions.BadRequestException"><c>BadRequestException</c>.</exception> | ||
1560 | </member> | 1915 | </member> |
1561 | <member name="M:HttpServer.IHttpRequestParser.Clear"> | 1916 | <member name="T:HttpServer.HttpContextFactory"> |
1562 | <summary> | 1917 | <summary> |
1563 | Clear parser state. | 1918 | Used to create and reuse contexts. |
1564 | </summary> | 1919 | </summary> |
1565 | </member> | 1920 | </member> |
1566 | <member name="P:HttpServer.IHttpRequestParser.CurrentState"> | 1921 | <member name="M:HttpServer.HttpContextFactory.#ctor(HttpServer.ILogWriter,System.Int32,HttpServer.IRequestParserFactory)"> |
1567 | <summary> | 1922 | <summary> |
1568 | Current state in parser. | 1923 | Initializes a new instance of the <see cref="T:HttpServer.HttpContextFactory"/> class. |
1569 | </summary> | 1924 | </summary> |
1925 | <param name="writer">The writer.</param> | ||
1926 | <param name="bufferSize">Amount of bytes to read from the incoming socket stream.</param> | ||
1927 | <param name="factory">Used to create a request parser.</param> | ||
1570 | </member> | 1928 | </member> |
1571 | <member name="E:HttpServer.IHttpRequestParser.RequestCompleted"> | 1929 | <member name="P:HttpServer.HttpContextFactory.UseTraceLogs"> |
1572 | <summary> | 1930 | <summary> |
1573 | A request have been successfully parsed. | 1931 | True if detailed trace logs should be written. |
1574 | </summary> | 1932 | </summary> |
1575 | </member> | 1933 | </member> |
1576 | <member name="E:HttpServer.IHttpRequestParser.BodyBytesReceived"> | 1934 | <member name="M:HttpServer.HttpContextFactory.CreateContext(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,System.Net.Sockets.Socket)"> |
1577 | <summary> | 1935 | <summary> |
1578 | More body bytes have been received. | 1936 | Create a new context. |
1579 | </summary> | 1937 | </summary> |
1938 | <param name="isSecured">true if socket is running HTTPS.</param> | ||
1939 | <param name="endPoint">Client that connected</param> | ||
1940 | <param name="stream">Network/SSL stream.</param> | ||
1941 | <returns>A context.</returns> | ||
1580 | </member> | 1942 | </member> |
1581 | <member name="E:HttpServer.IHttpRequestParser.RequestLineReceived"> | 1943 | <member name="M:HttpServer.HttpContextFactory.CreateNewContext(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,System.Net.Sockets.Socket)"> |
1582 | <summary> | 1944 | <summary> |
1583 | Request line have been received. | 1945 | Create a new context. |
1584 | </summary> | 1946 | </summary> |
1947 | <param name="isSecured">true if HTTPS is used.</param> | ||
1948 | <param name="endPoint">Remote client</param> | ||
1949 | <param name="stream">Network stream, <see cref="T:HttpServer.HttpClientContext"/> uses <see cref="T:HttpServer.ReusableSocketNetworkStream"/>.</param> | ||
1950 | <returns>A new context (always).</returns> | ||
1585 | </member> | 1951 | </member> |
1586 | <member name="E:HttpServer.IHttpRequestParser.HeaderReceived"> | 1952 | <member name="M:HttpServer.HttpContextFactory.CreateSecureContext(System.Net.Sockets.Socket,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> |
1587 | <summary> | 1953 | <summary> |
1588 | A header have been received. | 1954 | Create a secure <see cref="T:HttpServer.IHttpClientContext"/>. |
1589 | </summary> | 1955 | </summary> |
1956 | <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param> | ||
1957 | <param name="certificate">HTTPS certificate to use.</param> | ||
1958 | <param name="protocol">Kind of HTTPS protocol. Usually TLS or SSL.</param> | ||
1959 | <returns> | ||
1960 | A created <see cref="T:HttpServer.IHttpClientContext"/>. | ||
1961 | </returns> | ||
1590 | </member> | 1962 | </member> |
1591 | <member name="P:HttpServer.IHttpRequestParser.LogWriter"> | 1963 | <member name="E:HttpServer.HttpContextFactory.RequestReceived"> |
1592 | <summary> | 1964 | <summary> |
1593 | Gets or sets the log writer. | 1965 | A request have been received from one of the contexts. |
1594 | </summary> | 1966 | </summary> |
1595 | </member> | 1967 | </member> |
1596 | <member name="M:HttpServer.Parser.HttpRequestParser.#ctor(HttpServer.ILogWriter)"> | 1968 | <member name="M:HttpServer.HttpContextFactory.CreateContext(System.Net.Sockets.Socket)"> |
1597 | <summary> | 1969 | <summary> |
1598 | Create a new request parser | 1970 | Creates a <see cref="T:HttpServer.IHttpClientContext"/> that handles a connected client. |
1599 | </summary> | 1971 | </summary> |
1600 | <param name="logWriter">delegate receiving log entries.</param> | 1972 | <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param> |
1973 | <returns> | ||
1974 | A creates <see cref="T:HttpServer.IHttpClientContext"/>. | ||
1975 | </returns> | ||
1601 | </member> | 1976 | </member> |
1602 | <member name="M:HttpServer.Parser.HttpRequestParser.AddToBody(System.Byte[],System.Int32,System.Int32)"> | 1977 | <member name="M:HttpServer.HttpContextFactory.Shutdown"> |
1603 | <summary> | 1978 | <summary> |
1604 | Add a number of bytes to the body | 1979 | Server is shutting down so shut down the factory |
1605 | </summary> | 1980 | </summary> |
1606 | <param name="buffer">buffer containing more body bytes.</param> | ||
1607 | <param name="offset">starting offset in buffer</param> | ||
1608 | <param name="count">number of bytes, from offset, to read.</param> | ||
1609 | <returns>offset to continue from.</returns> | ||
1610 | </member> | 1981 | </member> |
1611 | <member name="M:HttpServer.Parser.HttpRequestParser.Clear"> | 1982 | <member name="T:HttpServer.ReusableSocketNetworkStream"> |
1612 | <summary> | 1983 | <summary> |
1613 | Remove all state information for the request. | 1984 | Custom network stream to mark sockets as reusable when disposing the stream. |
1614 | </summary> | 1985 | </summary> |
1615 | </member> | 1986 | </member> |
1616 | <member name="M:HttpServer.Parser.HttpRequestParser.OnFirstLine(System.String)"> | 1987 | <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket)"> |
1617 | <summary> | 1988 | <summary> |
1618 | Parse request line | 1989 | Creates a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" />. |
1619 | </summary> | 1990 | </summary> |
1620 | <param name="value"></param> | 1991 | <param name="socket"> |
1621 | <exception cref="T:HttpServer.Exceptions.BadRequestException">If line is incorrect</exception> | 1992 | The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data. |
1622 | <remarks>Expects the following format: "Method SP Request-URI SP HTTP-Version CRLF"</remarks> | 1993 | </param> |
1994 | <exception cref="T:System.ArgumentNullException"> | ||
1995 | The <paramref name="socket" /> parameter is null. | ||
1996 | </exception> | ||
1997 | <exception cref="T:System.IO.IOException"> | ||
1998 | The <paramref name="socket" /> parameter is not connected. | ||
1999 | -or- | ||
2000 | The <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />. | ||
2001 | -or- | ||
2002 | The <paramref name="socket" /> parameter is in a nonblocking state. | ||
2003 | </exception> | ||
1623 | </member> | 2004 | </member> |
1624 | <member name="M:HttpServer.Parser.HttpRequestParser.OnHeader(System.String,System.String)"> | 2005 | <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket,System.Boolean)"> |
1625 | <summary> | 2006 | <summary> |
1626 | We've parsed a new header. | 2007 | Initializes a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" /> with the specified <see cref="T:System.Net.Sockets.Socket" /> ownership. |
1627 | </summary> | 2008 | </summary> |
1628 | <param name="name">Name in lower case</param> | 2009 | <param name="socket"> |
1629 | <param name="value">Value, unmodified.</param> | 2010 | The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data. |
1630 | <exception cref="T:HttpServer.Exceptions.BadRequestException">If content length cannot be parsed.</exception> | 2011 | </param> |
2012 | <param name="ownsSocket"> | ||
2013 | Set to true to indicate that the <see cref="T:System.Net.Sockets.NetworkStream" /> will take ownership of the <see cref="T:System.Net.Sockets.Socket" />; otherwise, false. | ||
2014 | </param> | ||
2015 | <exception cref="T:System.ArgumentNullException"> | ||
2016 | The <paramref name="socket" /> parameter is null. | ||
2017 | </exception> | ||
2018 | <exception cref="T:System.IO.IOException"> | ||
2019 | The <paramref name="socket" /> parameter is not connected. | ||
2020 | -or- | ||
2021 | the value of the <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />. | ||
2022 | -or- | ||
2023 | the <paramref name="socket" /> parameter is in a nonblocking state. | ||
2024 | </exception> | ||
1631 | </member> | 2025 | </member> |
1632 | <member name="M:HttpServer.Parser.HttpRequestParser.Parse(System.Byte[],System.Int32,System.Int32)"> | 2026 | <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket,System.IO.FileAccess)"> |
1633 | <summary> | 2027 | <summary> |
1634 | Parse a message | 2028 | Creates a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" /> with the specified access rights. |
1635 | </summary> | 2029 | </summary> |
1636 | <param name="buffer">bytes to parse.</param> | 2030 | <param name="socket"> |
1637 | <param name="offset">where in buffer that parsing should start</param> | 2031 | The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data. |
1638 | <param name="count">number of bytes to parse, starting on <paramref name="offset"/>.</param> | 2032 | </param> |
1639 | <returns>offset (where to start parsing next).</returns> | 2033 | <param name="access"> |
1640 | <exception cref="T:HttpServer.Exceptions.BadRequestException"><c>BadRequestException</c>.</exception> | 2034 | A bitwise combination of the <see cref="T:System.IO.FileAccess" /> values that specify the type of access given to the <see cref="T:System.Net.Sockets.NetworkStream" /> over the provided <see cref="T:System.Net.Sockets.Socket" />. |
2035 | </param> | ||
2036 | <exception cref="T:System.ArgumentNullException"> | ||
2037 | The <paramref name="socket" /> parameter is null. | ||
2038 | </exception> | ||
2039 | <exception cref="T:System.IO.IOException"> | ||
2040 | The <paramref name="socket" /> parameter is not connected. | ||
2041 | -or- | ||
2042 | the <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />. | ||
2043 | -or- | ||
2044 | the <paramref name="socket" /> parameter is in a nonblocking state. | ||
2045 | </exception> | ||
1641 | </member> | 2046 | </member> |
1642 | <member name="P:HttpServer.Parser.HttpRequestParser.LogWriter"> | 2047 | <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket,System.IO.FileAccess,System.Boolean)"> |
1643 | <summary> | 2048 | <summary> |
1644 | Gets or sets the log writer. | 2049 | Creates a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" /> with the specified access rights and the specified <see cref="T:System.Net.Sockets.Socket" /> ownership. |
1645 | </summary> | 2050 | </summary> |
2051 | <param name="socket"> | ||
2052 | The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data. | ||
2053 | </param> | ||
2054 | <param name="access"> | ||
2055 | A bitwise combination of the <see cref="T:System.IO.FileAccess" /> values that specifies the type of access given to the <see cref="T:System.Net.Sockets.NetworkStream" /> over the provided <see cref="T:System.Net.Sockets.Socket" />. | ||
2056 | </param> | ||
2057 | <param name="ownsSocket"> | ||
2058 | Set to true to indicate that the <see cref="T:System.Net.Sockets.NetworkStream" /> will take ownership of the <see cref="T:System.Net.Sockets.Socket" />; otherwise, false. | ||
2059 | </param> | ||
2060 | <exception cref="T:System.ArgumentNullException"> | ||
2061 | The <paramref name="socket" /> parameter is null. | ||
2062 | </exception> | ||
2063 | <exception cref="T:System.IO.IOException"> | ||
2064 | The <paramref name="socket" /> parameter is not connected. | ||
2065 | -or- | ||
2066 | The <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />. | ||
2067 | -or- | ||
2068 | The <paramref name="socket" /> parameter is in a nonblocking state. | ||
2069 | </exception> | ||
1646 | </member> | 2070 | </member> |
1647 | <member name="P:HttpServer.Parser.HttpRequestParser.CurrentState"> | 2071 | <member name="M:HttpServer.ReusableSocketNetworkStream.Close"> |
1648 | <summary> | 2072 | <summary> |
1649 | Current state in parser. | 2073 | Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. |
1650 | </summary> | 2074 | </summary> |
1651 | </member> | 2075 | </member> |
1652 | <member name="E:HttpServer.Parser.HttpRequestParser.RequestCompleted"> | 2076 | <member name="M:HttpServer.ReusableSocketNetworkStream.Dispose(System.Boolean)"> |
1653 | <summary> | 2077 | <summary> |
1654 | A request have been successfully parsed. | 2078 | Releases the unmanaged resources used by the <see cref="T:System.Net.Sockets.NetworkStream"/> and optionally releases the managed resources. |
1655 | </summary> | 2079 | </summary> |
2080 | <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> | ||
1656 | </member> | 2081 | </member> |
1657 | <member name="E:HttpServer.Parser.HttpRequestParser.BodyBytesReceived"> | 2082 | <member name="T:HttpServer.IHttpContextFactory"> |
1658 | <summary> | 2083 | <summary> |
1659 | More body bytes have been received. | 2084 | Used to create <see cref="T:HttpServer.IHttpClientContext"/>es. |
1660 | </summary> | 2085 | </summary> |
1661 | </member> | 2086 | </member> |
1662 | <member name="E:HttpServer.Parser.HttpRequestParser.RequestLineReceived"> | 2087 | <member name="M:HttpServer.IHttpContextFactory.CreateContext(System.Net.Sockets.Socket)"> |
1663 | <summary> | 2088 | <summary> |
1664 | Request line have been received. | 2089 | Creates a <see cref="T:HttpServer.IHttpClientContext"/> that handles a connected client. |
1665 | </summary> | 2090 | </summary> |
2091 | <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param> | ||
2092 | <returns>A creates <see cref="T:HttpServer.IHttpClientContext"/>.</returns> | ||
1666 | </member> | 2093 | </member> |
1667 | <member name="E:HttpServer.Parser.HttpRequestParser.HeaderReceived"> | 2094 | <member name="M:HttpServer.IHttpContextFactory.CreateSecureContext(System.Net.Sockets.Socket,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> |
1668 | <summary> | 2095 | <summary> |
1669 | A header have been received. | 2096 | Create a secure <see cref="T:HttpServer.IHttpClientContext"/>. |
1670 | </summary> | 2097 | </summary> |
2098 | <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param> | ||
2099 | <param name="certificate">HTTPS certificate to use.</param> | ||
2100 | <param name="protocol">Kind of HTTPS protocol. Usually TLS or SSL.</param> | ||
2101 | <returns>A created <see cref="T:HttpServer.IHttpClientContext"/>.</returns> | ||
1671 | </member> | 2102 | </member> |
1672 | <member name="T:HttpServer.LocklessQueue`1"> | 2103 | <member name="E:HttpServer.IHttpContextFactory.RequestReceived"> |
1673 | <summary> | 2104 | <summary> |
1674 | A thread-safe lockless queue that supports multiple readers and | 2105 | A request have been received from one of the contexts. |
1675 | multiple writers | ||
1676 | </summary> | 2106 | </summary> |
1677 | </member> | 2107 | </member> |
1678 | <member name="F:HttpServer.LocklessQueue`1.head"> | 2108 | <member name="M:HttpServer.IHttpContextFactory.Shutdown"> |
1679 | <summary>Queue head</summary> | ||
1680 | </member> | ||
1681 | <member name="F:HttpServer.LocklessQueue`1.tail"> | ||
1682 | <summary>Queue tail</summary> | ||
1683 | </member> | ||
1684 | <member name="F:HttpServer.LocklessQueue`1.count"> | ||
1685 | <summary>Queue item count</summary> | ||
1686 | </member> | ||
1687 | <member name="M:HttpServer.LocklessQueue`1.#ctor"> | ||
1688 | <summary> | 2109 | <summary> |
1689 | Constructor | 2110 | Server is shutting down so shut down the factory |
1690 | </summary> | 2111 | </summary> |
1691 | </member> | 2112 | </member> |
1692 | <member name="M:HttpServer.LocklessQueue`1.Enqueue(`0)"> | 2113 | <member name="T:HttpServer.HttpFile"> |
1693 | <summary> | 2114 | <summary> |
1694 | Enqueue an item | 2115 | Container class for posted files |
1695 | </summary> | 2116 | </summary> |
1696 | <param name="item">Item to enqeue</param> | ||
1697 | </member> | 2117 | </member> |
1698 | <member name="M:HttpServer.LocklessQueue`1.TryDequeue(`0@)"> | 2118 | <member name="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String,System.String)"> |
1699 | <summary> | 2119 | <summary> |
1700 | Try to dequeue an item | 2120 | Creates a container for a posted file |
1701 | </summary> | 2121 | </summary> |
1702 | <param name="item">Dequeued item if the dequeue was successful</param> | 2122 | <param name="name">The identifier of the post field</param> |
1703 | <returns>True if an item was successfully deqeued, otherwise false</returns> | 2123 | <param name="filename">The file path</param> |
1704 | </member> | 2124 | <param name="contentType">The content type of the file</param> |
1705 | <member name="P:HttpServer.LocklessQueue`1.Count"> | 2125 | <param name="uploadFilename">The name of the file uploaded</param> |
1706 | <summary>Gets the current number of items in the queue. Since this | 2126 | <exception cref="T:System.ArgumentNullException">If any parameter is null or empty</exception> |
1707 | is a lockless collection this value should be treated as a close | ||
1708 | estimate</summary> | ||
1709 | </member> | 2127 | </member> |
1710 | <member name="T:HttpServer.LocklessQueue`1.SingleLinkNode"> | 2128 | <member name="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String)"> |
1711 | <summary> | 2129 | <summary> |
1712 | Provides a node container for data in a singly linked list | 2130 | Creates a container for a posted file <see cref="M:HttpServer.HttpFile.#ctor(System.String,System.String,System.String,System.String)"/> |
1713 | </summary> | 2131 | </summary> |
2132 | <exception cref="T:System.ArgumentNullException">If any parameter is null or empty</exception> | ||
1714 | </member> | 2133 | </member> |
1715 | <member name="F:HttpServer.LocklessQueue`1.SingleLinkNode.Next"> | 2134 | <member name="M:HttpServer.HttpFile.Finalize"> |
1716 | <summary>Pointer to the next node in list</summary> | 2135 | <summary>Destructor disposing the file</summary> |
1717 | </member> | 2136 | </member> |
1718 | <member name="F:HttpServer.LocklessQueue`1.SingleLinkNode.Item"> | 2137 | <member name="P:HttpServer.HttpFile.Name"> |
1719 | <summary>The data contained by the node</summary> | 2138 | <summary> |
2139 | The name/id of the file | ||
2140 | </summary> | ||
1720 | </member> | 2141 | </member> |
1721 | <member name="M:HttpServer.LocklessQueue`1.SingleLinkNode.#ctor"> | 2142 | <member name="P:HttpServer.HttpFile.Filename"> |
1722 | <summary> | 2143 | <summary> |
1723 | Constructor | 2144 | The full file path |
1724 | </summary> | 2145 | </summary> |
1725 | </member> | 2146 | </member> |
1726 | <member name="M:HttpServer.LocklessQueue`1.SingleLinkNode.#ctor(`0)"> | 2147 | <member name="P:HttpServer.HttpFile.UploadFilename"> |
1727 | <summary> | 2148 | <summary> |
1728 | Constructor | 2149 | The name of the uploaded file |
1729 | </summary> | 2150 | </summary> |
1730 | </member> | 2151 | </member> |
1731 | <member name="T:HttpServer.IHttpRequest"> | 2152 | <member name="P:HttpServer.HttpFile.ContentType"> |
1732 | <summary> | 2153 | <summary> |
1733 | Contains server side HTTP request information. | 2154 | The type of file |
1734 | </summary> | 2155 | </summary> |
1735 | </member> | 2156 | </member> |
1736 | <member name="M:HttpServer.IHttpRequest.AddHeader(System.String,System.String)"> | 2157 | <member name="M:HttpServer.HttpFile.Dispose(System.Boolean)"> |
1737 | <summary> | 2158 | <summary> |
1738 | Called during parsing of a <see cref="T:HttpServer.IHttpRequest"/>. | 2159 | Deletes the temporary file |
1739 | </summary> | 2160 | </summary> |
1740 | <param name="name">Name of the header, should not be URL encoded</param> | 2161 | <param name="disposing">True if manual dispose</param> |
1741 | <param name="value">Value of the header, should not be URL encoded</param> | ||
1742 | <exception cref="T:HttpServer.Exceptions.BadRequestException">If a header is incorrect.</exception> | ||
1743 | </member> | 2162 | </member> |
1744 | <member name="M:HttpServer.IHttpRequest.AddToBody(System.Byte[],System.Int32,System.Int32)"> | 2163 | <member name="M:HttpServer.HttpFile.Dispose"> |
1745 | <summary> | 2164 | <summary> |
1746 | Add bytes to the body | 2165 | Disposing interface, cleans up managed resources (the temporary file) and suppresses finalization |
1747 | </summary> | 2166 | </summary> |
1748 | <param name="bytes">buffer to read bytes from</param> | ||
1749 | <param name="offset">where to start read</param> | ||
1750 | <param name="length">number of bytes to read</param> | ||
1751 | <returns>Number of bytes actually read (same as length unless we got all body bytes).</returns> | ||
1752 | <exception cref="T:System.InvalidOperationException">If body is not writable</exception> | ||
1753 | <exception cref="T:System.ArgumentNullException"><c>bytes</c> is null.</exception> | ||
1754 | <exception cref="T:System.ArgumentOutOfRangeException"><c>offset</c> is out of range.</exception> | ||
1755 | </member> | 2167 | </member> |
1756 | <member name="M:HttpServer.IHttpRequest.Clear"> | 2168 | <member name="T:HttpServer.HttpForm"> |
2169 | <summary>Container for posted form data</summary> | ||
2170 | </member> | ||
2171 | <member name="F:HttpServer.HttpForm.EmptyForm"> | ||
2172 | <summary>Instance to help mark a non-initialized form</summary> | ||
2173 | </member> | ||
2174 | <member name="M:HttpServer.HttpForm.#ctor"> | ||
2175 | <summary>Initializes a form container with the specified name</summary> | ||
2176 | </member> | ||
2177 | <member name="M:HttpServer.HttpForm.#ctor(HttpServer.HttpInput)"> | ||
1757 | <summary> | 2178 | <summary> |
1758 | Clear everything in the request | 2179 | Makes a deep copy of the input |
1759 | </summary> | 2180 | </summary> |
2181 | <param name="input">The input to copy</param> | ||
1760 | </member> | 2182 | </member> |
1761 | <member name="M:HttpServer.IHttpRequest.DecodeBody(HttpServer.FormDecoders.FormDecoderProvider)"> | 2183 | <member name="M:HttpServer.HttpForm.AddFile(HttpServer.HttpFile)"> |
1762 | <summary> | 2184 | <summary> |
1763 | Decode body into a form. | 2185 | Adds a file to the collection of posted files |
1764 | </summary> | 2186 | </summary> |
1765 | <param name="providers">A list with form decoders.</param> | 2187 | <param name="file">The file to add</param> |
1766 | <exception cref="T:System.IO.InvalidDataException">If body contents is not valid for the chosen decoder.</exception> | 2188 | <exception cref="T:System.ArgumentException">If the file is already added</exception> |
1767 | <exception cref="T:System.InvalidOperationException">If body is still being transferred.</exception> | 2189 | <exception cref="T:System.ArgumentNullException">If file is null</exception> |
2190 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
1768 | </member> | 2191 | </member> |
1769 | <member name="M:HttpServer.IHttpRequest.SetCookies(HttpServer.RequestCookies)"> | 2192 | <member name="M:HttpServer.HttpForm.ContainsFile(System.String)"> |
1770 | <summary> | 2193 | <summary> |
1771 | Sets the cookies. | 2194 | Checks if the form contains a specified file |
1772 | </summary> | 2195 | </summary> |
1773 | <param name="cookies">The cookies.</param> | 2196 | <param name="name">Field name of the file parameter</param> |
2197 | <returns>True if the file exists</returns> | ||
2198 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
1774 | </member> | 2199 | </member> |
1775 | <member name="M:HttpServer.IHttpRequest.CreateResponse(HttpServer.IHttpClientContext)"> | 2200 | <member name="M:HttpServer.HttpForm.GetFile(System.String)"> |
1776 | <summary> | 2201 | <summary> |
1777 | Create a response object. | 2202 | Retrieves a file held by by the form |
1778 | </summary> | 2203 | </summary> |
1779 | <param name="context">Context for the connected client.</param> | 2204 | <param name="name">The identifier of the file</param> |
1780 | <returns>A new <see cref="T:HttpServer.IHttpResponse"/>.</returns> | 2205 | <returns>The requested file or null if the file was not found</returns> |
2206 | <exception cref="T:System.ArgumentNullException">If name is null or empty</exception> | ||
2207 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
1781 | </member> | 2208 | </member> |
1782 | <member name="P:HttpServer.IHttpRequest.AcceptTypes"> | 2209 | <member name="P:HttpServer.HttpForm.Files"> |
1783 | <summary> | 2210 | <summary> |
1784 | Gets kind of types accepted by the client. | 2211 | Retrieves the number of files added to the <see cref="T:HttpServer.HttpForm"/> |
1785 | </summary> | 2212 | </summary> |
2213 | <returns>0 if no files are added</returns> | ||
1786 | </member> | 2214 | </member> |
1787 | <member name="P:HttpServer.IHttpRequest.Body"> | 2215 | <member name="M:HttpServer.HttpForm.Clear"> |
2216 | <summary>Disposes all held HttpFile's and resets values</summary> | ||
2217 | </member> | ||
2218 | <member name="T:HttpServer.HttpHelper"> | ||
1788 | <summary> | 2219 | <summary> |
1789 | Gets or sets body stream. | 2220 | Generic helper functions for HTTP |
1790 | </summary> | 2221 | </summary> |
1791 | </member> | 2222 | </member> |
1792 | <member name="P:HttpServer.IHttpRequest.BodyIsComplete"> | 2223 | <member name="F:HttpServer.HttpHelper.HTTP10"> |
1793 | <summary> | 2224 | <summary> |
1794 | Gets whether the body is complete. | 2225 | Version string for HTTP v1.0 |
1795 | </summary> | 2226 | </summary> |
1796 | </member> | 2227 | </member> |
1797 | <member name="P:HttpServer.IHttpRequest.Connection"> | 2228 | <member name="F:HttpServer.HttpHelper.HTTP11"> |
1798 | <summary> | 2229 | <summary> |
1799 | Gets or sets kind of connection used for the session. | 2230 | Version string for HTTP v1.1 |
1800 | </summary> | 2231 | </summary> |
1801 | </member> | 2232 | </member> |
1802 | <member name="P:HttpServer.IHttpRequest.ContentLength"> | 2233 | <member name="F:HttpServer.HttpHelper.EmptyUri"> |
1803 | <summary> | 2234 | <summary> |
1804 | Gets or sets number of bytes in the body. | 2235 | An empty URI |
1805 | </summary> | 2236 | </summary> |
1806 | </member> | 2237 | </member> |
1807 | <member name="P:HttpServer.IHttpRequest.Cookies"> | 2238 | <member name="M:HttpServer.HttpHelper.ParseQueryString(System.String)"> |
1808 | <summary> | 2239 | <summary> |
1809 | Gets cookies that was sent with the request. | 2240 | Parses a query string. |
1810 | </summary> | 2241 | </summary> |
2242 | <param name="queryString">Query string (URI encoded)</param> | ||
2243 | <returns>A <see cref="T:HttpServer.HttpInput"/> object if successful; otherwise <see cref="F:HttpServer.HttpInput.Empty"/></returns> | ||
2244 | <exception cref="T:System.ArgumentNullException"><c>queryString</c> is null.</exception> | ||
2245 | <exception cref="T:System.FormatException">If string cannot be parsed.</exception> | ||
1811 | </member> | 2246 | </member> |
1812 | <member name="P:HttpServer.IHttpRequest.Form"> | 2247 | <member name="T:HttpServer.HttpInput"> |
1813 | <summary> | 2248 | <summary> |
1814 | Gets form parameters. | 2249 | Contains some kind of input from the browser/client. |
2250 | can be QueryString, form data or any other request body content. | ||
1815 | </summary> | 2251 | </summary> |
1816 | </member> | 2252 | </member> |
1817 | <member name="P:HttpServer.IHttpRequest.Headers"> | 2253 | <member name="F:HttpServer.HttpInput.Empty"> |
2254 | <summary> Representation of a non-initialized class instance </summary> | ||
2255 | </member> | ||
2256 | <member name="F:HttpServer.HttpInput._ignoreChanges"> | ||
2257 | <summary> Variable telling the class that it is non-initialized <see cref="F:HttpServer.HttpInput.Empty"/> </summary> | ||
2258 | </member> | ||
2259 | <member name="M:HttpServer.HttpInput.#ctor(System.String)"> | ||
1818 | <summary> | 2260 | <summary> |
1819 | Gets headers sent by the client. | 2261 | Initializes a new instance of the <see cref="T:HttpServer.HttpInput"/> class. |
1820 | </summary> | 2262 | </summary> |
2263 | <param name="name">form name.</param> | ||
1821 | </member> | 2264 | </member> |
1822 | <member name="P:HttpServer.IHttpRequest.HttpVersion"> | 2265 | <member name="M:HttpServer.HttpInput.#ctor(System.String,System.Boolean)"> |
1823 | <summary> | 2266 | <summary> |
1824 | Gets or sets version of HTTP protocol that's used. | 2267 | Initializes a new instance of the <see cref="T:HttpServer.HttpInput"/> class. |
1825 | </summary> | 2268 | </summary> |
1826 | <remarks> | 2269 | <param name="name">form name.</param> |
1827 | Probably <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/>. | 2270 | <param name="ignoreChanges">if set to <c>true</c> all changes will be ignored. </param> |
1828 | </remarks> | 2271 | <remarks>this constructor should only be used by Empty</remarks> |
1829 | <seealso cref="T:HttpServer.HttpHelper"/> | ||
1830 | </member> | 2272 | </member> |
1831 | <member name="P:HttpServer.IHttpRequest.IsAjax"> | 2273 | <member name="M:HttpServer.HttpInput.#ctor(HttpServer.HttpInput)"> |
2274 | <summary>Creates a deep copy of the HttpInput class</summary> | ||
2275 | <param name="input">The object to copy</param> | ||
2276 | <remarks>The function makes a deep copy of quite a lot which can be slow</remarks> | ||
2277 | </member> | ||
2278 | <member name="P:HttpServer.HttpInput.Name"> | ||
1832 | <summary> | 2279 | <summary> |
1833 | Gets whether the request was made by Ajax (Asynchronous JavaScript) | 2280 | Form name as lower case |
1834 | </summary> | 2281 | </summary> |
1835 | </member> | 2282 | </member> |
1836 | <member name="P:HttpServer.IHttpRequest.Method"> | 2283 | <member name="M:HttpServer.HttpInput.Add(System.String,System.String)"> |
1837 | <summary> | 2284 | <summary> |
1838 | Gets or sets requested method. | 2285 | Add a new element. Form array elements are parsed |
2286 | and added in a correct hierarchy. | ||
1839 | </summary> | 2287 | </summary> |
1840 | <remarks> | 2288 | <param name="name">Name is converted to lower case.</param> |
1841 | Will always be in upper case. | 2289 | <param name="value"></param> |
1842 | </remarks> | 2290 | <exception cref="T:System.ArgumentNullException"><c>name</c> is null.</exception> |
1843 | <see cref="P:HttpServer.IHttpRequest.Method"/> | 2291 | <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception> |
1844 | </member> | 2292 | </member> |
1845 | <member name="P:HttpServer.IHttpRequest.Param"> | 2293 | <member name="P:HttpServer.HttpInput.Item(System.String)"> |
1846 | <summary> | 2294 | <summary> |
1847 | Gets parameter from <see cref="P:HttpServer.IHttpRequest.QueryString"/> or <see cref="P:HttpServer.IHttpRequest.Form"/>. | 2295 | Get a form item. |
1848 | </summary> | 2296 | </summary> |
2297 | <param name="name"></param> | ||
2298 | <returns>Returns <see cref="F:HttpServer.HttpInputItem.Empty"/> if item was not found.</returns> | ||
1849 | </member> | 2299 | </member> |
1850 | <member name="P:HttpServer.IHttpRequest.QueryString"> | 2300 | <member name="M:HttpServer.HttpInput.Contains(System.String)"> |
1851 | <summary> | 2301 | <summary> |
1852 | Gets variables sent in the query string | 2302 | Returns true if the class contains a <see cref="T:HttpServer.HttpInput"/> with the corresponding name. |
1853 | </summary> | 2303 | </summary> |
2304 | <param name="name">The field/query string name</param> | ||
2305 | <returns>True if the value exists</returns> | ||
1854 | </member> | 2306 | </member> |
1855 | <member name="P:HttpServer.IHttpRequest.Uri"> | 2307 | <member name="M:HttpServer.HttpInput.ParseItem(System.String,System.String)"> |
1856 | <summary> | 2308 | <summary> |
1857 | Gets or sets requested URI. | 2309 | Parses an item and returns it. |
2310 | This function is primarily used to parse array items as in user[name]. | ||
1858 | </summary> | 2311 | </summary> |
2312 | <param name="name"></param> | ||
2313 | <param name="value"></param> | ||
2314 | <returns></returns> | ||
1859 | </member> | 2315 | </member> |
1860 | <member name="P:HttpServer.IHttpRequest.UriParts"> | 2316 | <member name="M:HttpServer.HttpInput.ToString"> |
2317 | <summary> Outputs the instance representing all its values joined together </summary> | ||
2318 | <returns></returns> | ||
2319 | </member> | ||
2320 | <member name="M:HttpServer.HttpInput.ToString(System.Boolean)"> | ||
2321 | <summary>Returns all items as an unescaped query string.</summary> | ||
2322 | <returns></returns> | ||
2323 | </member> | ||
2324 | <member name="M:HttpServer.HttpInput.ExtractOne(System.String)"> | ||
1861 | <summary> | 2325 | <summary> |
1862 | Gets URI absolute path divided into parts. | 2326 | Extracts one parameter from an array |
1863 | </summary> | 2327 | </summary> |
2328 | <param name="value">Containing the string array</param> | ||
2329 | <returns>All but the first value</returns> | ||
1864 | <example> | 2330 | <example> |
1865 | // URI is: http://gauffin.com/code/tiny/ | 2331 | string test1 = ExtractOne("system[user][extension][id]"); |
1866 | Console.WriteLine(request.UriParts[0]); // result: code | 2332 | string test2 = ExtractOne(test1); |
1867 | Console.WriteLine(request.UriParts[1]); // result: tiny | 2333 | string test3 = ExtractOne(test2); |
2334 | // test1 = user[extension][id] | ||
2335 | // test2 = extension[id] | ||
2336 | // test3 = id | ||
1868 | </example> | 2337 | </example> |
1869 | <remarks> | ||
1870 | If you're using controllers than the first part is controller name, | ||
1871 | the second part is method name and the third part is Id property. | ||
1872 | </remarks> | ||
1873 | <seealso cref="P:HttpServer.IHttpRequest.Uri"/> | ||
1874 | </member> | 2338 | </member> |
1875 | <member name="P:HttpServer.IHttpRequest.UriPath"> | 2339 | <member name="M:HttpServer.HttpInput.Clear"> |
2340 | <summary>Resets all data contained by class</summary> | ||
2341 | </member> | ||
2342 | <member name="M:HttpServer.HttpInput.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator"> | ||
1876 | <summary> | 2343 | <summary> |
1877 | Gets or sets path and query. | 2344 | Returns an enumerator that iterates through the collection. |
1878 | </summary> | 2345 | </summary> |
1879 | <see cref="P:HttpServer.IHttpRequest.Uri"/> | 2346 | |
1880 | <remarks> | 2347 | <returns> |
1881 | Are only used during request parsing. Cannot be set after "Host" header have been | 2348 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. |
1882 | added. | 2349 | </returns> |
1883 | </remarks> | 2350 | <filterpriority>1</filterpriority> |
1884 | </member> | 2351 | </member> |
1885 | <member name="T:HttpServer.Helpers.Implementations.PrototypeImp"> | 2352 | <member name="M:HttpServer.HttpInput.GetEnumerator"> |
1886 | <summary> | 2353 | <summary> |
1887 | PrototypeJS implementation of the javascript functions. | 2354 | Returns an enumerator that iterates through a collection. |
1888 | </summary> | 2355 | </summary> |
2356 | |||
2357 | <returns> | ||
2358 | An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection. | ||
2359 | </returns> | ||
2360 | <filterpriority>2</filterpriority> | ||
1889 | </member> | 2361 | </member> |
1890 | <member name="T:HttpServer.Helpers.JavascriptHelperImplementation"> | 2362 | <member name="T:HttpServer.IHttpInput"> |
1891 | <summary> | 2363 | <summary> |
1892 | Purpose of this class is to create a javascript toolkit independent javascript helper. | 2364 | Base class for request data containers |
1893 | </summary> | 2365 | </summary> |
1894 | </member> | 2366 | </member> |
1895 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.GenerateOptions(System.Text.StringBuilder,System.String[],System.Boolean)"> | 2367 | <member name="M:HttpServer.IHttpInput.Add(System.String,System.String)"> |
1896 | <summary> | 2368 | <summary> |
1897 | Generates a list with JS options. | 2369 | Adds a parameter mapped to the presented name |
1898 | </summary> | 2370 | </summary> |
1899 | <param name="sb">StringBuilder that the options should be added to.</param> | 2371 | <param name="name">The name to map the parameter to</param> |
1900 | <param name="options">the javascript options. name, value pairs. each string value should be escaped by YOU!</param> | 2372 | <param name="value">The parameter value</param> |
1901 | <param name="startWithComma">true if we should start with a comma.</param> | ||
1902 | </member> | 2373 | </member> |
1903 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.RemoveJavascriptOptions(System.String[])"> | 2374 | <member name="P:HttpServer.IHttpInput.Item(System.String)"> |
1904 | <summary> | 2375 | <summary> |
1905 | Removes any javascript parameters from an array of parameters | 2376 | Returns a request parameter |
1906 | </summary> | 2377 | </summary> |
1907 | <param name="options">The array of parameters to remove javascript params from</param> | 2378 | <param name="name">The name associated with the parameter</param> |
1908 | <returns>An array of html parameters</returns> | 2379 | <returns></returns> |
1909 | </member> | 2380 | </member> |
1910 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxFormOnSubmit(System.String[])"> | 2381 | <member name="M:HttpServer.IHttpInput.Contains(System.String)"> |
1911 | <summary> | 2382 | <summary> |
1912 | javascript action that should be added to the "onsubmit" event in the form tag. | 2383 | Returns true if the container contains the requested parameter |
1913 | </summary> | 2384 | </summary> |
1914 | <returns></returns> | 2385 | <param name="name">Parameter id</param> |
1915 | <remarks>All javascript option names should end with colon.</remarks> | 2386 | <returns>True if parameter exists</returns> |
1916 | <example> | ||
1917 | <code> | ||
1918 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | ||
1919 | </code> | ||
1920 | </example> | ||
1921 | </member> | 2387 | </member> |
1922 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxRequest(System.String,System.String[])"> | 2388 | <member name="T:HttpServer.HttpInputItem"> |
1923 | <summary> | 2389 | <summary> |
1924 | Requests a url through ajax | 2390 | represents a HTTP input item. Each item can have multiple sub items, a sub item |
2391 | is made in a HTML form by using square brackets | ||
1925 | </summary> | 2392 | </summary> |
1926 | <param name="url">url to fetch</param> | ||
1927 | <param name="options">optional options in format "key, value, key, value", used in JS request object.</param> | ||
1928 | <returns>a link tag</returns> | ||
1929 | <remarks>All javascript option names should end with colon.</remarks> | ||
1930 | <example> | 2393 | <example> |
1931 | <code> | 2394 | // <input type="text" name="user[FirstName]" value="jonas" /> becomes: |
1932 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | 2395 | Console.WriteLine("Value: {0}", form["user"]["FirstName"].Value); |
1933 | </code> | ||
1934 | </example> | 2396 | </example> |
2397 | <remarks> | ||
2398 | All names in a form SHOULD be in lowercase. | ||
2399 | </remarks> | ||
1935 | </member> | 2400 | </member> |
1936 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.AjaxUpdater(System.String,System.String,System.String[])"> | 2401 | <member name="F:HttpServer.HttpInputItem.Empty"> |
2402 | <summary> Representation of a non-initialized <see cref="T:HttpServer.HttpInputItem"/>.</summary> | ||
2403 | </member> | ||
2404 | <member name="M:HttpServer.HttpInputItem.#ctor(System.String,System.String)"> | ||
1937 | <summary> | 2405 | <summary> |
1938 | Ajax requests that updates an element with | 2406 | Initializes an input item setting its name/identifier and value |
1939 | the fetched content | ||
1940 | </summary> | 2407 | </summary> |
1941 | <param name="url">Url to fetch content from</param> | 2408 | <param name="name">Parameter name/id</param> |
1942 | <param name="targetId">element to update</param> | 2409 | <param name="value">Parameter value</param> |
1943 | <param name="options">optional options in format "key, value, key, value", used in JS updater object.</param> | ||
1944 | <returns>A link tag.</returns> | ||
1945 | <remarks>All javascript option names should end with colon.</remarks> | ||
1946 | <example> | ||
1947 | <code> | ||
1948 | JSHelper.AjaxUpdater("/user/show/1", "userInfo", "onsuccess:", "alert('Successful!');"); | ||
1949 | </code> | ||
1950 | </example> | ||
1951 | </member> | 2410 | </member> |
1952 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.DialogLink(System.String,System.String,System.String[])"> | 2411 | <member name="M:HttpServer.HttpInputItem.#ctor(HttpServer.HttpInputItem)"> |
2412 | <summary>Creates a deep copy of the item specified</summary> | ||
2413 | <param name="item">The item to copy</param> | ||
2414 | <remarks>The function makes a deep copy of quite a lot which can be slow</remarks> | ||
2415 | </member> | ||
2416 | <member name="P:HttpServer.HttpInputItem.Count"> | ||
1953 | <summary> | 2417 | <summary> |
1954 | A link that pop ups a Dialog (overlay div) | 2418 | Number of values |
1955 | </summary> | 2419 | </summary> |
1956 | <param name="url">url to contents of dialog</param> | ||
1957 | <param name="title">link title</param> | ||
1958 | <returns>A "a"-tag that popups a dialog when clicked</returns> | ||
1959 | <param name="htmlAttributes">name/value of html attributes</param> | ||
1960 | <example> | ||
1961 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); | ||
1962 | </example> | ||
1963 | </member> | 2420 | </member> |
1964 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.CloseDialog"> | 2421 | <member name="P:HttpServer.HttpInputItem.Item(System.String)"> |
1965 | <summary> | 2422 | <summary> |
1966 | Close a javascript dialog window/div. | 2423 | Get a sub item |
1967 | </summary> | 2424 | </summary> |
1968 | <returns>javascript for closing a dialog.</returns> | 2425 | <param name="name">name in lower case.</param> |
1969 | <see cref="M:HttpServer.Helpers.JavascriptHelperImplementation.DialogLink(System.String,System.String,System.String[])"/> | 2426 | <returns><see cref="F:HttpServer.HttpInputItem.Empty"/> if no item was found.</returns> |
1970 | </member> | 2427 | </member> |
1971 | <member name="M:HttpServer.Helpers.JavascriptHelperImplementation.CreateDialog(System.String,System.String,System.String[])"> | 2428 | <member name="P:HttpServer.HttpInputItem.Name"> |
1972 | <summary> | 2429 | <summary> |
1973 | Creates a new modal dialog window | 2430 | Name of item (in lower case). |
1974 | </summary> | 2431 | </summary> |
1975 | <param name="url">url to open in window.</param> | ||
1976 | <param name="title">window title (may not be supported by all js implementations)</param> | ||
1977 | <param name="options"></param> | ||
1978 | <returns></returns> | ||
1979 | </member> | 2432 | </member> |
1980 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxRequest(System.String,System.String[])"> | 2433 | <member name="P:HttpServer.HttpInputItem.Value"> |
1981 | <summary> | 2434 | <summary> |
1982 | Requests a url through ajax | 2435 | Returns the first value, or null if no value exist. |
1983 | </summary> | 2436 | </summary> |
1984 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | ||
1985 | <param name="options">optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.</param> | ||
1986 | <returns>a link tag</returns> | ||
1987 | <remarks>onclick attribute is used by this method.</remarks> | ||
1988 | <example> | ||
1989 | <code> | ||
1990 | // plain text | ||
1991 | JSHelper.AjaxRequest("'/user/show/1'"); | ||
1992 | |||
1993 | // ajax request using this.href | ||
1994 | string link = "<a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/<call user</a>"; | ||
1995 | </code> | ||
1996 | </example> | ||
1997 | </member> | 2437 | </member> |
1998 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.Contains(System.Collections.Generic.IEnumerable{System.String},System.String)"> | 2438 | <member name="P:HttpServer.HttpInputItem.LastValue"> |
1999 | <summary> | 2439 | <summary> |
2000 | Determins if a list of strings contains a specific value | 2440 | Returns the last value, or null if no value exist. |
2001 | </summary> | 2441 | </summary> |
2002 | <param name="options">options to check in</param> | ||
2003 | <param name="value">value to find</param> | ||
2004 | <returns>true if value was found</returns> | ||
2005 | <remarks>case insensitive</remarks> | ||
2006 | </member> | 2442 | </member> |
2007 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxUpdater(System.String,System.String,System.String[])"> | 2443 | <member name="P:HttpServer.HttpInputItem.Values"> |
2008 | <summary> | 2444 | <summary> |
2009 | Ajax requests that updates an element with | 2445 | Returns the list with values. |
2010 | the fetched content | ||
2011 | </summary> | 2446 | </summary> |
2012 | <param name="url">URL to fetch. URL is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | ||
2013 | <param name="targetId">element to update</param> | ||
2014 | <param name="options">options in format "key, value, key, value". All keys should end with colon.</param> | ||
2015 | <returns>A link tag.</returns> | ||
2016 | <example> | ||
2017 | <code> | ||
2018 | JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true"); | ||
2019 | </code> | ||
2020 | </example> | ||
2021 | </member> | 2447 | </member> |
2022 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.DialogLink(System.String,System.String,System.String[])"> | 2448 | <member name="M:HttpServer.HttpInputItem.Add(System.String)"> |
2023 | <summary> | 2449 | <summary> |
2024 | A link that pop ups a Dialog (overlay div) | 2450 | Add another value to this item |
2025 | </summary> | 2451 | </summary> |
2026 | <param name="url">URL to contents of dialog</param> | 2452 | <param name="value">Value to add.</param> |
2027 | <param name="title">link title</param> | 2453 | <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception> |
2028 | <param name="htmlAttributes">name, value, name, value</param> | ||
2029 | <returns> | ||
2030 | A "a"-tag that popups a dialog when clicked | ||
2031 | </returns> | ||
2032 | <remarks><para>Requires Control.Modal found here: http://livepipe.net/projects/control_modal/</para> | ||
2033 | And the following JavaScript (load it in application.js): | ||
2034 | <code> | ||
2035 | Event.observe(window, 'load', | ||
2036 | function() { | ||
2037 | document.getElementsByClassName('modal').each(function(link){ new Control.Modal(link); }); | ||
2038 | } | ||
2039 | ); | ||
2040 | </code> | ||
2041 | </remarks> | ||
2042 | <example> | ||
2043 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); | ||
2044 | </example> | ||
2045 | </member> | 2454 | </member> |
2046 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.CreateDialog(System.String,System.String,System.String[])"> | 2455 | <member name="M:HttpServer.HttpInputItem.Contains(System.String)"> |
2047 | <summary> | 2456 | <summary> |
2048 | create a modal dialog (usually using DIVs) | 2457 | checks if a sub-item exists (and has a value). |
2049 | </summary> | 2458 | </summary> |
2050 | <param name="url">url to fetch</param> | 2459 | <param name="name">name in lower case</param> |
2051 | <param name="title">dialog title</param> | 2460 | <returns>true if the sub-item exists and has a value; otherwise false.</returns> |
2052 | <param name="options">javascript/html attributes. javascript options ends with colon ':'.</param> | ||
2053 | <returns></returns> | ||
2054 | </member> | 2461 | </member> |
2055 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.CloseDialog"> | 2462 | <member name="M:HttpServer.HttpInputItem.ToString"> |
2463 | <summary> Returns a formatted representation of the instance with the values of all contained parameters </summary> | ||
2464 | </member> | ||
2465 | <member name="M:HttpServer.HttpInputItem.ToString(System.String,System.Boolean)"> | ||
2056 | <summary> | 2466 | <summary> |
2057 | Close a javascript dialog window/div. | 2467 | Outputs the string in a formatted manner |
2058 | </summary> | 2468 | </summary> |
2059 | <returns>javascript for closing a dialog.</returns> | 2469 | <param name="prefix">A prefix to append, used internally</param> |
2060 | <see cref="M:HttpServer.Helpers.Implementations.PrototypeImp.DialogLink(System.String,System.String,System.String[])"/> | 2470 | <param name="asQuerySting">produce a query string</param> |
2061 | </member> | 2471 | </member> |
2062 | <member name="M:HttpServer.Helpers.Implementations.PrototypeImp.AjaxFormOnSubmit(System.String[])"> | 2472 | <member name="P:HttpServer.HttpInputItem.HttpServer#IHttpInput#Item(System.String)"> |
2063 | <summary> | 2473 | <summary> |
2064 | javascript action that should be added to the "onsubmit" event in the form tag. | 2474 | |
2065 | </summary> | 2475 | </summary> |
2066 | <param name="options">remember to encapsulate strings in ''</param> | 2476 | <param name="name">name in lower case</param> |
2067 | <returns></returns> | 2477 | <returns></returns> |
2068 | <remarks>All javascript option names should end with colon.</remarks> | ||
2069 | <example> | ||
2070 | <code> | ||
2071 | JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);"); | ||
2072 | </code> | ||
2073 | </example> | ||
2074 | </member> | 2478 | </member> |
2075 | <member name="T:HttpServer.Helpers.FormHelper"> | 2479 | <member name="M:HttpServer.HttpInputItem.Add(System.String,System.String)"> |
2076 | <summary> | 2480 | <summary> |
2077 | Helpers making it easier to work with forms. | 2481 | Add a sub item. |
2078 | </summary> | 2482 | </summary> |
2079 | <seealso cref="T:HttpServer.Helpers.ObjectForm"/> | 2483 | <param name="name">Can contain array formatting, the item is then parsed and added in multiple levels</param> |
2484 | <param name="value">Value to add.</param> | ||
2485 | <exception cref="T:System.ArgumentNullException">Argument is null.</exception> | ||
2486 | <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception> | ||
2080 | </member> | 2487 | </member> |
2081 | <member name="F:HttpServer.Helpers.FormHelper.JSImplementation"> | 2488 | <member name="M:HttpServer.HttpInputItem.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator"> |
2082 | <summary> | 2489 | <summary> |
2083 | Used to let the website use different JavaScript libraries. | 2490 | Returns an enumerator that iterates through the collection. |
2084 | Default is <see cref="T:HttpServer.Helpers.Implementations.PrototypeImp"/> | ||
2085 | </summary> | 2491 | </summary> |
2492 | |||
2493 | <returns> | ||
2494 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | ||
2495 | </returns> | ||
2496 | <filterpriority>1</filterpriority> | ||
2086 | </member> | 2497 | </member> |
2087 | <member name="M:HttpServer.Helpers.FormHelper.Start(System.String,System.String,System.Boolean,System.String[])"> | 2498 | <member name="M:HttpServer.HttpInputItem.GetEnumerator"> |
2088 | <summary> | 2499 | <summary> |
2089 | Create a <form> tag. | 2500 | Returns an enumerator that iterates through a collection. |
2090 | </summary> | 2501 | </summary> |
2091 | <param name="id">name of form</param> | ||
2092 | <param name="action">action to invoke on submit</param> | ||
2093 | <param name="isAjax">form should be posted as Ajax</param> | ||
2094 | <returns>HTML code</returns> | ||
2095 | <example> | ||
2096 | <code> | ||
2097 | // without options | ||
2098 | WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax); | ||
2099 | 2502 | ||
2100 | // with options | 2503 | <returns> |
2101 | WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax, "style", "display:inline", "class", "greenForm"); | 2504 | An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection. |
2102 | </code> | 2505 | </returns> |
2103 | </example> | 2506 | <filterpriority>2</filterpriority> |
2104 | <param name="options">HTML attributes or JavaScript options.</param> | ||
2105 | <remarks>Method will ALWAYS be POST.</remarks> | ||
2106 | <exception cref="T:System.ArgumentException">options must consist of name, value, name, value</exception> | ||
2107 | </member> | 2507 | </member> |
2108 | <member name="M:HttpServer.Helpers.FormHelper.Select(System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> | 2508 | <member name="M:HttpServer.HttpInputItem.ToString(System.String)"> |
2109 | <summary> | 2509 | <summary> |
2110 | Creates a select list with the values in a collection. | 2510 | Outputs the string in a formatted manner |
2111 | </summary> | 2511 | </summary> |
2112 | <param name="name">Name of the SELECT-tag</param> | 2512 | <param name="prefix">A prefix to append, used internally</param> |
2113 | <param name="collection">collection used to generate options.</param> | 2513 | <returns></returns> |
2114 | <param name="getIdTitle">delegate used to return id and title from objects.</param> | ||
2115 | <param name="selectedValue">value that should be marked as selected.</param> | ||
2116 | <param name="firstEmpty">First row should contain an empty value.</param> | ||
2117 | <returns>string containing a SELECT-tag.</returns> | ||
2118 | <seealso cref="T:HttpServer.Helpers.GetIdTitle"/> | ||
2119 | </member> | 2514 | </member> |
2120 | <member name="M:HttpServer.Helpers.FormHelper.Select(System.String,System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> | 2515 | <member name="T:HttpServer.HttpListener"> |
2121 | <summary> | 2516 | <summary> |
2122 | Creates a select list with the values in a collection. | 2517 | New implementation of the HTTP listener. |
2123 | </summary> | 2518 | </summary> |
2124 | <param name="name">Name of the SELECT-tag</param> | 2519 | <remarks> |
2125 | <param name="id">Id of the SELECT-tag</param> | 2520 | Use the <c>Create</c> methods to create a default listener. |
2126 | <param name="collection">collection used to generate options.</param> | 2521 | </remarks> |
2127 | <param name="getIdTitle">delegate used to return id and title from objects.</param> | ||
2128 | <param name="selectedValue">value that should be marked as selected.</param> | ||
2129 | <param name="firstEmpty">First row should contain an empty value.</param> | ||
2130 | <returns>string containing a SELECT-tag.</returns> | ||
2131 | <seealso cref="T:HttpServer.Helpers.GetIdTitle"/> | ||
2132 | <example> | ||
2133 | <code> | ||
2134 | // Class that is going to be used in a SELECT-tag. | ||
2135 | public class User | ||
2136 | { | ||
2137 | private readonly string _realName; | ||
2138 | private readonly int _id; | ||
2139 | public User(int id, string realName) | ||
2140 | { | ||
2141 | _id = id; | ||
2142 | _realName = realName; | ||
2143 | } | ||
2144 | public string RealName | ||
2145 | { | ||
2146 | get { return _realName; } | ||
2147 | } | ||
2148 | |||
2149 | public int Id | ||
2150 | { | ||
2151 | get { return _id; } | ||
2152 | } | ||
2153 | } | ||
2154 | |||
2155 | // Using an inline delegate to generate the select list | ||
2156 | public void UserInlineDelegate() | ||
2157 | { | ||
2158 | List<User> items = new List<User>(); | ||
2159 | items.Add(new User(1, "adam")); | ||
2160 | items.Add(new User(2, "bertial")); | ||
2161 | items.Add(new User(3, "david")); | ||
2162 | string htmlSelect = Select("users", "users", items, delegate(object o, out object id, out object value) | ||
2163 | { | ||
2164 | User user = (User)o; | ||
2165 | id = user.Id; | ||
2166 | value = user.RealName; | ||
2167 | }, 2, true); | ||
2168 | } | ||
2169 | |||
2170 | // Using an method as delegate to generate the select list. | ||
2171 | public void UseExternalDelegate() | ||
2172 | { | ||
2173 | List<User> items = new List<User>(); | ||
2174 | items.Add(new User(1, "adam")); | ||
2175 | items.Add(new User(2, "bertial")); | ||
2176 | items.Add(new User(3, "david")); | ||
2177 | string htmlSelect = Select("users", "users", items, UserOptions, 1, true); | ||
2178 | } | ||
2179 | |||
2180 | // delegate returning id and title | ||
2181 | public static void UserOptions(object o, out object id, out object title) | ||
2182 | { | ||
2183 | User user = (User)o; | ||
2184 | id = user.Id; | ||
2185 | value = user.RealName; | ||
2186 | } | ||
2187 | </code> | ||
2188 | </example> | ||
2189 | <exception cref="T:System.ArgumentNullException"><c>name</c>, <c>id</c>, <c>collection</c> or <c>getIdTitle</c> is null.</exception> | ||
2190 | </member> | 2522 | </member> |
2191 | <member name="M:HttpServer.Helpers.FormHelper.Select(System.String,System.String,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean,System.String[])"> | 2523 | <member name="E:HttpServer.HttpListener.Accepted"> |
2192 | <summary> | 2524 | <summary> |
2193 | Creates a select list with the values in a collection. | 2525 | A client have been accepted, but not handled, by the listener. |
2194 | </summary> | 2526 | </summary> |
2195 | <param name="name">Name of the SELECT-tag</param> | ||
2196 | <param name="id">Id of the SELECT-tag</param> | ||
2197 | <param name="collection">collection used to generate options.</param> | ||
2198 | <param name="getIdTitle">delegate used to return id and title from objects.</param> | ||
2199 | <param name="selectedValue">value that should be marked as selected.</param> | ||
2200 | <param name="firstEmpty">First row should contain an empty value.</param> | ||
2201 | <param name="htmlAttributes">name, value collection of extra HTML attributes.</param> | ||
2202 | <returns>string containing a SELECT-tag.</returns> | ||
2203 | <seealso cref="T:HttpServer.Helpers.GetIdTitle"/> | ||
2204 | <exception cref="T:System.ArgumentNullException"><c>name</c>, <c>id</c>, <c>collection</c> or <c>getIdTitle</c> is null.</exception> | ||
2205 | <exception cref="T:System.ArgumentException">Invalid HTML attribute list.</exception> | ||
2206 | </member> | 2527 | </member> |
2207 | <member name="M:HttpServer.Helpers.FormHelper.Options(System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> | 2528 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory)"> |
2208 | <summary> | 2529 | <summary> |
2209 | Generate a list of HTML options | 2530 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. |
2210 | </summary> | 2531 | </summary> |
2211 | <param name="collection">collection used to generate options.</param> | 2532 | <param name="address">IP Address to accept connections on</param> |
2212 | <param name="getIdTitle">delegate used to return id and title from objects.</param> | 2533 | <param name="port">TCP Port to listen on, default HTTP port is 80.</param> |
2213 | <param name="selectedValue">value that should be marked as selected.</param> | 2534 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> |
2214 | <param name="firstEmpty">First row should contain an empty value.</param> | 2535 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> |
2215 | <returns></returns> | 2536 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> |
2216 | <exception cref="T:System.ArgumentNullException"><c>collection</c> or <c>getIdTitle</c> is null.</exception> | ||
2217 | </member> | 2537 | </member> |
2218 | <member name="M:HttpServer.Helpers.FormHelper.Options(System.Text.StringBuilder,System.Collections.IEnumerable,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> | 2538 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate)"> |
2219 | <exception cref="T:System.ArgumentNullException"><c>sb</c> is null.</exception> | 2539 | <summary> |
2540 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. | ||
2541 | </summary> | ||
2542 | <param name="address">The address.</param> | ||
2543 | <param name="port">The port.</param> | ||
2544 | <param name="factory">The factory.</param> | ||
2545 | <param name="certificate">The certificate.</param> | ||
2220 | </member> | 2546 | </member> |
2221 | <member name="M:HttpServer.Helpers.FormHelper.CheckBox(System.String,System.Object,System.Object,System.String[])"> | 2547 | <member name="M:HttpServer.HttpListener.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> |
2222 | <summary> | 2548 | <summary> |
2223 | Creates a check box. | 2549 | Initializes a new instance of the <see cref="T:HttpServer.HttpListener"/> class. |
2224 | </summary> | 2550 | </summary> |
2225 | <param name="name">element name</param> | 2551 | <param name="address">The address.</param> |
2226 | <param name="value">element value</param> | 2552 | <param name="port">The port.</param> |
2227 | <param name="isChecked">determines if the check box is selected or not. This is done differently depending on the | 2553 | <param name="factory">The factory.</param> |
2228 | type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if | 2554 | <param name="certificate">The certificate.</param> |
2229 | the box is checked or not. </param> | 2555 | <param name="protocol">The protocol.</param> |
2230 | <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param> | ||
2231 | <returns>a generated radio button</returns> | ||
2232 | </member> | 2556 | </member> |
2233 | <member name="M:HttpServer.Helpers.FormHelper.CheckBox(System.String,System.String,System.Object,System.Object,System.String[])"> | 2557 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32)"> |
2234 | <summary> | 2558 | <summary> |
2235 | Creates a check box. | 2559 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. |
2236 | </summary> | 2560 | </summary> |
2237 | <param name="name">element name</param> | 2561 | <param name="address">Address that the listener should accept connections on.</param> |
2238 | <param name="id">element id</param> | 2562 | <param name="port">Port that listener should accept connections on.</param> |
2239 | <param name="value">element value</param> | 2563 | <returns>Created HTTP listener.</returns> |
2240 | <param name="isChecked">determines if the check box is selected or not. This is done differently depending on the | ||
2241 | type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if | ||
2242 | the box is checked or not. </param> | ||
2243 | <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param> | ||
2244 | <returns>a generated radio button</returns> | ||
2245 | <remarks> | ||
2246 | value in your business object. (check box will be selected if it matches the element value) | ||
2247 | </remarks> | ||
2248 | </member> | 2564 | </member> |
2249 | <member name="M:HttpServer.Helpers.FormHelper.CheckBox(System.String,System.String,System.Object,System.String[])"> | 2565 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate)"> |
2250 | <summary> | 2566 | <summary> |
2251 | Creates a check box. | 2567 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. |
2252 | </summary> | 2568 | </summary> |
2253 | <param name="name">element name</param> | 2569 | <param name="address">Address that the listener should accept connections on.</param> |
2254 | <param name="id">element id</param> | 2570 | <param name="port">Port that listener should accept connections on.</param> |
2255 | <param name="isChecked">determines if the check box is selected or not. This is done differently depending on the | 2571 | <param name="certificate">Certificate to use</param> |
2256 | type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if | 2572 | <returns>Created HTTP listener.</returns> |
2257 | the box is checked or not. </param> | ||
2258 | <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param> | ||
2259 | <returns>a generated radio button</returns> | ||
2260 | <remarks>will set value to "1".</remarks> | ||
2261 | </member> | 2573 | </member> |
2262 | <member name="M:HttpServer.Helpers.FormHelper.RadioButton(System.String,System.Object,System.Object,System.String[])"> | 2574 | <member name="M:HttpServer.HttpListener.Create(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> |
2263 | <summary> | 2575 | <summary> |
2264 | Creates a RadioButton. | 2576 | Creates a new <see cref="T:HttpServer.HttpListener"/> instance with default factories. |
2265 | </summary> | 2577 | </summary> |
2266 | <param name="name">element name</param> | 2578 | <param name="address">Address that the listener should accept connections on.</param> |
2267 | <param name="value">element value</param> | 2579 | <param name="port">Port that listener should accept connections on.</param> |
2268 | <param name="isSelected">determines if the radio button is selected or not. This is done differently depending on the | 2580 | <param name="certificate">Certificate to use</param> |
2269 | type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if | 2581 | <param name="protocol">which HTTPS protocol to use, default is TLS.</param> |
2270 | the box is checked or not. </param> | 2582 | <returns>Created HTTP listener.</returns> |
2271 | <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param> | ||
2272 | <returns>a generated radio button</returns> | ||
2273 | </member> | 2583 | </member> |
2274 | <member name="M:HttpServer.Helpers.FormHelper.RadioButton(System.String,System.String,System.Object,System.Object,System.String[])"> | 2584 | <member name="M:HttpServer.HttpListener.OnAcceptingSocket(System.Net.Sockets.Socket)"> |
2275 | <summary> | 2585 | <summary> |
2276 | Creates a RadioButton. | 2586 | Can be used to create filtering of new connections. |
2277 | </summary> | 2587 | </summary> |
2278 | <param name="name">element name</param> | 2588 | <param name="socket">Accepted socket</param> |
2279 | <param name="id">element id</param> | 2589 | <returns> |
2280 | <param name="value">element value</param> | 2590 | true if connection can be accepted; otherwise false. |
2281 | <param name="isSelected">determines if the radio button is selected or not. This is done differently depending on the | 2591 | </returns> |
2282 | type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if | ||
2283 | the box is checked or not. </param> | ||
2284 | <param name="htmlAttributes">a list with additional attributes (name, value, name, value).</param> | ||
2285 | <returns>a generated radio button</returns> | ||
2286 | </member> | 2592 | </member> |
2287 | <member name="M:HttpServer.Helpers.FormHelper.End"> | 2593 | <member name="T:HttpServer.HttpListenerBase"> |
2288 | <summary> | 2594 | <summary> |
2289 | form close tag | 2595 | Contains a listener that doesn't do anything with the connections. |
2290 | </summary> | 2596 | </summary> |
2291 | <returns></returns> | ||
2292 | </member> | 2597 | </member> |
2293 | <member name="T:HttpServer.ExceptionHandler"> | 2598 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory)"> |
2294 | <summary> | 2599 | <summary> |
2295 | We dont want to let the server to die due to exceptions thrown in worker threads. | 2600 | Listen for regular HTTP connections |
2296 | therefore we use this delegate to give you a change to handle uncaught exceptions. | ||
2297 | </summary> | 2601 | </summary> |
2298 | <param name="source">Class that the exception was thrown in.</param> | 2602 | <param name="address">IP Address to accept connections on</param> |
2299 | <param name="exception">Exception</param> | 2603 | <param name="port">TCP Port to listen on, default HTTP port is 80.</param> |
2300 | <remarks> | 2604 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> |
2301 | Server will throw a InternalServerException in release version if you dont | 2605 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> |
2302 | handle this delegate. | 2606 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> |
2303 | </remarks> | ||
2304 | </member> | 2607 | </member> |
2305 | <member name="T:HttpServer.Authentication.DigestAuthentication"> | 2608 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate)"> |
2306 | <summary> | 2609 | <summary> |
2307 | Implements HTTP Digest authentication. It's more secure than Basic auth since password is | 2610 | Initializes a new instance of the <see cref="T:HttpServer.HttpListenerBase"/> class. |
2308 | encrypted with a "key" from the server. | 2611 | </summary> |
2612 | <param name="address">IP Address to accept connections on</param> | ||
2613 | <param name="port">TCP Port to listen on, default HTTPS port is 443</param> | ||
2614 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | ||
2615 | <param name="certificate">Certificate to use</param> | ||
2616 | </member> | ||
2617 | <member name="M:HttpServer.HttpListenerBase.#ctor(System.Net.IPAddress,System.Int32,HttpServer.IHttpContextFactory,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> | ||
2618 | <summary> | ||
2619 | Initializes a new instance of the <see cref="T:HttpServer.HttpListenerBase"/> class. | ||
2620 | </summary> | ||
2621 | <param name="address">IP Address to accept connections on</param> | ||
2622 | <param name="port">TCP Port to listen on, default HTTPS port is 443</param> | ||
2623 | <param name="factory">Factory used to create <see cref="T:HttpServer.IHttpClientContext"/>es.</param> | ||
2624 | <param name="certificate">Certificate to use</param> | ||
2625 | <param name="protocol">which HTTPS protocol to use, default is TLS.</param> | ||
2626 | </member> | ||
2627 | <member name="P:HttpServer.HttpListenerBase.LogWriter"> | ||
2628 | <summary> | ||
2629 | Gives you a change to receive log entries for all internals of the HTTP library. | ||
2309 | </summary> | 2630 | </summary> |
2310 | <remarks> | 2631 | <remarks> |
2311 | Keep in mind that the password is encrypted with MD5. Use a combination of SSL and digest auth to be secure. | 2632 | You may not switch log writer after starting the listener. |
2312 | </remarks> | 2633 | </remarks> |
2313 | </member> | 2634 | </member> |
2314 | <member name="T:HttpServer.Authentication.AuthenticationModule"> | 2635 | <member name="P:HttpServer.HttpListenerBase.UseTraceLogs"> |
2315 | <summary> | 2636 | <summary> |
2316 | Authentication modules are used to implement different | 2637 | True if we should turn on trace logs. |
2317 | kind of HTTP authentication. | ||
2318 | </summary> | 2638 | </summary> |
2319 | </member> | 2639 | </member> |
2320 | <member name="F:HttpServer.Authentication.AuthenticationModule.AuthenticationTag"> | 2640 | <member name="M:HttpServer.HttpListenerBase.OnAccept(System.IAsyncResult)"> |
2641 | <exception cref="T:System.Exception"><c>Exception</c>.</exception> | ||
2642 | </member> | ||
2643 | <member name="M:HttpServer.HttpListenerBase.RetryBeginAccept"> | ||
2321 | <summary> | 2644 | <summary> |
2322 | Tag used for authentication. | 2645 | Will try to accept connections one more time. |
2323 | </summary> | 2646 | </summary> |
2647 | <exception cref="T:System.Exception">If any exceptions is thrown.</exception> | ||
2324 | </member> | 2648 | </member> |
2325 | <member name="M:HttpServer.Authentication.AuthenticationModule.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)"> | 2649 | <member name="M:HttpServer.HttpListenerBase.OnAcceptingSocket(System.Net.Sockets.Socket)"> |
2326 | <summary> | 2650 | <summary> |
2327 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.AuthenticationModule"/> class. | 2651 | Can be used to create filtering of new connections. |
2328 | </summary> | 2652 | </summary> |
2329 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | 2653 | <param name="socket">Accepted socket</param> |
2330 | <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param> | 2654 | <returns>true if connection can be accepted; otherwise false.</returns> |
2331 | </member> | 2655 | </member> |
2332 | <member name="M:HttpServer.Authentication.AuthenticationModule.#ctor(HttpServer.Authentication.AuthenticationHandler)"> | 2656 | <member name="M:HttpServer.HttpListenerBase.Start(System.Int32)"> |
2333 | <summary> | 2657 | <summary> |
2334 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.AuthenticationModule"/> class. | 2658 | Start listen for new connections |
2335 | </summary> | 2659 | </summary> |
2336 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | 2660 | <param name="backlog">Number of connections that can stand in a queue to be accepted.</param> |
2661 | <exception cref="T:System.InvalidOperationException">Listener have already been started.</exception> | ||
2337 | </member> | 2662 | </member> |
2338 | <member name="M:HttpServer.Authentication.AuthenticationModule.CreateResponse(System.String,System.Object[])"> | 2663 | <member name="M:HttpServer.HttpListenerBase.Stop"> |
2339 | <summary> | 2664 | <summary> |
2340 | Create a response that can be sent in the WWW-Authenticate header. | 2665 | Stop the listener |
2341 | </summary> | 2666 | </summary> |
2342 | <param name="realm">Realm that the user should authenticate in</param> | 2667 | <exception cref="T:System.Net.Sockets.SocketException"></exception> |
2343 | <param name="options">Array with optional options.</param> | ||
2344 | <returns>A correct authentication request.</returns> | ||
2345 | <exception cref="T:System.ArgumentNullException">If realm is empty or null.</exception> | ||
2346 | </member> | 2668 | </member> |
2347 | <member name="M:HttpServer.Authentication.AuthenticationModule.Authenticate(System.String,System.String,System.String,System.Object[])"> | 2669 | <member name="E:HttpServer.HttpListenerBase.ExceptionThrown"> |
2348 | <summary> | 2670 | <summary> |
2349 | An authentication response have been received from the web browser. | 2671 | Catch exceptions not handled by the listener. |
2350 | Check if it's correct | ||
2351 | </summary> | 2672 | </summary> |
2352 | <param name="authenticationHeader">Contents from the Authorization header</param> | 2673 | <remarks> |
2353 | <param name="realm">Realm that should be authenticated</param> | 2674 | Exceptions will be thrown during debug mode if this event is not used, |
2354 | <param name="httpVerb">GET/POST/PUT/DELETE etc.</param> | 2675 | exceptions will be printed to console and suppressed during release mode. |
2355 | <param name="options">options to specific implementations</param> | 2676 | </remarks> |
2356 | <returns>Authentication object that is stored for the request. A user class or something like that.</returns> | ||
2357 | <exception cref="T:System.ArgumentException">if <paramref name="authenticationHeader"/> is invalid</exception> | ||
2358 | <exception cref="T:System.ArgumentNullException">If any of the parameters is empty or null.</exception> | ||
2359 | </member> | 2677 | </member> |
2360 | <member name="M:HttpServer.Authentication.AuthenticationModule.CheckAuthentication(System.String,System.String,System.String@,System.Object@)"> | 2678 | <member name="E:HttpServer.HttpListenerBase.RequestReceived"> |
2361 | <summary> | 2679 | <summary> |
2362 | Used to invoke the authentication delegate that is used to lookup the user name/realm. | 2680 | A request have been received from a <see cref="T:HttpServer.IHttpClientContext"/>. |
2363 | </summary> | 2681 | </summary> |
2364 | <param name="realm">Realm (domain) that user want to authenticate in</param> | ||
2365 | <param name="userName">User name</param> | ||
2366 | <param name="password">Password used for validation. Some implementations got password in clear text, they are then sent to client.</param> | ||
2367 | <param name="login">object that will be stored in the request to help you identify the user if authentication was successful.</param> | ||
2368 | <returns>true if authentication was successful</returns> | ||
2369 | </member> | 2682 | </member> |
2370 | <member name="M:HttpServer.Authentication.AuthenticationModule.AuthenticationRequired(HttpServer.IHttpRequest)"> | 2683 | <member name="T:HttpServer.HttpModules.FileModule"> |
2371 | <summary> | 2684 | <summary> |
2372 | Determines if authentication is required. | 2685 | The purpose of this module is to serve files. |
2373 | </summary> | 2686 | </summary> |
2374 | <param name="request">HTTP request from browser</param> | ||
2375 | <returns>true if user should be authenticated.</returns> | ||
2376 | <remarks>throw <see cref="T:HttpServer.Exceptions.ForbiddenException"/> from your delegate if no more attempts are allowed.</remarks> | ||
2377 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">If no more attempts are allowed</exception> | ||
2378 | </member> | 2687 | </member> |
2379 | <member name="P:HttpServer.Authentication.AuthenticationModule.Name"> | 2688 | <member name="M:HttpServer.HttpModules.FileModule.#ctor(System.String,System.String,System.Boolean)"> |
2380 | <summary> | 2689 | <summary> |
2381 | name used in HTTP request. | 2690 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.FileModule"/> class. |
2382 | </summary> | 2691 | </summary> |
2692 | <param name="baseUri">Uri to serve, for instance "/files/"</param> | ||
2693 | <param name="basePath">Path on hard drive where we should start looking for files</param> | ||
2694 | <param name="useLastModifiedHeader">If true a Last-Modifed header will be sent upon requests urging web browser to cache files</param> | ||
2383 | </member> | 2695 | </member> |
2384 | <member name="M:HttpServer.Authentication.DigestAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)"> | 2696 | <member name="M:HttpServer.HttpModules.FileModule.#ctor(System.String,System.String)"> |
2385 | <summary> | 2697 | <summary> |
2386 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.DigestAuthentication"/> class. | 2698 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.FileModule"/> class. |
2387 | </summary> | 2699 | </summary> |
2388 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | 2700 | <param name="baseUri">Uri to serve, for instance "/files/"</param> |
2389 | <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param> | 2701 | <param name="basePath">Path on hard drive where we should start looking for files</param> |
2390 | </member> | 2702 | </member> |
2391 | <member name="M:HttpServer.Authentication.DigestAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler)"> | 2703 | <member name="P:HttpServer.HttpModules.FileModule.MimeTypes"> |
2392 | <summary> | 2704 | <summary> |
2393 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.DigestAuthentication"/> class. | 2705 | List with all mime-type that are allowed. |
2394 | </summary> | 2706 | </summary> |
2395 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | 2707 | <remarks>All other mime types will result in a Forbidden http status code.</remarks> |
2396 | </member> | 2708 | </member> |
2397 | <member name="F:HttpServer.Authentication.DigestAuthentication.DisableNonceCheck"> | 2709 | <member name="P:HttpServer.HttpModules.FileModule.ForbiddenChars"> |
2398 | <summary> | 2710 | <summary> |
2399 | Used by test classes to be able to use hardcoded values | 2711 | characters that may not exist in a path. |
2400 | </summary> | 2712 | </summary> |
2713 | <example> | ||
2714 | fileMod.ForbiddenChars = new string[]{ "\\", "..", ":" }; | ||
2715 | </example> | ||
2401 | </member> | 2716 | </member> |
2402 | <member name="M:HttpServer.Authentication.DigestAuthentication.Authenticate(System.String,System.String,System.String,System.Object[])"> | 2717 | <member name="M:HttpServer.HttpModules.FileModule.AddDefaultMimeTypes"> |
2403 | <summary> | 2718 | <summary> |
2404 | An authentication response have been received from the web browser. | 2719 | Mimtypes that this class can handle per default |
2405 | Check if it's correct | ||
2406 | </summary> | 2720 | </summary> |
2407 | <param name="authenticationHeader">Contents from the Authorization header</param> | ||
2408 | <param name="realm">Realm that should be authenticated</param> | ||
2409 | <param name="httpVerb">GET/POST/PUT/DELETE etc.</param> | ||
2410 | <param name="options">First option: true if username/password is correct but not cnonce</param> | ||
2411 | <returns> | ||
2412 | Authentication object that is stored for the request. A user class or something like that. | ||
2413 | </returns> | ||
2414 | <exception cref="T:System.ArgumentException">if authenticationHeader is invalid</exception> | ||
2415 | <exception cref="T:System.ArgumentNullException">If any of the paramters is empty or null.</exception> | ||
2416 | </member> | 2721 | </member> |
2417 | <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)"> | 2722 | <member name="M:HttpServer.HttpModules.FileModule.CanHandle(System.Uri)"> |
2418 | <summary> | 2723 | <summary> |
2419 | Encrypts parameters into a Digest string | 2724 | Determines if the request should be handled by this module. |
2725 | Invoked by the <see cref="T:HttpServer.HttpServer"/> | ||
2420 | </summary> | 2726 | </summary> |
2421 | <param name="realm">Realm that the user want to log into.</param> | 2727 | <param name="uri"></param> |
2422 | <param name="userName">User logging in</param> | 2728 | <returns>true if this module should handle it.</returns> |
2423 | <param name="password">Users password.</param> | ||
2424 | <param name="method">HTTP method.</param> | ||
2425 | <param name="uri">Uri/domain that generated the login prompt.</param> | ||
2426 | <param name="qop">Quality of Protection.</param> | ||
2427 | <param name="nonce">"Number used ONCE"</param> | ||
2428 | <param name="nc">Hexadecimal request counter.</param> | ||
2429 | <param name="cnonce">"Client Number used ONCE"</param> | ||
2430 | <returns>Digest encrypted string</returns> | ||
2431 | </member> | 2729 | </member> |
2432 | <member name="M:HttpServer.Authentication.DigestAuthentication.Encrypt(System.String,System.String,System.String,System.String,System.String,System.String)"> | 2730 | <member name="M:HttpServer.HttpModules.FileModule.GetPath(System.Uri)"> |
2731 | <exception cref="T:HttpServer.Exceptions.BadRequestException">Illegal path</exception> | ||
2732 | </member> | ||
2733 | <member name="M:HttpServer.HttpModules.FileModule.Contains(System.String,System.Collections.Generic.IEnumerable{System.String})"> | ||
2433 | <summary> | 2734 | <summary> |
2434 | 2735 | check if source contains any of the chars. | |
2435 | </summary> | 2736 | </summary> |
2436 | <param name="ha1">Md5 hex encoded "userName:realm:password", without the quotes.</param> | 2737 | <param name="source"></param> |
2437 | <param name="ha2">Md5 hex encoded "method:uri", without the quotes</param> | 2738 | <param name="chars"></param> |
2438 | <param name="qop">Quality of Protection</param> | ||
2439 | <param name="nonce">"Number used ONCE"</param> | ||
2440 | <param name="nc">Hexadecimal request counter.</param> | ||
2441 | <param name="cnonce">Client number used once</param> | ||
2442 | <returns></returns> | 2739 | <returns></returns> |
2443 | </member> | 2740 | </member> |
2444 | <member name="M:HttpServer.Authentication.DigestAuthentication.CreateResponse(System.String,System.Object[])"> | 2741 | <member name="M:HttpServer.HttpModules.FileModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
2445 | <summary> | 2742 | <summary> |
2446 | Create a response that can be sent in the WWW-Authenticate header. | 2743 | Method that process the Uri. |
2447 | </summary> | 2744 | </summary> |
2448 | <param name="realm">Realm that the user should authenticate in</param> | 2745 | <param name="request">Information sent by the browser about the request</param> |
2449 | <param name="options">First options specifies if true if username/password is correct but not cnonce.</param> | 2746 | <param name="response">Information that is being sent back to the client.</param> |
2450 | <returns>A correct auth request.</returns> | 2747 | <param name="session">Session used to </param> |
2451 | <exception cref="T:System.ArgumentNullException">If realm is empty or null.</exception> | 2748 | <exception cref="T:HttpServer.Exceptions.InternalServerException">Failed to find file extension</exception> |
2749 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">File type is forbidden.</exception> | ||
2452 | </member> | 2750 | </member> |
2453 | <member name="M:HttpServer.Authentication.DigestAuthentication.Decode(System.String,System.Text.Encoding)"> | 2751 | <member name="M:HttpServer.HttpModules.FileModule.GetFileExtension(System.String)"> |
2454 | <summary> | 2752 | <summary> |
2455 | Decodes authorization header value | 2753 | return a file extension from an absolute Uri path (or plain filename) |
2456 | </summary> | 2754 | </summary> |
2457 | <param name="buffer">header value</param> | 2755 | <param name="uri"></param> |
2458 | <param name="encoding">Encoding that the buffer is in</param> | 2756 | <returns></returns> |
2459 | <returns>All headers and their values if successful; otherwise null</returns> | ||
2460 | <example> | ||
2461 | NameValueCollection header = DigestAuthentication.Decode("response=\"6629fae49393a05397450978507c4ef1\",\r\nc=00001", Encoding.ASCII); | ||
2462 | </example> | ||
2463 | <remarks>Can handle lots of whitespaces and new lines without failing.</remarks> | ||
2464 | </member> | 2757 | </member> |
2465 | <member name="M:HttpServer.Authentication.DigestAuthentication.GetCurrentNonce"> | 2758 | <member name="T:HttpServer.HttpModules.HttpModule"> |
2466 | <summary> | 2759 | <summary> |
2467 | Gets the current nonce. | 2760 | A HttpModule can be used to serve Uri's. The module itself |
2761 | decides if it should serve a Uri or not. In this way, you can | ||
2762 | get a very flexible http application since you can let multiple modules | ||
2763 | serve almost similar urls. | ||
2468 | </summary> | 2764 | </summary> |
2469 | <returns></returns> | 2765 | <remarks> |
2766 | 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. | ||
2767 | </remarks> | ||
2470 | </member> | 2768 | </member> |
2471 | <member name="M:HttpServer.Authentication.DigestAuthentication.GetMD5HashBinHex2(System.String)"> | 2769 | <member name="M:HttpServer.HttpModules.HttpModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
2472 | <summary> | 2770 | <summary> |
2473 | Gets the Md5 hash bin hex2. | 2771 | Method that process the url |
2474 | </summary> | 2772 | </summary> |
2475 | <param name="toBeHashed">To be hashed.</param> | 2773 | <param name="request">Information sent by the browser about the request</param> |
2476 | <returns></returns> | 2774 | <param name="response">Information that is being sent back to the client.</param> |
2775 | <param name="session">Session used to </param> | ||
2776 | <returns>true if this module handled the request.</returns> | ||
2477 | </member> | 2777 | </member> |
2478 | <member name="M:HttpServer.Authentication.DigestAuthentication.IsValidNonce(System.String)"> | 2778 | <member name="M:HttpServer.HttpModules.HttpModule.SetLogWriter(HttpServer.ILogWriter)"> |
2479 | <summary> | 2779 | <summary> |
2480 | determines if the nonce is valid or has expired. | 2780 | Set the log writer to use. |
2481 | </summary> | 2781 | </summary> |
2482 | <param name="nonce">nonce value (check wikipedia for info)</param> | 2782 | <param name="writer">logwriter to use.</param> |
2483 | <returns>true if the nonce has not expired.</returns> | ||
2484 | </member> | 2783 | </member> |
2485 | <member name="P:HttpServer.Authentication.DigestAuthentication.Name"> | 2784 | <member name="M:HttpServer.HttpModules.HttpModule.Write(HttpServer.LogPrio,System.String)"> |
2486 | <summary> | 2785 | <summary> |
2487 | name used in http request. | 2786 | Log something. |
2488 | </summary> | 2787 | </summary> |
2788 | <param name="prio">importance of log message</param> | ||
2789 | <param name="message">message</param> | ||
2489 | </member> | 2790 | </member> |
2490 | <member name="P:HttpServer.Authentication.DigestAuthentication.TokenIsHA1"> | 2791 | <member name="P:HttpServer.HttpModules.HttpModule.AllowSecondaryProcessing"> |
2491 | <summary> | 2792 | <summary> |
2492 | Gets or sets whether the token supplied in <see cref="T:HttpServer.Authentication.AuthenticationHandler"/> is a | 2793 | If true specifies that the module doesn't consume the processing of a request so that subsequent modules |
2493 | HA1 generated string. | 2794 | can continue processing afterwards. Default is false. |
2494 | </summary> | 2795 | </summary> |
2495 | </member> | 2796 | </member> |
2496 | <member name="T:HttpServer.HttpHelper"> | 2797 | <member name="T:HttpServer.HttpModules.HttpModuleExceptionEventArgs"> |
2497 | <summary> | 2798 | <summary> |
2498 | Generic helper functions for HTTP | 2799 | Used to inform http server that |
2499 | </summary> | 2800 | </summary> |
2500 | </member> | 2801 | </member> |
2501 | <member name="F:HttpServer.HttpHelper.HTTP10"> | 2802 | <member name="M:HttpServer.HttpModules.HttpModuleExceptionEventArgs.#ctor(System.Exception)"> |
2502 | <summary> | 2803 | <summary> |
2503 | Version string for HTTP v1.0 | 2804 | Eventarguments used when an exception is thrown by a module |
2504 | </summary> | 2805 | </summary> |
2806 | <param name="e">the exception</param> | ||
2505 | </member> | 2807 | </member> |
2506 | <member name="F:HttpServer.HttpHelper.HTTP11"> | 2808 | <member name="P:HttpServer.HttpModules.HttpModuleExceptionEventArgs.Exception"> |
2507 | <summary> | 2809 | <summary> |
2508 | Version string for HTTP v1.1 | 2810 | Exception thrown in a module |
2509 | </summary> | 2811 | </summary> |
2510 | </member> | 2812 | </member> |
2511 | <member name="F:HttpServer.HttpHelper.EmptyUri"> | 2813 | <member name="T:HttpServer.HttpModules.ResourceFileModule"> |
2512 | <summary> | 2814 | <summary> |
2513 | An empty URI | 2815 | Serves files that are stored in embedded resources. |
2514 | </summary> | 2816 | </summary> |
2515 | </member> | 2817 | </member> |
2516 | <member name="M:HttpServer.HttpHelper.ParseQueryString(System.String)"> | 2818 | <member name="M:HttpServer.HttpModules.ResourceFileModule.#ctor"> |
2517 | <summary> | 2819 | <summary> |
2518 | Parses a query string. | 2820 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.ResourceFileModule"/> class. |
2821 | Runs <see cref="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"/> to make sure the basic mime types are available, they can be cleared later | ||
2822 | through the use of <see cref="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"/> if desired. | ||
2519 | </summary> | 2823 | </summary> |
2520 | <param name="queryString">Query string (URI encoded)</param> | ||
2521 | <returns>A <see cref="T:HttpServer.HttpInput"/> object if successful; otherwise <see cref="F:HttpServer.HttpInput.Empty"/></returns> | ||
2522 | <exception cref="T:System.ArgumentNullException"><c>queryString</c> is null.</exception> | ||
2523 | <exception cref="T:System.FormatException">If string cannot be parsed.</exception> | ||
2524 | </member> | 2824 | </member> |
2525 | <member name="T:HttpServer.Authentication.AuthenticationHandler"> | 2825 | <member name="M:HttpServer.HttpModules.ResourceFileModule.#ctor(HttpServer.ILogWriter)"> |
2526 | <summary> | 2826 | <summary> |
2527 | Delegate used to let authentication modules authenticate the user name and password. | 2827 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.ResourceFileModule"/> class. |
2828 | Runs <see cref="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"/> to make sure the basic mime types are available, they can be cleared later | ||
2829 | through the use of <see cref="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"/> if desired. | ||
2528 | </summary> | 2830 | </summary> |
2529 | <param name="realm">Realm that the user want to authenticate in</param> | 2831 | <param name="logWriter">The log writer to use when logging events</param> |
2530 | <param name="userName">User name specified by client</param> | ||
2531 | <param name="token">Can either be user password or implementation specific token.</param> | ||
2532 | <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> | ||
2533 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">throw forbidden exception if too many attempts have been made.</exception> | ||
2534 | <remarks> | ||
2535 | <para> | ||
2536 | Use <see cref="P:HttpServer.Authentication.DigestAuthentication.TokenIsHA1"/> to specify that the token is a HA1 token. (MD5 generated | ||
2537 | string from realm, user name and password); Md5String(userName + ":" + realm + ":" + password); | ||
2538 | </para> | ||
2539 | </remarks> | ||
2540 | </member> | 2832 | </member> |
2541 | <member name="T:HttpServer.Authentication.AuthenticationRequiredHandler"> | 2833 | <member name="P:HttpServer.HttpModules.ResourceFileModule.MimeTypes"> |
2542 | <summary> | 2834 | <summary> |
2543 | Let's you decide on a system level if authentication is required. | 2835 | List with all mime-type that are allowed. |
2544 | </summary> | 2836 | </summary> |
2545 | <param name="request">HTTP request from client</param> | 2837 | <remarks>All other mime types will result in a Forbidden http status code.</remarks> |
2546 | <returns>true if user should be authenticated.</returns> | ||
2547 | <remarks>throw <see cref="T:HttpServer.Exceptions.ForbiddenException"/> if no more attempts are allowed.</remarks> | ||
2548 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">If no more attempts are allowed</exception> | ||
2549 | </member> | 2838 | </member> |
2550 | <member name="T:HttpServer.Parser.BodyEventArgs"> | 2839 | <member name="M:HttpServer.HttpModules.ResourceFileModule.AddDefaultMimeTypes"> |
2551 | <summary> | 2840 | <summary> |
2552 | Arguments used when more body bytes have come. | 2841 | Mimtypes that this class can handle per default |
2553 | </summary> | 2842 | </summary> |
2554 | </member> | 2843 | </member> |
2555 | <member name="M:HttpServer.Parser.BodyEventArgs.#ctor(System.Byte[],System.Int32,System.Int32)"> | 2844 | <member name="M:HttpServer.HttpModules.ResourceFileModule.AddResources(System.String,System.Reflection.Assembly,System.String)"> |
2556 | <summary> | 2845 | <summary> |
2557 | Initializes a new instance of the <see cref="T:HttpServer.Parser.BodyEventArgs"/> class. | 2846 | Loads resources from a namespace in the given assembly to an uri |
2558 | </summary> | 2847 | </summary> |
2559 | <param name="buffer">buffer that contains the received bytes.</param> | 2848 | <param name="toUri">The uri to map the resources to</param> |
2560 | <param name="offset">offset in buffer where to start processing.</param> | 2849 | <param name="fromAssembly">The assembly in which the resources reside</param> |
2561 | <param name="count">number of bytes from <paramref name="offset"/> that should be parsed.</param> | 2850 | <param name="fromNamespace">The namespace from which to load the resources</param> |
2851 | <usage> | ||
2852 | resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views"); | ||
2853 | |||
2854 | will make ie the resource MyLib.Models.User.Views.stylesheet.css accessible via /user/stylesheet.css | ||
2855 | </usage> | ||
2856 | <returns>The amount of loaded files, giving you the possibility of making sure the resources needed gets loaded</returns> | ||
2562 | </member> | 2857 | </member> |
2563 | <member name="M:HttpServer.Parser.BodyEventArgs.#ctor"> | 2858 | <member name="M:HttpServer.HttpModules.ResourceFileModule.CanHandle(HttpServer.IHttpRequest)"> |
2564 | <summary> | 2859 | <summary> |
2565 | Initializes a new instance of the <see cref="T:HttpServer.Parser.BodyEventArgs"/> class. | 2860 | Returns true if the module can handle the request |
2566 | </summary> | 2861 | </summary> |
2567 | </member> | 2862 | </member> |
2568 | <member name="P:HttpServer.Parser.BodyEventArgs.Buffer"> | 2863 | <member name="M:HttpServer.HttpModules.ResourceFileModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
2569 | <summary> | 2864 | <summary> |
2570 | Gets or sets buffer that contains the received bytes. | 2865 | Method that process the url |
2571 | </summary> | 2866 | </summary> |
2867 | <param name="request">Information sent by the browser about the request</param> | ||
2868 | <param name="response">Information that is being sent back to the client.</param> | ||
2869 | <param name="session">Session used to </param> | ||
2870 | <returns>true if this module handled the request.</returns> | ||
2572 | </member> | 2871 | </member> |
2573 | <member name="P:HttpServer.Parser.BodyEventArgs.Count"> | 2872 | <member name="T:HttpServer.HttpModules.ReverseProxyModule"> |
2574 | <summary> | 2873 | <summary> |
2575 | Gets or sets number of bytes from <see cref="P:HttpServer.Parser.BodyEventArgs.Offset"/> that should be parsed. | 2874 | A reverse proxy are used to act as a bridge between local (protected/hidden) websites |
2875 | and public clients. | ||
2876 | |||
2877 | A typical usage is to allow web servers on non standard ports to still be available | ||
2878 | to the public clients, or allow web servers on private ips to be available. | ||
2576 | </summary> | 2879 | </summary> |
2577 | </member> | 2880 | </member> |
2578 | <member name="P:HttpServer.Parser.BodyEventArgs.Offset"> | 2881 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.#ctor(System.String,System.String)"> |
2579 | <summary> | 2882 | <summary> |
2580 | Gets or sets offset in buffer where to start processing. | 2883 | |
2581 | </summary> | 2884 | </summary> |
2885 | <param name="source">Base url requested from browser</param> | ||
2886 | <param name="destination">Base url on private web server</param> | ||
2887 | <example> | ||
2888 | // this will return contents from http://192.168.1.128/view/jonas when client requests http://www.gauffin.com/user/view/jonas | ||
2889 | _server.Add(new ReverseProxyModule("http://www.gauffin.com/user/", "http://192.168.1.128/"); | ||
2890 | </example> | ||
2582 | </member> | 2891 | </member> |
2583 | <member name="T:HttpServer.Method"> | 2892 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.CanHandle(System.Uri)"> |
2584 | <summary> | 2893 | <summary> |
2585 | Contains all HTTP Methods (according to the HTTP 1.1 specification) | 2894 | Method that determines if an url should be handled or not by the module |
2586 | <para> | ||
2587 | See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html | ||
2588 | </para> | ||
2589 | </summary> | 2895 | </summary> |
2896 | <param name="uri">Url requested by the client.</param> | ||
2897 | <returns>true if module should handle the url.</returns> | ||
2590 | </member> | 2898 | </member> |
2591 | <member name="F:HttpServer.Method.Delete"> | 2899 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
2592 | <summary> | 2900 | <summary> |
2593 | The DELETE method requests that the origin server delete the resource identified by the Request-URI. | 2901 | Method that process the url |
2594 | </summary> | 2902 | </summary> |
2595 | <remarks> | 2903 | <param name="request">Information sent by the browser about the request</param> |
2596 | <para> | 2904 | <param name="response">Information that is being sent back to the client.</param> |
2597 | This method MAY be overridden by human intervention (or other means) on the origin server. | 2905 | <param name="session">Session used to </param> |
2598 | The client cannot be guaranteed that the operation has been carried out, even if the status code | ||
2599 | returned from the origin server indicates that the action has been completed successfully. | ||
2600 | </para> | ||
2601 | <para> | ||
2602 | However, the server SHOULD NOT indicate success unless, at the time the response is given, | ||
2603 | it intends to delete the resource or move it to an inaccessible location. | ||
2604 | </para> | ||
2605 | <para> | ||
2606 | A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, | ||
2607 | 202 (Accepted) if the action has not yet been enacted, | ||
2608 | or 204 (No Content) if the action has been enacted but the response does not include an entity. | ||
2609 | </para> | ||
2610 | <para> | ||
2611 | If the request passes through a cache and the Request-URI identifies one or more currently cached entities, | ||
2612 | those entries SHOULD be treated as stale. Responses to this method are not cacheable. | ||
2613 | </para> | ||
2614 | </remarks> | ||
2615 | </member> | 2906 | </member> |
2616 | <member name="F:HttpServer.Method.Get"> | 2907 | <member name="T:HttpServer.HttpModules.WebSiteModule"> |
2617 | <summary> | 2908 | <summary> |
2618 | The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. | 2909 | The website module let's you handle multiple websites in the same server. |
2910 | It uses the "Host" header to check which site you want. | ||
2619 | </summary> | 2911 | </summary> |
2620 | <remarks> | 2912 | <remarks>It's recommended that you do not |
2621 | <para> | 2913 | add any other modules to HttpServer if you are using the website module. Instead, |
2622 | If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the | 2914 | add all wanted modules to each website.</remarks> |
2623 | entity in the response and not the source text of the process, unless that text happens to be the output of the process. | ||
2624 | </para> | ||
2625 | <para> | ||
2626 | The semantics of the GET method change to a "conditional GET" if the request message includes an | ||
2627 | If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. | ||
2628 | A conditional GET method requests that the entity be transferred only under the circumstances described | ||
2629 | by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network | ||
2630 | usage by allowing cached entities to be refreshed without requiring multiple requests or transferring | ||
2631 | data already held by the client. | ||
2632 | </para> | ||
2633 | </remarks> | ||
2634 | </member> | 2915 | </member> |
2635 | <member name="F:HttpServer.Method.Header"> | 2916 | <member name="M:HttpServer.HttpModules.WebSiteModule.#ctor(System.String,System.String)"> |
2636 | <summary> | 2917 | <summary> |
2637 | The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. | ||
2638 | </summary> | ||
2639 | <remarks> | ||
2640 | The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the | ||
2641 | information sent in response to a GET request. This method can be used for obtaining meta information about | ||
2642 | the entity implied by the request without transferring the entity-body itself. | ||
2643 | 2918 | ||
2644 | This method is often used for testing hypertext links for validity, accessibility, and recent modification. | 2919 | </summary> |
2645 | </remarks> | 2920 | <param name="host">domain name that should be handled.</param> |
2921 | <param name="name"></param> | ||
2646 | </member> | 2922 | </member> |
2647 | <member name="F:HttpServer.Method.Options"> | 2923 | <member name="P:HttpServer.HttpModules.WebSiteModule.SiteName"> |
2648 | <summary> | 2924 | <summary> |
2649 | <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> | 2925 | Name of site. |
2650 | </summary> | 2926 | </summary> |
2651 | <remarks> | ||
2652 | <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> | ||
2653 | </remarks> | ||
2654 | </member> | 2927 | </member> |
2655 | <member name="F:HttpServer.Method.Post"> | 2928 | <member name="M:HttpServer.HttpModules.WebSiteModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
2656 | <summary> | 2929 | <summary> |
2657 | The POST method is used to request that the origin server accept the entity enclosed | 2930 | Method that process the url |
2658 | in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. | ||
2659 | </summary> | 2931 | </summary> |
2660 | <remarks> | 2932 | <param name="request">Information sent by the browser about the request</param> |
2661 | POST is designed to allow a uniform method to cover the following functions: | 2933 | <param name="response">Information that is being sent back to the client.</param> |
2662 | <list type="bullet"> | 2934 | <param name="session">Session used to </param> |
2663 | <item> | ||
2664 | Annotation of existing resources; | ||
2665 | </item><item> | ||
2666 | Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; | ||
2667 | </item><item> | ||
2668 | Providing a block of data, such as the result of submitting a form, to a data-handling process; | ||
2669 | </item><item> | ||
2670 | Extending a database through an append operation. | ||
2671 | </item> | ||
2672 | </list> | ||
2673 | <para> | ||
2674 | If a resource has been created on the origin server, the response SHOULD be 201 (Created) and | ||
2675 | contain an entity which describes the status of the request and refers to the new resource, and a | ||
2676 | Location header (see section 14.30). | ||
2677 | </para> | ||
2678 | <para> | ||
2679 | The action performed by the POST method might not result in a resource that can be identified by a URI. | ||
2680 | In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on | ||
2681 | whether or not the response includes an entity that describes the result. | ||
2682 | </para><para> | ||
2683 | Responses to this method are not cacheable, unless the response includes appropriate Cache-Control | ||
2684 | or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent | ||
2685 | to retrieve a cacheable resource. | ||
2686 | </para> | ||
2687 | </remarks> | ||
2688 | </member> | 2935 | </member> |
2689 | <member name="F:HttpServer.Method.Put"> | 2936 | <member name="T:HttpServer.HttpParam"> |
2690 | <summary> | 2937 | <summary> |
2691 | The PUT method requests that the enclosed entity be stored under the supplied Request-URI. | 2938 | Returns item either from a form or a query string (checks them in that order) |
2692 | </summary> | 2939 | </summary> |
2693 | <remarks> | ||
2694 | <list type="bullet"> | ||
2695 | <item> | ||
2696 | If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a | ||
2697 | modified version of the one residing on the origin server. | ||
2698 | </item><item> | ||
2699 | If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new | ||
2700 | resource by the requesting user agent, the origin server can create the resource with that URI. | ||
2701 | </item><item> | ||
2702 | If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. | ||
2703 | </item><item> | ||
2704 | If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to | ||
2705 | indicate successful completion of the request. | ||
2706 | </item><item> | ||
2707 | If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be | ||
2708 | given that reflects the nature of the problem. | ||
2709 | </item> | ||
2710 | </list> | ||
2711 | <para> | ||
2712 | The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not | ||
2713 | understand or implement and MUST return a 501 (Not Implemented) response in such cases. | ||
2714 | </para> | ||
2715 | </remarks> | ||
2716 | </member> | 2940 | </member> |
2717 | <member name="F:HttpServer.Method.Trace"> | 2941 | <member name="F:HttpServer.HttpParam.Empty"> |
2942 | <summary> Representation of a non-initialized HttpParam </summary> | ||
2943 | </member> | ||
2944 | <member name="M:HttpServer.HttpParam.#ctor(HttpServer.IHttpInput,HttpServer.IHttpInput)"> | ||
2945 | <summary>Initialises the class to hold a value either from a post request or a querystring request</summary> | ||
2946 | </member> | ||
2947 | <member name="M:HttpServer.HttpParam.Add(System.String,System.String)"> | ||
2718 | <summary> | 2948 | <summary> |
2719 | The TRACE method is used to invoke a remote, application-layer loop- back of the request message. | 2949 | The add method is not availible for HttpParam |
2950 | since HttpParam checks both Request.Form and Request.QueryString | ||
2720 | </summary> | 2951 | </summary> |
2952 | <param name="name">name identifying the value</param> | ||
2953 | <param name="value">value to add</param> | ||
2954 | <exception cref="T:System.NotImplementedException"></exception> | ||
2721 | </member> | 2955 | </member> |
2722 | <member name="T:HttpServer.Methods"> | 2956 | <member name="M:HttpServer.HttpParam.Contains(System.String)"> |
2723 | <summary> | 2957 | <summary> |
2724 | Contains all HTTP Methods (according to the HTTP 1.1 specification) | 2958 | Checks whether the form or querystring has the specified value |
2725 | <para> | ||
2726 | See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html | ||
2727 | </para> | ||
2728 | </summary> | 2959 | </summary> |
2960 | <param name="name">Name, case sensitive</param> | ||
2961 | <returns>true if found; otherwise false.</returns> | ||
2729 | </member> | 2962 | </member> |
2730 | <member name="F:HttpServer.Methods.Delete"> | 2963 | <member name="P:HttpServer.HttpParam.Item(System.String)"> |
2731 | <summary> | 2964 | <summary> |
2732 | The DELETE method requests that the origin server delete the resource identified by the Request-URI. | 2965 | Fetch an item from the form or querystring (in that order). |
2733 | </summary> | 2966 | </summary> |
2734 | <remarks> | 2967 | <param name="name"></param> |
2735 | <para> | 2968 | <returns>Item if found; otherwise HttpInputItem.EmptyLanguageNode</returns> |
2736 | This method MAY be overridden by human intervention (or other means) on the origin server. | ||
2737 | The client cannot be guaranteed that the operation has been carried out, even if the status code | ||
2738 | returned from the origin server indicates that the action has been completed successfully. | ||
2739 | </para> | ||
2740 | <para> | ||
2741 | However, the server SHOULD NOT indicate success unless, at the time the response is given, | ||
2742 | it intends to delete the resource or move it to an inaccessible location. | ||
2743 | </para> | ||
2744 | <para> | ||
2745 | A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, | ||
2746 | 202 (Accepted) if the action has not yet been enacted, | ||
2747 | or 204 (No Content) if the action has been enacted but the response does not include an entity. | ||
2748 | </para> | ||
2749 | <para> | ||
2750 | If the request passes through a cache and the Request-URI identifies one or more currently cached entities, | ||
2751 | those entries SHOULD be treated as stale. Responses to this method are not cacheable. | ||
2752 | </para> | ||
2753 | </remarks> | ||
2754 | </member> | 2969 | </member> |
2755 | <member name="F:HttpServer.Methods.Get"> | 2970 | <member name="M:HttpServer.HttpParam.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator"> |
2756 | <summary> | 2971 | <summary> |
2757 | The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. | 2972 | Returns an enumerator that iterates through the collection. |
2758 | </summary> | 2973 | </summary> |
2759 | <remarks> | 2974 | |
2760 | <para> | 2975 | <returns> |
2761 | If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the | 2976 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. |
2762 | entity in the response and not the source text of the process, unless that text happens to be the output of the process. | 2977 | </returns> |
2763 | </para> | 2978 | <filterpriority>1</filterpriority> |
2764 | <para> | ||
2765 | The semantics of the GET method change to a "conditional GET" if the request message includes an | ||
2766 | If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. | ||
2767 | A conditional GET method requests that the entity be transferred only under the circumstances described | ||
2768 | by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network | ||
2769 | usage by allowing cached entities to be refreshed without requiring multiple requests or transferring | ||
2770 | data already held by the client. | ||
2771 | </para> | ||
2772 | </remarks> | ||
2773 | </member> | 2979 | </member> |
2774 | <member name="F:HttpServer.Methods.Header"> | 2980 | <member name="M:HttpServer.HttpParam.GetEnumerator"> |
2775 | <summary> | 2981 | <summary> |
2776 | The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. | 2982 | Returns an enumerator that iterates through a collection. |
2777 | </summary> | 2983 | </summary> |
2778 | <remarks> | ||
2779 | The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the | ||
2780 | information sent in response to a GET request. This method can be used for obtaining meta information about | ||
2781 | the entity implied by the request without transferring the entity-body itself. | ||
2782 | 2984 | ||
2783 | This method is often used for testing hypertext links for validity, accessibility, and recent modification. | 2985 | <returns> |
2784 | </remarks> | 2986 | An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection. |
2987 | </returns> | ||
2988 | <filterpriority>2</filterpriority> | ||
2785 | </member> | 2989 | </member> |
2786 | <member name="F:HttpServer.Methods.Options"> | 2990 | <member name="T:HttpServer.HttpRequest"> |
2787 | <summary> | 2991 | <summary> |
2788 | <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> | 2992 | Contains server side HTTP request information. |
2789 | </summary> | 2993 | </summary> |
2790 | <remarks> | ||
2791 | <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> | ||
2792 | </remarks> | ||
2793 | </member> | 2994 | </member> |
2794 | <member name="F:HttpServer.Methods.Post"> | 2995 | <member name="F:HttpServer.HttpRequest.UriSplitters"> |
2795 | <summary> | 2996 | <summary> |
2796 | The POST method is used to request that the origin server accept the entity enclosed | 2997 | Chars used to split an URL path into multiple parts. |
2797 | in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. | ||
2798 | </summary> | 2998 | </summary> |
2799 | <remarks> | ||
2800 | POST is designed to allow a uniform method to cover the following functions: | ||
2801 | <list type="bullet"> | ||
2802 | <item> | ||
2803 | Annotation of existing resources; | ||
2804 | </item><item> | ||
2805 | Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; | ||
2806 | </item><item> | ||
2807 | Providing a block of data, such as the result of submitting a form, to a data-handling process; | ||
2808 | </item><item> | ||
2809 | Extending a database through an append operation. | ||
2810 | </item> | ||
2811 | </list> | ||
2812 | <para> | ||
2813 | If a resource has been created on the origin server, the response SHOULD be 201 (Created) and | ||
2814 | contain an entity which describes the status of the request and refers to the new resource, and a | ||
2815 | Location header (see section 14.30). | ||
2816 | </para> | ||
2817 | <para> | ||
2818 | The action performed by the POST method might not result in a resource that can be identified by a URI. | ||
2819 | In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on | ||
2820 | whether or not the response includes an entity that describes the result. | ||
2821 | </para><para> | ||
2822 | Responses to this method are not cacheable, unless the response includes appropriate Cache-Control | ||
2823 | or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent | ||
2824 | to retrieve a cacheable resource. | ||
2825 | </para> | ||
2826 | </remarks> | ||
2827 | </member> | 2999 | </member> |
2828 | <member name="F:HttpServer.Methods.Put"> | 3000 | <member name="P:HttpServer.HttpRequest.Secure"> |
2829 | <summary> | 3001 | <summary> |
2830 | The PUT method requests that the enclosed entity be stored under the supplied Request-URI. | 3002 | Gets or sets a value indicating whether this <see cref="T:HttpServer.HttpRequest"/> is secure. |
2831 | </summary> | 3003 | </summary> |
2832 | <remarks> | ||
2833 | <list type="bullet"> | ||
2834 | <item> | ||
2835 | If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a | ||
2836 | modified version of the one residing on the origin server. | ||
2837 | </item><item> | ||
2838 | If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new | ||
2839 | resource by the requesting user agent, the origin server can create the resource with that URI. | ||
2840 | </item><item> | ||
2841 | If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. | ||
2842 | </item><item> | ||
2843 | If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to | ||
2844 | indicate successful completion of the request. | ||
2845 | </item><item> | ||
2846 | If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be | ||
2847 | given that reflects the nature of the problem. | ||
2848 | </item> | ||
2849 | </list> | ||
2850 | <para> | ||
2851 | The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not | ||
2852 | understand or implement and MUST return a 501 (Not Implemented) response in such cases. | ||
2853 | </para> | ||
2854 | </remarks> | ||
2855 | </member> | 3004 | </member> |
2856 | <member name="F:HttpServer.Methods.Trace"> | 3005 | <member name="P:HttpServer.HttpRequest.UriPath"> |
2857 | <summary> | 3006 | <summary> |
2858 | The TRACE method is used to invoke a remote, application-layer loop- back of the request message. | 3007 | Path and query (will be merged with the host header) and put in Uri |
2859 | </summary> | 3008 | </summary> |
3009 | <see cref="P:HttpServer.HttpRequest.Uri"/> | ||
2860 | </member> | 3010 | </member> |
2861 | <member name="T:HttpServer.HttpContextFactory"> | 3011 | <member name="M:HttpServer.HttpRequest.AssignForm(HttpServer.HttpForm)"> |
2862 | <summary> | 3012 | <summary> |
2863 | Used to create and reuse contexts. | 3013 | Assign a form. |
2864 | </summary> | 3014 | </summary> |
3015 | <param name="form"></param> | ||
2865 | </member> | 3016 | </member> |
2866 | <member name="T:HttpServer.IHttpContextFactory"> | 3017 | <member name="P:HttpServer.HttpRequest.BodyIsComplete"> |
2867 | <summary> | 3018 | <summary> |
2868 | Used to create <see cref="T:HttpServer.IHttpClientContext"/>es. | 3019 | Gets whether the body is complete. |
2869 | </summary> | 3020 | </summary> |
2870 | </member> | 3021 | </member> |
2871 | <member name="M:HttpServer.IHttpContextFactory.CreateContext(System.Net.Sockets.Socket)"> | 3022 | <member name="P:HttpServer.HttpRequest.AcceptTypes"> |
2872 | <summary> | 3023 | <summary> |
2873 | Creates a <see cref="T:HttpServer.IHttpClientContext"/> that handles a connected client. | 3024 | Gets kind of types accepted by the client. |
2874 | </summary> | 3025 | </summary> |
2875 | <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param> | ||
2876 | <returns>A creates <see cref="T:HttpServer.IHttpClientContext"/>.</returns> | ||
2877 | </member> | 3026 | </member> |
2878 | <member name="M:HttpServer.IHttpContextFactory.CreateSecureContext(System.Net.Sockets.Socket,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> | 3027 | <member name="P:HttpServer.HttpRequest.Body"> |
2879 | <summary> | 3028 | <summary> |
2880 | Create a secure <see cref="T:HttpServer.IHttpClientContext"/>. | 3029 | Gets or sets body stream. |
2881 | </summary> | 3030 | </summary> |
2882 | <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param> | ||
2883 | <param name="certificate">HTTPS certificate to use.</param> | ||
2884 | <param name="protocol">Kind of HTTPS protocol. Usually TLS or SSL.</param> | ||
2885 | <returns>A created <see cref="T:HttpServer.IHttpClientContext"/>.</returns> | ||
2886 | </member> | 3031 | </member> |
2887 | <member name="M:HttpServer.IHttpContextFactory.Shutdown"> | 3032 | <member name="P:HttpServer.HttpRequest.Connection"> |
2888 | <summary> | 3033 | <summary> |
2889 | Server is shutting down so shut down the factory | 3034 | Gets or sets kind of connection used for the session. |
2890 | </summary> | 3035 | </summary> |
2891 | </member> | 3036 | </member> |
2892 | <member name="E:HttpServer.IHttpContextFactory.RequestReceived"> | 3037 | <member name="P:HttpServer.HttpRequest.ContentLength"> |
2893 | <summary> | 3038 | <summary> |
2894 | A request have been received from one of the contexts. | 3039 | Gets or sets number of bytes in the body. |
2895 | </summary> | 3040 | </summary> |
2896 | </member> | 3041 | </member> |
2897 | <member name="M:HttpServer.HttpContextFactory.#ctor(HttpServer.ILogWriter,System.Int32,HttpServer.IRequestParserFactory)"> | 3042 | <member name="P:HttpServer.HttpRequest.Headers"> |
2898 | <summary> | 3043 | <summary> |
2899 | Initializes a new instance of the <see cref="T:HttpServer.HttpContextFactory"/> class. | 3044 | Gets headers sent by the client. |
2900 | </summary> | 3045 | </summary> |
2901 | <param name="writer">The writer.</param> | ||
2902 | <param name="bufferSize">Amount of bytes to read from the incoming socket stream.</param> | ||
2903 | <param name="factory">Used to create a request parser.</param> | ||
2904 | </member> | 3046 | </member> |
2905 | <member name="M:HttpServer.HttpContextFactory.CreateContext(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,System.Net.Sockets.Socket)"> | 3047 | <member name="P:HttpServer.HttpRequest.HttpVersion"> |
2906 | <summary> | 3048 | <summary> |
2907 | Create a new context. | 3049 | Gets or sets version of HTTP protocol that's used. |
2908 | </summary> | 3050 | </summary> |
2909 | <param name="isSecured">true if socket is running HTTPS.</param> | 3051 | <remarks> |
2910 | <param name="endPoint">Client that connected</param> | 3052 | Probably <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/>. |
2911 | <param name="stream">Network/SSL stream.</param> | 3053 | </remarks> |
2912 | <returns>A context.</returns> | 3054 | <seealso cref="T:HttpServer.HttpHelper"/> |
2913 | </member> | 3055 | </member> |
2914 | <member name="M:HttpServer.HttpContextFactory.CreateNewContext(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,System.Net.Sockets.Socket)"> | 3056 | <member name="P:HttpServer.HttpRequest.Method"> |
2915 | <summary> | 3057 | <summary> |
2916 | Create a new context. | 3058 | Gets or sets requested method. |
2917 | </summary> | 3059 | </summary> |
2918 | <param name="isSecured">true if HTTPS is used.</param> | 3060 | <value></value> |
2919 | <param name="endPoint">Remote client</param> | 3061 | <remarks> |
2920 | <param name="stream">Network stream, <see cref="T:HttpServer.HttpClientContext"/> uses <see cref="T:HttpServer.ReusableSocketNetworkStream"/>.</param> | 3062 | Will always be in upper case. |
2921 | <returns>A new context (always).</returns> | 3063 | </remarks> |
3064 | <see cref="!:HttpServer.Method"/> | ||
2922 | </member> | 3065 | </member> |
2923 | <member name="M:HttpServer.HttpContextFactory.CreateSecureContext(System.Net.Sockets.Socket,System.Security.Cryptography.X509Certificates.X509Certificate,System.Security.Authentication.SslProtocols)"> | 3066 | <member name="P:HttpServer.HttpRequest.QueryString"> |
2924 | <summary> | 3067 | <summary> |
2925 | Create a secure <see cref="T:HttpServer.IHttpClientContext"/>. | 3068 | Gets variables sent in the query string |
2926 | </summary> | 3069 | </summary> |
2927 | <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param> | ||
2928 | <param name="certificate">HTTPS certificate to use.</param> | ||
2929 | <param name="protocol">Kind of HTTPS protocol. Usually TLS or SSL.</param> | ||
2930 | <returns> | ||
2931 | A created <see cref="T:HttpServer.IHttpClientContext"/>. | ||
2932 | </returns> | ||
2933 | </member> | 3070 | </member> |
2934 | <member name="M:HttpServer.HttpContextFactory.CreateContext(System.Net.Sockets.Socket)"> | 3071 | <member name="P:HttpServer.HttpRequest.Uri"> |
2935 | <summary> | 3072 | <summary> |
2936 | Creates a <see cref="T:HttpServer.IHttpClientContext"/> that handles a connected client. | 3073 | Gets or sets requested URI. |
2937 | </summary> | 3074 | </summary> |
2938 | <param name="socket">Client socket (accepted by the <see cref="T:HttpServer.HttpListener"/>).</param> | ||
2939 | <returns> | ||
2940 | A creates <see cref="T:HttpServer.IHttpClientContext"/>. | ||
2941 | </returns> | ||
2942 | </member> | 3075 | </member> |
2943 | <member name="M:HttpServer.HttpContextFactory.Shutdown"> | 3076 | <member name="P:HttpServer.HttpRequest.UriParts"> |
2944 | <summary> | 3077 | <summary> |
2945 | Server is shutting down so shut down the factory | 3078 | Uri absolute path splitted into parts. |
2946 | </summary> | 3079 | </summary> |
3080 | <example> | ||
3081 | // uri is: http://gauffin.com/code/tiny/ | ||
3082 | Console.WriteLine(request.UriParts[0]); // result: code | ||
3083 | Console.WriteLine(request.UriParts[1]); // result: tiny | ||
3084 | </example> | ||
3085 | <remarks> | ||
3086 | If you're using controllers than the first part is controller name, | ||
3087 | the second part is method name and the third part is Id property. | ||
3088 | </remarks> | ||
3089 | <seealso cref="P:HttpServer.HttpRequest.Uri"/> | ||
2947 | </member> | 3090 | </member> |
2948 | <member name="P:HttpServer.HttpContextFactory.UseTraceLogs"> | 3091 | <member name="P:HttpServer.HttpRequest.Param"> |
2949 | <summary> | 3092 | <summary> |
2950 | True if detailed trace logs should be written. | 3093 | Gets parameter from <see cref="P:HttpServer.HttpRequest.QueryString"/> or <see cref="P:HttpServer.HttpRequest.Form"/>. |
2951 | </summary> | 3094 | </summary> |
2952 | </member> | 3095 | </member> |
2953 | <member name="E:HttpServer.HttpContextFactory.RequestReceived"> | 3096 | <member name="P:HttpServer.HttpRequest.Form"> |
2954 | <summary> | 3097 | <summary> |
2955 | A request have been received from one of the contexts. | 3098 | Gets form parameters. |
2956 | </summary> | 3099 | </summary> |
2957 | </member> | 3100 | </member> |
2958 | <member name="T:HttpServer.ReusableSocketNetworkStream"> | 3101 | <member name="P:HttpServer.HttpRequest.IsAjax"> |
2959 | <summary> | 3102 | <summary> |
2960 | Custom network stream to mark sockets as reusable when disposing the stream. | 3103 | Gets whether the request was made by Ajax (Asynchronous JavaScript) |
2961 | </summary> | 3104 | </summary> |
2962 | </member> | 3105 | </member> |
2963 | <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket)"> | 3106 | <member name="P:HttpServer.HttpRequest.Cookies"> |
2964 | <summary> | 3107 | <summary> |
2965 | Creates a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" />. | 3108 | Gets cookies that was sent with the request. |
2966 | </summary> | 3109 | </summary> |
2967 | <param name="socket"> | ||
2968 | The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data. | ||
2969 | </param> | ||
2970 | <exception cref="T:System.ArgumentNullException"> | ||
2971 | The <paramref name="socket" /> parameter is null. | ||
2972 | </exception> | ||
2973 | <exception cref="T:System.IO.IOException"> | ||
2974 | The <paramref name="socket" /> parameter is not connected. | ||
2975 | -or- | ||
2976 | The <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />. | ||
2977 | -or- | ||
2978 | The <paramref name="socket" /> parameter is in a nonblocking state. | ||
2979 | </exception> | ||
2980 | </member> | 3110 | </member> |
2981 | <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket,System.Boolean)"> | 3111 | <member name="M:HttpServer.HttpRequest.Clone"> |
2982 | <summary> | 3112 | <summary> |
2983 | Initializes a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" /> with the specified <see cref="T:System.Net.Sockets.Socket" /> ownership. | 3113 | Creates a new object that is a copy of the current instance. |
2984 | </summary> | 3114 | </summary> |
2985 | <param name="socket"> | 3115 | |
2986 | The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data. | 3116 | <returns> |
2987 | </param> | 3117 | A new object that is a copy of this instance. |
2988 | <param name="ownsSocket"> | 3118 | </returns> |
2989 | Set to true to indicate that the <see cref="T:System.Net.Sockets.NetworkStream" /> will take ownership of the <see cref="T:System.Net.Sockets.Socket" />; otherwise, false. | 3119 | <filterpriority>2</filterpriority> |
2990 | </param> | ||
2991 | <exception cref="T:System.ArgumentNullException"> | ||
2992 | The <paramref name="socket" /> parameter is null. | ||
2993 | </exception> | ||
2994 | <exception cref="T:System.IO.IOException"> | ||
2995 | The <paramref name="socket" /> parameter is not connected. | ||
2996 | -or- | ||
2997 | the value of the <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />. | ||
2998 | -or- | ||
2999 | the <paramref name="socket" /> parameter is in a nonblocking state. | ||
3000 | </exception> | ||
3001 | </member> | 3120 | </member> |
3002 | <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket,System.IO.FileAccess)"> | 3121 | <member name="M:HttpServer.HttpRequest.DecodeBody(HttpServer.FormDecoders.FormDecoderProvider)"> |
3003 | <summary> | 3122 | <summary> |
3004 | Creates a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" /> with the specified access rights. | 3123 | Decode body into a form. |
3005 | </summary> | 3124 | </summary> |
3006 | <param name="socket"> | 3125 | <param name="providers">A list with form decoders.</param> |
3007 | The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data. | 3126 | <exception cref="T:System.IO.InvalidDataException">If body contents is not valid for the chosen decoder.</exception> |
3008 | </param> | 3127 | <exception cref="T:System.InvalidOperationException">If body is still being transferred.</exception> |
3009 | <param name="access"> | ||
3010 | A bitwise combination of the <see cref="T:System.IO.FileAccess" /> values that specify the type of access given to the <see cref="T:System.Net.Sockets.NetworkStream" /> over the provided <see cref="T:System.Net.Sockets.Socket" />. | ||
3011 | </param> | ||
3012 | <exception cref="T:System.ArgumentNullException"> | ||
3013 | The <paramref name="socket" /> parameter is null. | ||
3014 | </exception> | ||
3015 | <exception cref="T:System.IO.IOException"> | ||
3016 | The <paramref name="socket" /> parameter is not connected. | ||
3017 | -or- | ||
3018 | the <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />. | ||
3019 | -or- | ||
3020 | the <paramref name="socket" /> parameter is in a nonblocking state. | ||
3021 | </exception> | ||
3022 | </member> | 3128 | </member> |
3023 | <member name="M:HttpServer.ReusableSocketNetworkStream.#ctor(System.Net.Sockets.Socket,System.IO.FileAccess,System.Boolean)"> | 3129 | <member name="M:HttpServer.HttpRequest.SetCookies(HttpServer.RequestCookies)"> |
3024 | <summary> | 3130 | <summary> |
3025 | Creates a new instance of the <see cref="T:System.Net.Sockets.NetworkStream" /> class for the specified <see cref="T:System.Net.Sockets.Socket" /> with the specified access rights and the specified <see cref="T:System.Net.Sockets.Socket" /> ownership. | 3131 | Cookies |
3026 | </summary> | 3132 | </summary> |
3027 | <param name="socket"> | 3133 | <param name="cookies">the cookies</param> |
3028 | The <see cref="T:System.Net.Sockets.Socket" /> that the <see cref="T:System.Net.Sockets.NetworkStream" /> will use to send and receive data. | ||
3029 | </param> | ||
3030 | <param name="access"> | ||
3031 | A bitwise combination of the <see cref="T:System.IO.FileAccess" /> values that specifies the type of access given to the <see cref="T:System.Net.Sockets.NetworkStream" /> over the provided <see cref="T:System.Net.Sockets.Socket" />. | ||
3032 | </param> | ||
3033 | <param name="ownsSocket"> | ||
3034 | Set to true to indicate that the <see cref="T:System.Net.Sockets.NetworkStream" /> will take ownership of the <see cref="T:System.Net.Sockets.Socket" />; otherwise, false. | ||
3035 | </param> | ||
3036 | <exception cref="T:System.ArgumentNullException"> | ||
3037 | The <paramref name="socket" /> parameter is null. | ||
3038 | </exception> | ||
3039 | <exception cref="T:System.IO.IOException"> | ||
3040 | The <paramref name="socket" /> parameter is not connected. | ||
3041 | -or- | ||
3042 | The <see cref="P:System.Net.Sockets.Socket.SocketType" /> property of the <paramref name="socket" /> parameter is not <see cref="F:System.Net.Sockets.SocketType.Stream" />. | ||
3043 | -or- | ||
3044 | The <paramref name="socket" /> parameter is in a nonblocking state. | ||
3045 | </exception> | ||
3046 | </member> | 3134 | </member> |
3047 | <member name="M:HttpServer.ReusableSocketNetworkStream.Close"> | 3135 | <member name="M:HttpServer.HttpRequest.CreateResponse(HttpServer.IHttpClientContext)"> |
3048 | <summary> | 3136 | <summary> |
3049 | Closes the current stream and releases any resources (such as sockets and file handles) associated with the current stream. | 3137 | Create a response object. |
3050 | </summary> | 3138 | </summary> |
3139 | <returns>A new <see cref="T:HttpServer.IHttpResponse"/>.</returns> | ||
3051 | </member> | 3140 | </member> |
3052 | <member name="M:HttpServer.ReusableSocketNetworkStream.Dispose(System.Boolean)"> | 3141 | <member name="M:HttpServer.HttpRequest.AddHeader(System.String,System.String)"> |
3053 | <summary> | 3142 | <summary> |
3054 | Releases the unmanaged resources used by the <see cref="T:System.Net.Sockets.NetworkStream"/> and optionally releases the managed resources. | 3143 | Called during parsing of a <see cref="T:HttpServer.IHttpRequest"/>. |
3055 | </summary> | 3144 | </summary> |
3056 | <param name="disposing">true to release both managed and unmanaged resources; false to release only unmanaged resources.</param> | 3145 | <param name="name">Name of the header, should not be URL encoded</param> |
3146 | <param name="value">Value of the header, should not be URL encoded</param> | ||
3147 | <exception cref="T:HttpServer.Exceptions.BadRequestException">If a header is incorrect.</exception> | ||
3057 | </member> | 3148 | </member> |
3058 | <member name="T:HttpServer.ClientAcceptedEventArgs"> | 3149 | <member name="M:HttpServer.HttpRequest.AddToBody(System.Byte[],System.Int32,System.Int32)"> |
3059 | <summary> | 3150 | <summary> |
3060 | Invoked when a client have been accepted by the <see cref="T:HttpServer.HttpListener"/> | 3151 | Add bytes to the body |
3152 | </summary> | ||
3153 | <param name="bytes">buffer to read bytes from</param> | ||
3154 | <param name="offset">where to start read</param> | ||
3155 | <param name="length">number of bytes to read</param> | ||
3156 | <returns>Number of bytes actually read (same as length unless we got all body bytes).</returns> | ||
3157 | <exception cref="T:System.InvalidOperationException">If body is not writable</exception> | ||
3158 | <exception cref="T:System.ArgumentNullException"><c>bytes</c> is null.</exception> | ||
3159 | <exception cref="T:System.ArgumentOutOfRangeException"><c>offset</c> is out of range.</exception> | ||
3160 | </member> | ||
3161 | <member name="M:HttpServer.HttpRequest.Clear"> | ||
3162 | <summary> | ||
3163 | Clear everything in the request | ||
3164 | </summary> | ||
3165 | </member> | ||
3166 | <member name="T:HttpServer.HttpResponse"> | ||
3167 | <summary> | ||
3168 | Response that is sent back to the web browser / client. | ||
3061 | </summary> | 3169 | </summary> |
3062 | <remarks> | 3170 | <remarks> |
3063 | Can be used to revoke incoming connections | 3171 | <para> |
3172 | A response can be sent if different ways. The easiest one is | ||
3173 | to just fill the Body stream with content, everything else | ||
3174 | will then be taken care of by the framework. The default content-type | ||
3175 | is text/html, you should change it if you send anything else. | ||
3176 | </para><para> | ||
3177 | The second and slightly more complex way is to send the response | ||
3178 | as parts. Start with sending the header using the SendHeaders method and | ||
3179 | then you can send the body using SendBody method, but do not forget | ||
3180 | to set <see cref="P:HttpServer.HttpResponse.ContentType"/> and <see cref="P:HttpServer.HttpResponse.ContentLength"/> before doing so. | ||
3181 | </para> | ||
3064 | </remarks> | 3182 | </remarks> |
3183 | <example> | ||
3184 | <code> | ||
3185 | // Example using response body. | ||
3186 | class MyModule : HttpModule | ||
3187 | { | ||
3188 | public override bool Process(IHttpRequest request, IHttpResponse response, IHttpSession session) | ||
3189 | { | ||
3190 | StreamWriter writer = new StreamWriter(response.Body); | ||
3191 | writer.WriteLine("Hello dear World!"); | ||
3192 | writer.Flush(); | ||
3193 | |||
3194 | // return true to tell webserver that we've handled the url | ||
3195 | return true; | ||
3196 | } | ||
3197 | } | ||
3198 | </code> | ||
3199 | </example> | ||
3200 | todo: add two examples, using SendHeaders/SendBody and just the Body stream. | ||
3065 | </member> | 3201 | </member> |
3066 | <member name="M:HttpServer.ClientAcceptedEventArgs.#ctor(System.Net.Sockets.Socket)"> | 3202 | <member name="M:HttpServer.HttpResponse.#ctor(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> |
3067 | <summary> | 3203 | <summary> |
3068 | Initializes a new instance of the <see cref="T:HttpServer.ClientAcceptedEventArgs"/> class. | 3204 | Initializes a new instance of the <see cref="T:HttpServer.IHttpResponse"/> class. |
3069 | </summary> | 3205 | </summary> |
3070 | <param name="socket">The socket.</param> | 3206 | <param name="context">Client that send the <see cref="T:HttpServer.IHttpRequest"/>.</param> |
3207 | <param name="request">Contains information of what the client want to receive.</param> | ||
3208 | <exception cref="T:System.ArgumentException"><see cref="P:HttpServer.IHttpRequest.HttpVersion"/> cannot be empty.</exception> | ||
3071 | </member> | 3209 | </member> |
3072 | <member name="M:HttpServer.ClientAcceptedEventArgs.Revoke"> | 3210 | <member name="M:HttpServer.HttpResponse.#ctor(HttpServer.IHttpClientContext,System.String,HttpServer.ConnectionType)"> |
3073 | <summary> | 3211 | <summary> |
3074 | Client may not be handled. | 3212 | Initializes a new instance of the <see cref="T:HttpServer.IHttpResponse"/> class. |
3075 | </summary> | 3213 | </summary> |
3214 | <param name="context">Client that send the <see cref="T:HttpServer.IHttpRequest"/>.</param> | ||
3215 | <param name="httpVersion">Version of HTTP protocol that the client uses.</param> | ||
3216 | <param name="connectionType">Type of HTTP connection used.</param> | ||
3076 | </member> | 3217 | </member> |
3077 | <member name="P:HttpServer.ClientAcceptedEventArgs.Socket"> | 3218 | <member name="P:HttpServer.HttpResponse.Body"> |
3078 | <summary> | 3219 | <summary> |
3079 | Accepted socket. | 3220 | The body stream is used to cache the body contents |
3221 | before sending everything to the client. It's the simplest | ||
3222 | way to serve documents. | ||
3080 | </summary> | 3223 | </summary> |
3081 | </member> | 3224 | </member> |
3082 | <member name="P:HttpServer.ClientAcceptedEventArgs.Revoked"> | 3225 | <member name="P:HttpServer.HttpResponse.Chunked"> |
3083 | <summary> | 3226 | <summary> |
3084 | Client should be revoked. | 3227 | The chunked encoding modifies the body of a message in order to |
3228 | transfer it as a series of chunks, each with its own size indicator, | ||
3229 | followed by an OPTIONAL trailer containing entity-header fields. This | ||
3230 | allows dynamically produced content to be transferred along with the | ||
3231 | information necessary for the recipient to verify that it has | ||
3232 | received the full message. | ||
3085 | </summary> | 3233 | </summary> |
3086 | </member> | 3234 | </member> |
3087 | <member name="T:HttpServer.Sessions.MemorySession"> | 3235 | <member name="P:HttpServer.HttpResponse.ProtocolVersion"> |
3088 | <summary> | 3236 | <summary> |
3089 | A session stored in memory. | 3237 | Defines the version of the HTTP Response for applications where it's required |
3238 | for this to be forced. | ||
3090 | </summary> | 3239 | </summary> |
3091 | </member> | 3240 | </member> |
3092 | <member name="T:HttpServer.Sessions.IHttpSession"> | 3241 | <member name="P:HttpServer.HttpResponse.Connection"> |
3093 | <summary> | 3242 | <summary> |
3094 | Interface for sessions | 3243 | Kind of connection |
3095 | </summary> | 3244 | </summary> |
3096 | </member> | 3245 | </member> |
3097 | <member name="M:HttpServer.Sessions.IHttpSession.Clear"> | 3246 | <member name="P:HttpServer.HttpResponse.Encoding"> |
3098 | <summary> | 3247 | <summary> |
3099 | Remove everything from the session | 3248 | Encoding to use when sending stuff to the client. |
3100 | </summary> | 3249 | </summary> |
3250 | <remarks>Default is UTF8</remarks> | ||
3101 | </member> | 3251 | </member> |
3102 | <member name="M:HttpServer.Sessions.IHttpSession.Clear(System.Boolean)"> | 3252 | <member name="P:HttpServer.HttpResponse.KeepAlive"> |
3103 | <summary> | 3253 | <summary> |
3104 | Remove everything from the session | 3254 | Number of seconds to keep connection alive |
3105 | </summary> | 3255 | </summary> |
3106 | <param name="expires">True if the session is cleared due to expiration</param> | 3256 | <remarks>Only used if Connection property is set to <see cref="F:HttpServer.ConnectionType.KeepAlive"/>.</remarks> |
3107 | </member> | 3257 | </member> |
3108 | <member name="P:HttpServer.Sessions.IHttpSession.Id"> | 3258 | <member name="P:HttpServer.HttpResponse.Status"> |
3109 | <summary> | 3259 | <summary> |
3110 | Session id | 3260 | Status code that is sent to the client. |
3111 | </summary> | 3261 | </summary> |
3262 | <remarks>Default is <see cref="F:System.Net.HttpStatusCode.OK"/></remarks> | ||
3112 | </member> | 3263 | </member> |
3113 | <member name="P:HttpServer.Sessions.IHttpSession.Item(System.String)"> | 3264 | <member name="P:HttpServer.HttpResponse.Reason"> |
3114 | <summary> | 3265 | <summary> |
3115 | Should | 3266 | Information about why a specific status code was used. |
3116 | </summary> | 3267 | </summary> |
3117 | <param name="name">Name of the session variable</param> | ||
3118 | <returns>null if it's not set</returns> | ||
3119 | <exception cref="T:System.Runtime.Serialization.SerializationException">If the object cant be serialized.</exception> | ||
3120 | </member> | 3268 | </member> |
3121 | <member name="P:HttpServer.Sessions.IHttpSession.Accessed"> | 3269 | <member name="P:HttpServer.HttpResponse.ContentLength"> |
3122 | <summary> | 3270 | <summary> |
3123 | When the session was last accessed. | 3271 | Size of the body. MUST be specified before sending the header, |
3124 | This property is touched by the http server each time the | 3272 | unless property Chunked is set to true. |
3125 | session is requested. | ||
3126 | </summary> | 3273 | </summary> |
3127 | </member> | 3274 | </member> |
3128 | <member name="P:HttpServer.Sessions.IHttpSession.Count"> | 3275 | <member name="P:HttpServer.HttpResponse.ContentType"> |
3129 | <summary> | 3276 | <summary> |
3130 | Number of session variables. | 3277 | Kind of content in the body |
3131 | </summary> | 3278 | </summary> |
3279 | <remarks>Default type is "text/html"</remarks> | ||
3132 | </member> | 3280 | </member> |
3133 | <member name="E:HttpServer.Sessions.IHttpSession.BeforeClear"> | 3281 | <member name="P:HttpServer.HttpResponse.HeadersSent"> |
3134 | <summary> | 3282 | <summary> |
3135 | Event triggered upon clearing the session | 3283 | Headers have been sent to the client- |
3136 | </summary> | 3284 | </summary> |
3285 | <remarks>You can not send any additional headers if they have already been sent.</remarks> | ||
3137 | </member> | 3286 | </member> |
3138 | <member name="M:HttpServer.Sessions.MemorySession.#ctor(System.String)"> | 3287 | <member name="P:HttpServer.HttpResponse.Sent"> |
3139 | <summary> | 3288 | <summary> |
3140 | 3289 | The whole response have been sent. | |
3141 | </summary> | 3290 | </summary> |
3142 | <param name="id">A unique id used by the sessions store to identify the session</param> | ||
3143 | </member> | 3291 | </member> |
3144 | <member name="M:HttpServer.Sessions.MemorySession.SetId(System.String)"> | 3292 | <member name="P:HttpServer.HttpResponse.Cookies"> |
3145 | <summary> | 3293 | <summary> |
3146 | Id | 3294 | Cookies that should be created/changed. |
3147 | </summary> | 3295 | </summary> |
3148 | <param name="id"></param> | ||
3149 | </member> | 3296 | </member> |
3150 | <member name="M:HttpServer.Sessions.MemorySession.Clear"> | 3297 | <member name="M:HttpServer.HttpResponse.AddHeader(System.String,System.String)"> |
3151 | <summary> | 3298 | <summary> |
3152 | Remove everything from the session | 3299 | Add another header to the document. |
3153 | </summary> | 3300 | </summary> |
3301 | <param name="name">Name of the header, case sensitive, use lower cases.</param> | ||
3302 | <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> | ||
3303 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
3304 | <exception cref="T:System.ArgumentException">If value conditions have not been met.</exception> | ||
3305 | <remarks>Adding any header will override the default ones and those specified by properties.</remarks> | ||
3154 | </member> | 3306 | </member> |
3155 | <member name="M:HttpServer.Sessions.MemorySession.Clear(System.Boolean)"> | 3307 | <member name="M:HttpServer.HttpResponse.Send"> |
3156 | <summary> | 3308 | <summary> |
3157 | Clears the specified expire. | 3309 | Send headers and body to the browser. |
3158 | </summary> | 3310 | </summary> |
3159 | <param name="expires">True if the session is cleared due to expiration</param> | 3311 | <exception cref="T:System.InvalidOperationException">If content have already been sent.</exception> |
3160 | </member> | 3312 | </member> |
3161 | <member name="M:HttpServer.Sessions.MemorySession.Dispose"> | 3313 | <member name="M:HttpServer.HttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)"> |
3162 | <summary> | 3314 | <summary> |
3163 | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. | 3315 | Make sure that you have specified <see cref="P:HttpServer.HttpResponse.ContentLength"/> and sent the headers first. |
3164 | </summary> | 3316 | </summary> |
3165 | <filterpriority>2</filterpriority> | 3317 | <param name="buffer"></param> |
3318 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | ||
3319 | <see cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
3320 | <param name="offset">offset of first byte to send</param> | ||
3321 | <param name="count">number of bytes to send.</param> | ||
3322 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
3323 | <seealso cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
3324 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
3325 | is recommended for larger files to keep the memory usage low.</remarks> | ||
3166 | </member> | 3326 | </member> |
3167 | <member name="P:HttpServer.Sessions.MemorySession.Id"> | 3327 | <member name="M:HttpServer.HttpResponse.SendBody(System.Byte[])"> |
3168 | <summary> | 3328 | <summary> |
3169 | Session id | 3329 | Make sure that you have specified <see cref="P:HttpServer.HttpResponse.ContentLength"/> and sent the headers first. |
3170 | </summary> | 3330 | </summary> |
3331 | <param name="buffer"></param> | ||
3332 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | ||
3333 | <see cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
3334 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
3335 | <seealso cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
3336 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
3337 | is recommended for larger files to keep the memory usage low.</remarks> | ||
3171 | </member> | 3338 | </member> |
3172 | <member name="P:HttpServer.Sessions.MemorySession.Item(System.String)"> | 3339 | <member name="M:HttpServer.HttpResponse.SendHeaders"> |
3173 | <summary> | 3340 | <summary> |
3174 | Should | 3341 | Send headers to the client. |
3175 | </summary> | 3342 | </summary> |
3176 | <param name="name">Name of the session variable</param> | 3343 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> |
3177 | <returns>null if it's not set</returns> | 3344 | <seealso cref="M:HttpServer.HttpResponse.AddHeader(System.String,System.String)"/> |
3345 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
3346 | <seealso cref="M:HttpServer.HttpResponse.SendBody(System.Byte[])"/> | ||
3178 | </member> | 3347 | </member> |
3179 | <member name="P:HttpServer.Sessions.MemorySession.Accessed"> | 3348 | <member name="M:HttpServer.HttpResponse.Redirect(System.Uri)"> |
3180 | <summary> | 3349 | <summary> |
3181 | when the session was last accessed. | 3350 | Redirect client to somewhere else using the 302 status code. |
3351 | </summary> | ||
3352 | <param name="uri">Destination of the redirect</param> | ||
3353 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
3354 | <remarks>You can not do anything more with the request when a redirect have been done. This should be your last | ||
3355 | action.</remarks> | ||
3356 | </member> | ||
3357 | <member name="M:HttpServer.HttpResponse.Redirect(System.String)"> | ||
3358 | <summary> | ||
3359 | redirect to somewhere | ||
3182 | </summary> | 3360 | </summary> |
3361 | <param name="url">where the redirect should go</param> | ||
3183 | <remarks> | 3362 | <remarks> |
3184 | Used to determine when the session should be removed. | 3363 | No body are allowed when doing redirects. |
3185 | </remarks> | 3364 | </remarks> |
3186 | </member> | 3365 | </member> |
3187 | <member name="P:HttpServer.Sessions.MemorySession.Count"> | 3366 | <member name="T:HttpServer.RealmHandler"> |
3188 | <summary> | 3367 | <summary> |
3189 | Number of values in the session | 3368 | Delegate used to find a realm/domain. |
3190 | </summary> | 3369 | </summary> |
3370 | <param name="domain"></param> | ||
3371 | <returns></returns> | ||
3372 | <remarks> | ||
3373 | Realms are used during HTTP Authentication | ||
3374 | </remarks> | ||
3375 | <seealso cref="T:HttpServer.Authentication.AuthenticationModule"/> | ||
3376 | <seealso cref="T:HttpServer.Authentication.AuthenticationHandler"/> | ||
3191 | </member> | 3377 | </member> |
3192 | <member name="P:HttpServer.Sessions.MemorySession.Changed"> | 3378 | <member name="T:HttpServer.HttpServer"> |
3193 | <summary> | 3379 | <summary> |
3194 | Flag to indicate that the session have been changed | 3380 | A complete HTTP server, you need to add a module to it to be able to handle incoming requests. |
3195 | and should be saved into the session store. | ||
3196 | </summary> | 3381 | </summary> |
3382 | <example> | ||
3383 | <code> | ||
3384 | // this small example will add two web site modules, thus handling | ||
3385 | // two different sites. In reality you should add Controller modules or something | ||
3386 | // two the website modules to be able to handle different requests. | ||
3387 | HttpServer server = new HttpServer(); | ||
3388 | server.Add(new WebSiteModule("www.gauffin.com", "Gauffin Telecom AB")); | ||
3389 | server.Add(new WebSiteModule("www.vapadi.se", "Remote PBX")); | ||
3390 | |||
3391 | // start regular http | ||
3392 | server.Start(IPAddress.Any, 80); | ||
3393 | |||
3394 | // start https | ||
3395 | server.Start(IPAddress.Any, 443, myCertificate); | ||
3396 | </code> | ||
3397 | </example> | ||
3398 | <seealso cref="T:HttpServer.HttpModules.HttpModule"/> | ||
3399 | <seealso cref="T:HttpServer.HttpModules.FileModule"/> | ||
3400 | <seealso cref="T:HttpServer.HttpListener"/> | ||
3197 | </member> | 3401 | </member> |
3198 | <member name="E:HttpServer.Sessions.MemorySession.BeforeClear"> | 3402 | <member name="P:HttpServer.HttpServer.Current"> |
3199 | <summary> | 3403 | <summary> |
3200 | Event triggered upon clearing the session | 3404 | Server that is handling the current request. |
3201 | </summary> | 3405 | </summary> |
3406 | <remarks> | ||
3407 | Will be set as soon as a request arrives to the <see cref="T:HttpServer.HttpServer"/> object. | ||
3408 | </remarks> | ||
3202 | </member> | 3409 | </member> |
3203 | <member name="T:HttpServer.HttpModules.ReverseProxyModule"> | 3410 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.IComponentProvider)"> |
3204 | <summary> | 3411 | <summary> |
3205 | A reverse proxy are used to act as a bridge between local (protected/hidden) websites | 3412 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
3206 | and public clients. | ||
3207 | |||
3208 | A typical usage is to allow web servers on non standard ports to still be available | ||
3209 | to the public clients, or allow web servers on private ips to be available. | ||
3210 | </summary> | 3413 | </summary> |
3414 | <param name="provider">Used to get all components used in the server..</param> | ||
3211 | </member> | 3415 | </member> |
3212 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.#ctor(System.String,System.String)"> | 3416 | <member name="M:HttpServer.HttpServer.#ctor"> |
3213 | <summary> | 3417 | <summary> |
3214 | 3418 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | |
3215 | </summary> | 3419 | </summary> |
3216 | <param name="source">Base url requested from browser</param> | ||
3217 | <param name="destination">Base url on private web server</param> | ||
3218 | <example> | ||
3219 | // this will return contents from http://192.168.1.128/view/jonas when client requests http://www.gauffin.com/user/view/jonas | ||
3220 | _server.Add(new ReverseProxyModule("http://www.gauffin.com/user/", "http://192.168.1.128/"); | ||
3221 | </example> | ||
3222 | </member> | 3420 | </member> |
3223 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.CanHandle(System.Uri)"> | 3421 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider)"> |
3224 | <summary> | 3422 | <summary> |
3225 | Method that determines if an url should be handled or not by the module | 3423 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
3226 | </summary> | 3424 | </summary> |
3227 | <param name="uri">Url requested by the client.</param> | 3425 | <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param> |
3228 | <returns>true if module should handle the url.</returns> | 3426 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> |
3427 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> | ||
3229 | </member> | 3428 | </member> |
3230 | <member name="M:HttpServer.HttpModules.ReverseProxyModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 3429 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.Sessions.IHttpSessionStore)"> |
3231 | <summary> | 3430 | <summary> |
3232 | Method that process the url | 3431 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
3233 | </summary> | 3432 | </summary> |
3234 | <param name="request">Information sent by the browser about the request</param> | 3433 | <param name="sessionStore">A session store is used to save and retrieve sessions</param> |
3235 | <param name="response">Information that is being sent back to the client.</param> | 3434 | <seealso cref="T:HttpServer.Sessions.IHttpSessionStore"/> |
3236 | <param name="session">Session used to </param> | ||
3237 | </member> | 3435 | </member> |
3238 | <member name="T:HttpServer.FormDecoders.UrlDecoder"> | 3436 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.ILogWriter)"> |
3239 | <summary> | 3437 | <summary> |
3240 | Can handle application/x-www-form-urlencoded | 3438 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
3241 | </summary> | 3439 | </summary> |
3440 | <param name="logWriter">The log writer.</param> | ||
3441 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
3242 | </member> | 3442 | </member> |
3243 | <member name="M:HttpServer.FormDecoders.UrlDecoder.Decode(System.IO.Stream,System.String,System.Text.Encoding)"> | 3443 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider,HttpServer.ILogWriter)"> |
3244 | <summary> | 3444 | <summary> |
3445 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. | ||
3245 | </summary> | 3446 | </summary> |
3246 | <param name="stream">Stream containing the content</param> | 3447 | <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param> |
3247 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case</param> | 3448 | <param name="logWriter">The log writer.</param> |
3248 | <param name="encoding">Stream encoding</param> | 3449 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> |
3249 | <returns> | 3450 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> |
3250 | A HTTP form, or null if content could not be parsed. | 3451 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> |
3251 | </returns> | ||
3252 | <exception cref="T:System.IO.InvalidDataException">If contents in the stream is not valid input data.</exception> | ||
3253 | </member> | 3452 | </member> |
3254 | <member name="M:HttpServer.FormDecoders.UrlDecoder.CanParse(System.String)"> | 3453 | <member name="M:HttpServer.HttpServer.#ctor(HttpServer.FormDecoders.FormDecoderProvider,HttpServer.Sessions.IHttpSessionStore,HttpServer.ILogWriter)"> |
3255 | <summary> | 3454 | <summary> |
3256 | Checks if the decoder can handle the mime type | 3455 | Initializes a new instance of the <see cref="T:HttpServer.HttpServer"/> class. |
3257 | </summary> | 3456 | </summary> |
3258 | <param name="contentType">Content type (with any additional info like boundry). Content type is always supplied in lower case.</param> | 3457 | <param name="decoderProvider">Form decoders are used to convert different types of posted data to the <see cref="T:HttpServer.HttpInput"/> object types.</param> |
3259 | <returns>True if the decoder can parse the specified content type</returns> | 3458 | <param name="sessionStore">A session store is used to save and retrieve sessions</param> |
3459 | <param name="logWriter">The log writer.</param> | ||
3460 | <seealso cref="T:HttpServer.FormDecoders.IFormDecoder"/> | ||
3461 | <seealso cref="P:HttpServer.HttpServer.FormDecoderProviders"/> | ||
3462 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
3463 | <seealso cref="T:HttpServer.Sessions.IHttpSessionStore"/> | ||
3260 | </member> | 3464 | </member> |
3261 | <member name="T:HttpServer.FormDecoders.FormDecoderProvider"> | 3465 | <member name="P:HttpServer.HttpServer.AuthenticationModules"> |
3262 | <summary> | 3466 | <summary> |
3263 | This provider is used to let us implement any type of form decoding we want without | 3467 | Modules used for authentication. The module that is is added first is used as |
3264 | having to rewrite anything else in the server. | 3468 | the default authentication module. |
3265 | </summary> | 3469 | </summary> |
3470 | <remarks>Use the corresponding property | ||
3471 | in the <see cref="T:HttpServer.HttpModules.WebSiteModule"/> if you are using multiple websites.</remarks> | ||
3266 | </member> | 3472 | </member> |
3267 | <member name="M:HttpServer.FormDecoders.FormDecoderProvider.Decode(System.String,System.IO.Stream,System.Text.Encoding)"> | 3473 | <member name="P:HttpServer.HttpServer.FormDecoderProviders"> |
3268 | <summary> | 3474 | <summary> |
3269 | 3475 | Form decoder providers are used to decode request body (which normally contains form data). | |
3270 | </summary> | 3476 | </summary> |
3271 | <param name="contentType">Should contain boundary and type, as in: multipart/form-data; boundary=---------------------------230051238959</param> | ||
3272 | <param name="stream">Stream containing form data.</param> | ||
3273 | <param name="encoding">Encoding used when decoding the stream</param> | ||
3274 | <returns><see cref="F:HttpServer.HttpInput.Empty"/> if no parser was found.</returns> | ||
3275 | <exception cref="T:System.ArgumentException">If stream is null or not readable.</exception> | ||
3276 | <exception cref="T:System.IO.InvalidDataException">If stream contents cannot be decoded properly.</exception> | ||
3277 | </member> | 3477 | </member> |
3278 | <member name="M:HttpServer.FormDecoders.FormDecoderProvider.Add(HttpServer.FormDecoders.IFormDecoder)"> | 3478 | <member name="P:HttpServer.HttpServer.ServerName"> |
3279 | <summary> | 3479 | <summary> |
3280 | Add a decoder. | 3480 | Server name sent in HTTP responses. |
3281 | </summary> | 3481 | </summary> |
3282 | <param name="decoder"></param> | 3482 | <remarks> |
3283 | <exception cref="T:System.ArgumentNullException"></exception> | 3483 | Do NOT include version in name, since it makes it |
3484 | easier for hackers. | ||
3485 | </remarks> | ||
3284 | </member> | 3486 | </member> |
3285 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.Count"> | 3487 | <member name="P:HttpServer.HttpServer.SessionCookieName"> |
3286 | <summary> | 3488 | <summary> |
3287 | Number of added decoders. | 3489 | Name of cookie where session id is stored. |
3288 | </summary> | 3490 | </summary> |
3289 | </member> | 3491 | </member> |
3290 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.Decoders"> | 3492 | <member name="P:HttpServer.HttpServer.LogWriter"> |
3291 | <summary> | 3493 | <summary> |
3292 | Use with care. | 3494 | Specified where logging should go. |
3293 | </summary> | 3495 | </summary> |
3496 | <seealso cref="T:HttpServer.NullLogWriter"/> | ||
3497 | <seealso cref="T:HttpServer.ConsoleLogWriter"/> | ||
3498 | <seealso cref="P:HttpServer.HttpServer.LogWriter"/> | ||
3294 | </member> | 3499 | </member> |
3295 | <member name="P:HttpServer.FormDecoders.FormDecoderProvider.DefaultDecoder"> | 3500 | <member name="P:HttpServer.HttpServer.BackLog"> |
3296 | <summary> | 3501 | <summary> |
3297 | Decoder used for unknown content types. | 3502 | Number of connections that can wait to be accepted by the server. |
3298 | </summary> | 3503 | </summary> |
3504 | <remarks>Default is 10.</remarks> | ||
3299 | </member> | 3505 | </member> |
3300 | <member name="T:HttpServer.Exceptions.InternalServerException"> | 3506 | <member name="P:HttpServer.HttpServer.MaxRequestCount"> |
3301 | <summary> | 3507 | <summary> |
3302 | The server encountered an unexpected condition which prevented it from fulfilling the request. | 3508 | Gets or sets maximum number of allowed simultaneous requests. |
3303 | </summary> | 3509 | </summary> |
3510 | <remarks> | ||
3511 | <para> | ||
3512 | This property is useful in busy systems. The HTTP server | ||
3513 | will start queuing new requests if this limit is hit, instead | ||
3514 | of trying to process all incoming requests directly. | ||
3515 | </para> | ||
3516 | <para> | ||
3517 | The default number if allowed simultaneous requests are 10. | ||
3518 | </para> | ||
3519 | </remarks> | ||
3304 | </member> | 3520 | </member> |
3305 | <member name="M:HttpServer.Exceptions.InternalServerException.#ctor"> | 3521 | <member name="P:HttpServer.HttpServer.MaxQueueSize"> |
3306 | <summary> | 3522 | <summary> |
3307 | Initializes a new instance of the <see cref="T:HttpServer.Exceptions.InternalServerException"/> class. | 3523 | Gets or sets maximum number of requests queuing to be handled. |
3308 | </summary> | 3524 | </summary> |
3525 | <remarks> | ||
3526 | <para> | ||
3527 | The WebServer will start turning requests away if response code | ||
3528 | <see cref="F:System.Net.HttpStatusCode.ServiceUnavailable"/> to indicate that the server | ||
3529 | is too busy to be able to handle the request. | ||
3530 | </para> | ||
3531 | </remarks> | ||
3309 | </member> | 3532 | </member> |
3310 | <member name="M:HttpServer.Exceptions.InternalServerException.#ctor(System.String)"> | 3533 | <member name="M:HttpServer.HttpServer.Add(HttpServer.Rules.IRule)"> |
3311 | <summary> | 3534 | <summary> |
3312 | Initializes a new instance of the <see cref="T:HttpServer.Exceptions.InternalServerException"/> class. | 3535 | Adds the specified rule. |
3313 | </summary> | 3536 | </summary> |
3314 | <param name="message">error message.</param> | 3537 | <param name="rule">The rule.</param> |
3315 | </member> | 3538 | </member> |
3316 | <member name="M:HttpServer.Exceptions.InternalServerException.#ctor(System.String,System.Exception)"> | 3539 | <member name="M:HttpServer.HttpServer.Add(HttpServer.HttpModules.HttpModule)"> |
3317 | <summary> | 3540 | <summary> |
3318 | Initializes a new instance of the <see cref="T:HttpServer.Exceptions.InternalServerException"/> class. | 3541 | Add a <see cref="T:HttpServer.HttpModules.HttpModule"/> to the server. |
3319 | </summary> | 3542 | </summary> |
3320 | <param name="message">error message.</param> | 3543 | <param name="module">mode to add</param> |
3321 | <param name="inner">inner exception.</param> | ||
3322 | </member> | 3544 | </member> |
3323 | <member name="T:HttpServer.IHttpResponse"> | 3545 | <member name="M:HttpServer.HttpServer.DecodeBody(HttpServer.IHttpRequest)"> |
3324 | <summary> | 3546 | <summary> |
3325 | Response that is sent back to the web browser / client. | 3547 | Decodes the request body. |
3326 | |||
3327 | A response can be sent if different ways. The easiest one is | ||
3328 | to just fill the Body stream with content, everything else | ||
3329 | will then be taken care of by the framework. The default content-type | ||
3330 | is text/html, you should change it if you send anything else. | ||
3331 | |||
3332 | The second and slighty more complex way is to send the response | ||
3333 | as parts. Start with sending the header using the SendHeaders method and | ||
3334 | then you can send the body using SendBody method, but do not forget | ||
3335 | to set ContentType and ContentLength before doing so. | ||
3336 | </summary> | 3548 | </summary> |
3337 | <example> | 3549 | <param name="request">The request.</param> |
3338 | public void MyHandler(IHttpRequest request, IHttpResponse response) | 3550 | <exception cref="T:HttpServer.Exceptions.InternalServerException">Failed to decode form data.</exception> |
3339 | { | ||
3340 | |||
3341 | } | ||
3342 | </example> | ||
3343 | </member> | 3551 | </member> |
3344 | <member name="M:HttpServer.IHttpResponse.AddHeader(System.String,System.String)"> | 3552 | <member name="M:HttpServer.HttpServer.ErrorPage(HttpServer.IHttpResponse,System.Net.HttpStatusCode,System.String)"> |
3345 | <summary> | 3553 | <summary> |
3346 | Add another header to the document. | 3554 | Generate a HTTP error page (that will be added to the response body). |
3555 | response status code is also set. | ||
3347 | </summary> | 3556 | </summary> |
3348 | <param name="name">Name of the header, case sensitive, use lower cases.</param> | 3557 | <param name="response">Response that the page will be generated in.</param> |
3349 | <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> | 3558 | <param name="error"><see cref="T:System.Net.HttpStatusCode"/>.</param> |
3350 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | 3559 | <param name="body">response body contents.</param> |
3351 | <exception cref="T:System.ArgumentException">If value conditions have not been met.</exception> | ||
3352 | <remarks>Adding any header will override the default ones and those specified by properties.</remarks> | ||
3353 | </member> | 3560 | </member> |
3354 | <member name="M:HttpServer.IHttpResponse.Send"> | 3561 | <member name="M:HttpServer.HttpServer.ErrorPage(HttpServer.IHttpResponse,HttpServer.Exceptions.HttpException)"> |
3355 | <summary> | 3562 | <summary> |
3356 | Send headers and body to the browser. | 3563 | Generate a HTTP error page (that will be added to the response body). |
3564 | response status code is also set. | ||
3357 | </summary> | 3565 | </summary> |
3358 | <exception cref="T:System.InvalidOperationException">If content have already been sent.</exception> | 3566 | <param name="response">Response that the page will be generated in.</param> |
3567 | <param name="err">exception.</param> | ||
3359 | </member> | 3568 | </member> |
3360 | <member name="M:HttpServer.IHttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)"> | 3569 | <member name="M:HttpServer.HttpServer.GetRealm(HttpServer.IHttpRequest)"> |
3361 | <summary> | 3570 | <summary> |
3362 | Make sure that you have specified ContentLength and sent the headers first. | 3571 | Realms are used by the <see cref="T:HttpServer.Authentication.AuthenticationModule"/>s. |
3363 | </summary> | 3572 | </summary> |
3364 | <param name="buffer"></param> | 3573 | <param name="request">HTTP request</param> |
3365 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | 3574 | <returns>domain/realm.</returns> |
3366 | <see cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
3367 | <param name="offset">offest of first byte to send</param> | ||
3368 | <param name="count">number of bytes to send.</param> | ||
3369 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | ||
3370 | <seealso cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
3371 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
3372 | is recommended for larger files to keep the memory usage low.</remarks> | ||
3373 | </member> | 3575 | </member> |
3374 | <member name="M:HttpServer.IHttpResponse.SendBody(System.Byte[])"> | 3576 | <member name="M:HttpServer.HttpServer.HandleRequest(HttpServer.IHttpClientContext,HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
3375 | <summary> | 3577 | <summary> |
3376 | Make sure that you have specified ContentLength and sent the headers first. | 3578 | Process an incoming request. |
3377 | </summary> | 3579 | </summary> |
3378 | <param name="buffer"></param> | 3580 | <param name="context">connection to client</param> |
3379 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | 3581 | <param name="request">request information</param> |
3380 | <see cref="M:HttpServer.IHttpResponse.SendHeaders"/> | 3582 | <param name="response">response that should be filled</param> |
3381 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | 3583 | <param name="session">session information</param> |
3382 | <seealso cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
3383 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
3384 | is recommended for larger files to keep the memory usage low.</remarks> | ||
3385 | </member> | 3584 | </member> |
3386 | <member name="M:HttpServer.IHttpResponse.SendHeaders"> | 3585 | <member name="M:HttpServer.HttpServer.OnClientDisconnected(HttpServer.IHttpClientContext,System.Net.Sockets.SocketError)"> |
3387 | <summary> | 3586 | <summary> |
3388 | Send headers to the client. | 3587 | Can be overloaded to implement stuff when a client have been connected. |
3389 | </summary> | 3588 | </summary> |
3390 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | 3589 | <remarks> |
3391 | <seealso cref="M:HttpServer.IHttpResponse.AddHeader(System.String,System.String)"/> | 3590 | Default implementation does nothing. |
3392 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | 3591 | </remarks> |
3393 | <seealso cref="M:HttpServer.IHttpResponse.SendBody(System.Byte[])"/> | 3592 | <param name="client">client that disconnected</param> |
3593 | <param name="error">disconnect reason</param> | ||
3394 | </member> | 3594 | </member> |
3395 | <member name="M:HttpServer.IHttpResponse.Redirect(System.Uri)"> | 3595 | <member name="M:HttpServer.HttpServer.ProcessAuthentication(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> |
3396 | <summary> | 3596 | <summary> |
3397 | Redirect client to somewhere else using the 302 status code. | 3597 | Handle authentication |
3398 | </summary> | 3598 | </summary> |
3399 | <param name="uri">Destination of the redirect</param> | 3599 | <param name="request"></param> |
3400 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | 3600 | <param name="response"></param> |
3401 | <remarks>You can not do anything more with the request when a redirect have been done. This should be your last | 3601 | <param name="session"></param> |
3402 | action.</remarks> | 3602 | <returns>true if request can be handled; false if not.</returns> |
3603 | <exception cref="T:HttpServer.Exceptions.BadRequestException">Invalid authorization header</exception> | ||
3403 | </member> | 3604 | </member> |
3404 | <member name="M:HttpServer.IHttpResponse.Redirect(System.String)"> | 3605 | <member name="M:HttpServer.HttpServer.RequestAuthentication(HttpServer.Authentication.AuthenticationModule,HttpServer.IHttpRequest,HttpServer.IHttpResponse)"> |
3405 | <summary> | 3606 | <summary> |
3406 | redirect to somewhere | 3607 | Will request authentication. |
3407 | </summary> | 3608 | </summary> |
3408 | <param name="url">where the redirect should go</param> | ||
3409 | <remarks> | 3609 | <remarks> |
3410 | No body are allowed when doing redirects. | 3610 | Sends respond to client, nothing else can be done with the response after this. |
3411 | </remarks> | 3611 | </remarks> |
3612 | <param name="mod"></param> | ||
3613 | <param name="request"></param> | ||
3614 | <param name="response"></param> | ||
3412 | </member> | 3615 | </member> |
3413 | <member name="P:HttpServer.IHttpResponse.Body"> | 3616 | <member name="M:HttpServer.HttpServer.OnRequest(System.Object,HttpServer.RequestEventArgs)"> |
3414 | <summary> | 3617 | <summary> |
3415 | The body stream is used to cache the body contents | 3618 | Received from a <see cref="T:HttpServer.IHttpClientContext"/> when a request have been parsed successfully. |
3416 | before sending everything to the client. It's the simplest | ||
3417 | way to serve documents. | ||
3418 | </summary> | 3619 | </summary> |
3620 | <param name="source"><see cref="T:HttpServer.IHttpClientContext"/> that received the request.</param> | ||
3621 | <param name="args">The request.</param> | ||
3419 | </member> | 3622 | </member> |
3420 | <member name="P:HttpServer.IHttpResponse.ProtocolVersion"> | 3623 | <member name="M:HttpServer.HttpServer.ProcessRequestWrapper(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> |
3421 | <summary> | 3624 | <summary> |
3422 | Defines the version of the HTTP Response for applications where it's required | 3625 | To be able to track request count. |
3423 | for this to be forced. | ||
3424 | </summary> | 3626 | </summary> |
3627 | <param name="context"></param> | ||
3628 | <param name="request"></param> | ||
3425 | </member> | 3629 | </member> |
3426 | <member name="P:HttpServer.IHttpResponse.Chunked"> | 3630 | <member name="M:HttpServer.HttpServer.Start(System.Net.IPAddress,System.Int32)"> |
3427 | <summary> | 3631 | <summary> |
3428 | The chunked encoding modifies the body of a message in order to | 3632 | Start the web server using regular HTTP. |
3429 | transfer it as a series of chunks, each with its own size indicator, | ||
3430 | followed by an OPTIONAL trailer containing entity-header fields. This | ||
3431 | allows dynamically produced content to be transferred along with the | ||
3432 | information necessary for the recipient to verify that it has | ||
3433 | received the full message. | ||
3434 | </summary> | 3633 | </summary> |
3634 | <param name="address">IP Address to listen on, use <c>IpAddress.Any </c>to accept connections on all IP addresses/network cards.</param> | ||
3635 | <param name="port">Port to listen on. 80 can be a good idea =)</param> | ||
3636 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | ||
3637 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | ||
3435 | </member> | 3638 | </member> |
3436 | <member name="P:HttpServer.IHttpResponse.Connection"> | 3639 | <member name="M:HttpServer.HttpServer.Start(System.Net.IPAddress,System.Int32,System.Security.Cryptography.X509Certificates.X509Certificate)"> |
3437 | <summary> | 3640 | <summary> |
3438 | Kind of connection | 3641 | Accept secure connections. |
3642 | </summary> | ||
3643 | <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> | ||
3644 | <param name="port">Port to listen on. 80 can be a good idea =)</param> | ||
3645 | <param name="certificate">Certificate to use</param> | ||
3646 | <exception cref="T:System.ArgumentNullException"><c>address</c> is null.</exception> | ||
3647 | <exception cref="T:System.ArgumentException">Port must be a positive number.</exception> | ||
3648 | </member> | ||
3649 | <member name="M:HttpServer.HttpServer.Stop"> | ||
3650 | <summary> | ||
3651 | shut down the server and listeners | ||
3439 | </summary> | 3652 | </summary> |
3440 | </member> | 3653 | </member> |
3441 | <member name="P:HttpServer.IHttpResponse.Encoding"> | 3654 | <member name="M:HttpServer.HttpServer.WriteLog(HttpServer.LogPrio,System.String)"> |
3442 | <summary> | 3655 | <summary> |
3443 | Encoding to use when sending stuff to the client. | 3656 | write an entry to the log file |
3444 | </summary> | 3657 | </summary> |
3445 | <remarks>Default is UTF8</remarks> | 3658 | <param name="prio">importance of the message</param> |
3659 | <param name="message">log message</param> | ||
3446 | </member> | 3660 | </member> |
3447 | <member name="P:HttpServer.IHttpResponse.KeepAlive"> | 3661 | <member name="M:HttpServer.HttpServer.WriteLog(System.Object,HttpServer.LogPrio,System.String)"> |
3448 | <summary> | 3662 | <summary> |
3449 | Number of seconds to keep connection alive | 3663 | write an entry to the log file |
3450 | </summary> | 3664 | </summary> |
3451 | <remarks>Only used if Connection property is set to ConnectionType.KeepAlive</remarks> | 3665 | <param name="source">object that wrote the message</param> |
3666 | <param name="prio">importance of the message</param> | ||
3667 | <param name="message">log message</param> | ||
3452 | </member> | 3668 | </member> |
3453 | <member name="P:HttpServer.IHttpResponse.Status"> | 3669 | <member name="E:HttpServer.HttpServer.RealmWanted"> |
3454 | <summary> | 3670 | <summary> |
3455 | Status code that is sent to the client. | 3671 | Realms are used during HTTP authentication. |
3672 | Default realm is same as server name. | ||
3456 | </summary> | 3673 | </summary> |
3457 | <remarks>Default is HttpStatusCode.Ok</remarks> | ||
3458 | </member> | 3674 | </member> |
3459 | <member name="P:HttpServer.IHttpResponse.Reason"> | 3675 | <member name="E:HttpServer.HttpServer.ExceptionThrown"> |
3460 | <summary> | 3676 | <summary> |
3461 | Information about why a specific status code was used. | 3677 | Let's to receive unhandled exceptions from the threads. |
3462 | </summary> | 3678 | </summary> |
3679 | <remarks> | ||
3680 | Exceptions will be thrown during debug mode if this event is not used, | ||
3681 | exceptions will be printed to console and suppressed during release mode. | ||
3682 | </remarks> | ||
3463 | </member> | 3683 | </member> |
3464 | <member name="P:HttpServer.IHttpResponse.ContentLength"> | 3684 | <member name="T:HttpServer.IComponentProvider"> |
3465 | <summary> | 3685 | <summary> |
3466 | Size of the body. MUST be specified before sending the header, | 3686 | Inversion of control interface. |
3467 | unless property Chunked is set to true. | ||
3468 | </summary> | 3687 | </summary> |
3469 | </member> | 3688 | </member> |
3470 | <member name="P:HttpServer.IHttpResponse.ContentType"> | 3689 | <member name="M:HttpServer.IComponentProvider.AddInstance``1(System.Object)"> |
3471 | <summary> | 3690 | <summary> |
3472 | Kind of content in the body | 3691 | Add a component instance |
3473 | </summary> | 3692 | </summary> |
3474 | <remarks>Default is text/html</remarks> | 3693 | <typeparam name="T">Interface type</typeparam> |
3694 | <param name="instance">Instance to add</param> | ||
3475 | </member> | 3695 | </member> |
3476 | <member name="P:HttpServer.IHttpResponse.HeadersSent"> | 3696 | <member name="M:HttpServer.IComponentProvider.Get``1"> |
3477 | <summary> | 3697 | <summary> |
3478 | Headers have been sent to the client- | 3698 | Get a component. |
3479 | </summary> | 3699 | </summary> |
3480 | <remarks>You can not send any additional headers if they have already been sent.</remarks> | 3700 | <typeparam name="T">Interface type</typeparam> |
3701 | <returns>Component if registered, otherwise null.</returns> | ||
3702 | <remarks> | ||
3703 | Component will get created if needed. | ||
3704 | </remarks> | ||
3481 | </member> | 3705 | </member> |
3482 | <member name="P:HttpServer.IHttpResponse.Sent"> | 3706 | <member name="M:HttpServer.IComponentProvider.Contains(System.Type)"> |
3483 | <summary> | 3707 | <summary> |
3484 | The whole response have been sent. | 3708 | Checks if the specified component interface have been added. |
3485 | </summary> | 3709 | </summary> |
3710 | <param name="interfaceType"></param> | ||
3711 | <returns>true if found; otherwise false.</returns> | ||
3486 | </member> | 3712 | </member> |
3487 | <member name="P:HttpServer.IHttpResponse.Cookies"> | 3713 | <member name="M:HttpServer.IComponentProvider.Add``2"> |
3488 | <summary> | 3714 | <summary> |
3489 | Cookies that should be created/changed. | 3715 | Add a component. |
3490 | </summary> | 3716 | </summary> |
3717 | <typeparam name="InterfaceType">Type being requested.</typeparam> | ||
3718 | <typeparam name="InstanceType">Type being created.</typeparam> | ||
3491 | </member> | 3719 | </member> |
3492 | <member name="T:HttpServer.ConnectionType"> | 3720 | <member name="T:HttpServer.IHttpClientContext"> |
3493 | <summary> | 3721 | <summary> |
3494 | Type of HTTP connection | 3722 | Contains a connection to a browser/client. |
3495 | </summary> | 3723 | </summary> |
3496 | </member> | 3724 | </member> |
3497 | <member name="F:HttpServer.ConnectionType.Close"> | 3725 | <member name="P:HttpServer.IHttpClientContext.Secured"> |
3498 | <summary> | 3726 | <summary> |
3499 | Connection is closed after each request-response | 3727 | Using SSL or other encryption method. |
3500 | </summary> | 3728 | </summary> |
3501 | </member> | 3729 | </member> |
3502 | <member name="F:HttpServer.ConnectionType.KeepAlive"> | 3730 | <member name="P:HttpServer.IHttpClientContext.IsSecured"> |
3503 | <summary> | 3731 | <summary> |
3504 | Connection is kept alive for X seconds (unless another request have been made) | 3732 | Using SSL or other encryption method. |
3505 | </summary> | 3733 | </summary> |
3506 | </member> | 3734 | </member> |
3507 | <member name="T:HttpServer.HttpModules.WebSiteModule"> | 3735 | <member name="M:HttpServer.IHttpClientContext.Disconnect(System.Net.Sockets.SocketError)"> |
3508 | <summary> | 3736 | <summary> |
3509 | The website module let's you handle multiple websites in the same server. | 3737 | Disconnect from client |
3510 | It uses the "Host" header to check which site you want. | ||
3511 | </summary> | 3738 | </summary> |
3512 | <remarks>It's recommended that you do not | 3739 | <param name="error">error to report in the <see cref="E:HttpServer.IHttpClientContext.Disconnected"/> event.</param> |
3513 | add any other modules to HttpServer if you are using the website module. Instead, | ||
3514 | add all wanted modules to each website.</remarks> | ||
3515 | </member> | 3740 | </member> |
3516 | <member name="M:HttpServer.HttpModules.WebSiteModule.#ctor(System.String,System.String)"> | 3741 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String,System.String,System.String)"> |
3517 | <summary> | 3742 | <summary> |
3518 | 3743 | Send a response. | |
3519 | </summary> | 3744 | </summary> |
3520 | <param name="host">domain name that should be handled.</param> | 3745 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> |
3521 | <param name="name"></param> | 3746 | <param name="statusCode">HTTP status code</param> |
3747 | <param name="reason">reason for the status code.</param> | ||
3748 | <param name="body">HTML body contents, can be null or empty.</param> | ||
3749 | <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> | ||
3750 | <exception cref="T:System.ArgumentException">If <paramref name="httpVersion"/> is invalid.</exception> | ||
3522 | </member> | 3751 | </member> |
3523 | <member name="M:HttpServer.HttpModules.WebSiteModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 3752 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String)"> |
3524 | <summary> | 3753 | <summary> |
3525 | Method that process the url | 3754 | Send a response. |
3526 | </summary> | 3755 | </summary> |
3527 | <param name="request">Information sent by the browser about the request</param> | 3756 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> |
3528 | <param name="response">Information that is being sent back to the client.</param> | 3757 | <param name="statusCode">HTTP status code</param> |
3529 | <param name="session">Session used to </param> | 3758 | <param name="reason">reason for the status code.</param> |
3530 | </member> | 3759 | </member> |
3531 | <member name="P:HttpServer.HttpModules.WebSiteModule.SiteName"> | 3760 | <member name="M:HttpServer.IHttpClientContext.Respond(System.String)"> |
3532 | <summary> | 3761 | <summary> |
3533 | Name of site. | 3762 | Send a response. |
3534 | </summary> | 3763 | </summary> |
3764 | <exception cref="T:System.ArgumentNullException"></exception> | ||
3535 | </member> | 3765 | </member> |
3536 | <member name="T:HttpServer.HttpModules.HttpModuleExceptionEventArgs"> | 3766 | <member name="M:HttpServer.IHttpClientContext.Send(System.Byte[])"> |
3537 | <summary> | 3767 | <summary> |
3538 | Used to inform http server that | 3768 | send a whole buffer |
3539 | </summary> | 3769 | </summary> |
3770 | <param name="buffer">buffer to send</param> | ||
3771 | <exception cref="T:System.ArgumentNullException"></exception> | ||
3540 | </member> | 3772 | </member> |
3541 | <member name="M:HttpServer.HttpModules.HttpModuleExceptionEventArgs.#ctor(System.Exception)"> | 3773 | <member name="M:HttpServer.IHttpClientContext.Send(System.Byte[],System.Int32,System.Int32)"> |
3542 | <summary> | 3774 | <summary> |
3543 | Eventarguments used when an exception is thrown by a module | 3775 | Send data using the stream |
3544 | </summary> | 3776 | </summary> |
3545 | <param name="e">the exception</param> | 3777 | <param name="buffer">Contains data to send</param> |
3778 | <param name="offset">Start position in buffer</param> | ||
3779 | <param name="size">number of bytes to send</param> | ||
3780 | <exception cref="T:System.ArgumentNullException"></exception> | ||
3781 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> | ||
3546 | </member> | 3782 | </member> |
3547 | <member name="P:HttpServer.HttpModules.HttpModuleExceptionEventArgs.Exception"> | 3783 | <member name="M:HttpServer.IHttpClientContext.Close"> |
3548 | <summary> | 3784 | <summary> |
3549 | Exception thrown in a module | 3785 | Closes the streams and disposes of the unmanaged resources |
3550 | </summary> | 3786 | </summary> |
3551 | </member> | 3787 | </member> |
3552 | <member name="T:HttpServer.HttpInputItem"> | 3788 | <member name="E:HttpServer.IHttpClientContext.Disconnected"> |
3553 | <summary> | 3789 | <summary> |
3554 | represents a HTTP input item. Each item can have multiple sub items, a sub item | 3790 | The context have been disconnected. |
3555 | is made in a HTML form by using square brackets | ||
3556 | </summary> | 3791 | </summary> |
3557 | <example> | ||
3558 | // <input type="text" name="user[FirstName]" value="jonas" /> becomes: | ||
3559 | Console.WriteLine("Value: {0}", form["user"]["FirstName"].Value); | ||
3560 | </example> | ||
3561 | <remarks> | 3792 | <remarks> |
3562 | All names in a form SHOULD be in lowercase. | 3793 | Event can be used to clean up a context, or to reuse it. |
3563 | </remarks> | 3794 | </remarks> |
3564 | </member> | 3795 | </member> |
3565 | <member name="F:HttpServer.HttpInputItem.Empty"> | 3796 | <member name="E:HttpServer.IHttpClientContext.RequestReceived"> |
3566 | <summary> Representation of a non-initialized <see cref="T:HttpServer.HttpInputItem"/>.</summary> | ||
3567 | </member> | ||
3568 | <member name="M:HttpServer.HttpInputItem.#ctor(System.String,System.String)"> | ||
3569 | <summary> | 3797 | <summary> |
3570 | Initializes an input item setting its name/identifier and value | 3798 | A request have been received in the context. |
3571 | </summary> | 3799 | </summary> |
3572 | <param name="name">Parameter name/id</param> | ||
3573 | <param name="value">Parameter value</param> | ||
3574 | </member> | 3800 | </member> |
3575 | <member name="M:HttpServer.HttpInputItem.#ctor(HttpServer.HttpInputItem)"> | 3801 | <member name="T:HttpServer.DisconnectedEventArgs"> |
3576 | <summary>Creates a deep copy of the item specified</summary> | ||
3577 | <param name="item">The item to copy</param> | ||
3578 | <remarks>The function makes a deep copy of quite a lot which can be slow</remarks> | ||
3579 | </member> | ||
3580 | <member name="M:HttpServer.HttpInputItem.Add(System.String)"> | ||
3581 | <summary> | 3802 | <summary> |
3582 | Add another value to this item | 3803 | A <see cref="T:HttpServer.IHttpClientContext"/> have been disconnected. |
3583 | </summary> | 3804 | </summary> |
3584 | <param name="value">Value to add.</param> | ||
3585 | <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception> | ||
3586 | </member> | 3805 | </member> |
3587 | <member name="M:HttpServer.HttpInputItem.Contains(System.String)"> | 3806 | <member name="P:HttpServer.DisconnectedEventArgs.Error"> |
3588 | <summary> | 3807 | <summary> |
3589 | checks if a sub-item exists (and has a value). | 3808 | Gets reason to why client disconnected. |
3590 | </summary> | 3809 | </summary> |
3591 | <param name="name">name in lower case</param> | ||
3592 | <returns>true if the sub-item exists and has a value; otherwise false.</returns> | ||
3593 | </member> | 3810 | </member> |
3594 | <member name="M:HttpServer.HttpInputItem.ToString"> | 3811 | <member name="M:HttpServer.DisconnectedEventArgs.#ctor(System.Net.Sockets.SocketError)"> |
3595 | <summary> Returns a formatted representation of the instance with the values of all contained parameters </summary> | ||
3596 | </member> | ||
3597 | <member name="M:HttpServer.HttpInputItem.ToString(System.String,System.Boolean)"> | ||
3598 | <summary> | 3812 | <summary> |
3599 | Outputs the string in a formatted manner | 3813 | Initializes a new instance of the <see cref="T:HttpServer.DisconnectedEventArgs"/> class. |
3600 | </summary> | 3814 | </summary> |
3601 | <param name="prefix">A prefix to append, used internally</param> | 3815 | <param name="error">Reason to disconnection.</param> |
3602 | <param name="asQuerySting">produce a query string</param> | ||
3603 | </member> | 3816 | </member> |
3604 | <member name="M:HttpServer.HttpInputItem.Add(System.String,System.String)"> | 3817 | <member name="T:HttpServer.RequestEventArgs"> |
3605 | <summary> | 3818 | <summary> |
3606 | Add a sub item. | 3819 | |
3607 | </summary> | 3820 | </summary> |
3608 | <param name="name">Can contain array formatting, the item is then parsed and added in multiple levels</param> | ||
3609 | <param name="value">Value to add.</param> | ||
3610 | <exception cref="T:System.ArgumentNullException">Argument is null.</exception> | ||
3611 | <exception cref="T:System.InvalidOperationException">Cannot add stuff to <see cref="F:HttpServer.HttpInput.Empty"/>.</exception> | ||
3612 | </member> | 3821 | </member> |
3613 | <member name="M:HttpServer.HttpInputItem.System#Collections#Generic#IEnumerable{HttpServer#HttpInputItem}#GetEnumerator"> | 3822 | <member name="P:HttpServer.RequestEventArgs.Request"> |
3614 | <summary> | 3823 | <summary> |
3615 | Returns an enumerator that iterates through the collection. | 3824 | Gets received request. |
3616 | </summary> | 3825 | </summary> |
3617 | |||
3618 | <returns> | ||
3619 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | ||
3620 | </returns> | ||
3621 | <filterpriority>1</filterpriority> | ||
3622 | </member> | 3826 | </member> |
3623 | <member name="M:HttpServer.HttpInputItem.GetEnumerator"> | 3827 | <member name="M:HttpServer.RequestEventArgs.#ctor(HttpServer.IHttpRequest)"> |
3624 | <summary> | 3828 | <summary> |
3625 | Returns an enumerator that iterates through a collection. | 3829 | Initializes a new instance of the <see cref="T:HttpServer.RequestEventArgs"/> class. |
3626 | </summary> | 3830 | </summary> |
3627 | 3831 | <param name="request">The request.</param> | |
3628 | <returns> | ||
3629 | An <see cref="T:System.Collections.IEnumerator"></see> object that can be used to iterate through the collection. | ||
3630 | </returns> | ||
3631 | <filterpriority>2</filterpriority> | ||
3632 | </member> | 3832 | </member> |
3633 | <member name="M:HttpServer.HttpInputItem.ToString(System.String)"> | 3833 | <member name="T:HttpServer.IHttpContextHandler"> |
3634 | <summary> | 3834 | <summary> |
3635 | Outputs the string in a formatted manner | 3835 | Class that receives Requests from a <see cref="T:HttpServer.IHttpClientContext"/>. |
3636 | </summary> | 3836 | </summary> |
3637 | <param name="prefix">A prefix to append, used internally</param> | ||
3638 | <returns></returns> | ||
3639 | </member> | 3837 | </member> |
3640 | <member name="P:HttpServer.HttpInputItem.Count"> | 3838 | <member name="M:HttpServer.IHttpContextHandler.ClientDisconnected(HttpServer.IHttpClientContext,System.Net.Sockets.SocketError)"> |
3641 | <summary> | 3839 | <summary> |
3642 | Number of values | 3840 | Client have been disconnected. |
3643 | </summary> | 3841 | </summary> |
3842 | <param name="client">Client that was disconnected.</param> | ||
3843 | <param name="error">Reason</param> | ||
3844 | <see cref="T:HttpServer.IHttpClientContext"/> | ||
3644 | </member> | 3845 | </member> |
3645 | <member name="P:HttpServer.HttpInputItem.Item(System.String)"> | 3846 | <member name="M:HttpServer.IHttpContextHandler.RequestReceived(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> |
3646 | <summary> | 3847 | <summary> |
3647 | Get a sub item | 3848 | Invoked when a client context have received a new HTTP request |
3648 | </summary> | 3849 | </summary> |
3649 | <param name="name">name in lower case.</param> | 3850 | <param name="client">Client that received the request.</param> |
3650 | <returns><see cref="F:HttpServer.HttpInputItem.Empty"/> if no item was found.</returns> | 3851 | <param name="request">Request that was received.</param> |
3852 | <see cref="T:HttpServer.IHttpClientContext"/> | ||
3651 | </member> | 3853 | </member> |
3652 | <member name="P:HttpServer.HttpInputItem.Name"> | 3854 | <member name="T:HttpServer.IHttpRequest"> |
3653 | <summary> | 3855 | <summary> |
3654 | Name of item (in lower case). | 3856 | Contains server side HTTP request information. |
3655 | </summary> | 3857 | </summary> |
3656 | </member> | 3858 | </member> |
3657 | <member name="P:HttpServer.HttpInputItem.Value"> | 3859 | <member name="P:HttpServer.IHttpRequest.AcceptTypes"> |
3658 | <summary> | 3860 | <summary> |
3659 | Returns the first value, or null if no value exist. | 3861 | Gets kind of types accepted by the client. |
3660 | </summary> | 3862 | </summary> |
3661 | </member> | 3863 | </member> |
3662 | <member name="P:HttpServer.HttpInputItem.LastValue"> | 3864 | <member name="P:HttpServer.IHttpRequest.Body"> |
3663 | <summary> | 3865 | <summary> |
3664 | Returns the last value, or null if no value exist. | 3866 | Gets or sets body stream. |
3665 | </summary> | 3867 | </summary> |
3666 | </member> | 3868 | </member> |
3667 | <member name="P:HttpServer.HttpInputItem.Values"> | 3869 | <member name="P:HttpServer.IHttpRequest.BodyIsComplete"> |
3668 | <summary> | 3870 | <summary> |
3669 | Returns the list with values. | 3871 | Gets whether the body is complete. |
3670 | </summary> | 3872 | </summary> |
3671 | </member> | 3873 | </member> |
3672 | <member name="P:HttpServer.HttpInputItem.HttpServer#IHttpInput#Item(System.String)"> | 3874 | <member name="P:HttpServer.IHttpRequest.Connection"> |
3673 | <summary> | 3875 | <summary> |
3674 | 3876 | Gets or sets kind of connection used for the session. | |
3675 | </summary> | 3877 | </summary> |
3676 | <param name="name">name in lower case</param> | ||
3677 | <returns></returns> | ||
3678 | </member> | 3878 | </member> |
3679 | <member name="T:HttpServer.Helpers.ResourceManager"> | 3879 | <member name="P:HttpServer.IHttpRequest.ContentLength"> |
3680 | <summary>Class to handle loading of resource files</summary> | 3880 | <summary> |
3881 | Gets or sets number of bytes in the body. | ||
3882 | </summary> | ||
3681 | </member> | 3883 | </member> |
3682 | <member name="M:HttpServer.Helpers.ResourceManager.#ctor"> | 3884 | <member name="P:HttpServer.IHttpRequest.Cookies"> |
3683 | <summary> | 3885 | <summary> |
3684 | Initializes a new instance of the <see cref="T:HttpServer.Helpers.ResourceManager"/> class. | 3886 | Gets cookies that was sent with the request. |
3685 | </summary> | 3887 | </summary> |
3686 | </member> | 3888 | </member> |
3687 | <member name="M:HttpServer.Helpers.ResourceManager.#ctor(HttpServer.ILogWriter)"> | 3889 | <member name="P:HttpServer.IHttpRequest.Form"> |
3688 | <summary> | 3890 | <summary> |
3689 | Initializes a new instance of the <see cref="T:HttpServer.Helpers.ResourceManager"/> class. | 3891 | Gets form parameters. |
3690 | </summary> | 3892 | </summary> |
3691 | <param name="writer">logger.</param> | ||
3692 | </member> | 3893 | </member> |
3693 | <member name="M:HttpServer.Helpers.ResourceManager.LoadResources(System.String,System.Reflection.Assembly,System.String)"> | 3894 | <member name="P:HttpServer.IHttpRequest.Headers"> |
3694 | <summary> | 3895 | <summary> |
3695 | Loads resources from a namespace in the given assembly to an URI | 3896 | Gets headers sent by the client. |
3696 | </summary> | 3897 | </summary> |
3697 | <param name="toUri">The URI to map the resources to</param> | ||
3698 | <param name="fromAssembly">The assembly in which the resources reside</param> | ||
3699 | <param name="fromNamespace">The namespace from which to load the resources</param> | ||
3700 | <usage> | ||
3701 | <code> | ||
3702 | resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views"); | ||
3703 | </code> | ||
3704 | Will make the resource MyLib.Models.User.Views.list.Haml accessible via /user/list.haml or /user/list/ | ||
3705 | </usage> | ||
3706 | <returns>The amount of loaded files, giving you the possibility of making sure the resources needed gets loaded</returns> | ||
3707 | <exception cref="T:System.InvalidOperationException">If a resource has already been mapped to an uri</exception> | ||
3708 | </member> | 3898 | </member> |
3709 | <member name="M:HttpServer.Helpers.ResourceManager.GetResourceStream(System.String)"> | 3899 | <member name="P:HttpServer.IHttpRequest.HttpVersion"> |
3710 | <summary> | 3900 | <summary> |
3711 | Retrieves a stream for the specified resource path if loaded otherwise null | 3901 | Gets or sets version of HTTP protocol that's used. |
3712 | </summary> | 3902 | </summary> |
3713 | <param name="path">Path to the resource to retrieve a stream for</param> | 3903 | <remarks> |
3714 | <returns>A stream or null if the resource couldn't be found</returns> | 3904 | Probably <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/>. |
3905 | </remarks> | ||
3906 | <seealso cref="T:HttpServer.HttpHelper"/> | ||
3715 | </member> | 3907 | </member> |
3716 | <member name="M:HttpServer.Helpers.ResourceManager.GetFiles(System.String)"> | 3908 | <member name="P:HttpServer.IHttpRequest.IsAjax"> |
3717 | <summary> | 3909 | <summary> |
3718 | Fetch all files from the resource that matches the specified arguments. | 3910 | Gets whether the request was made by Ajax (Asynchronous JavaScript) |
3719 | </summary> | 3911 | </summary> |
3720 | <param name="path">The path to the resource to extract</param> | ||
3721 | <returns> | ||
3722 | a list of files if found; or an empty array if no files are found. | ||
3723 | </returns> | ||
3724 | <exception cref="T:System.ArgumentException">Search path must end with an asterisk for finding arbitrary files</exception> | ||
3725 | </member> | 3912 | </member> |
3726 | <member name="M:HttpServer.Helpers.ResourceManager.GetFiles(System.String,System.String)"> | 3913 | <member name="P:HttpServer.IHttpRequest.Method"> |
3727 | <summary> | 3914 | <summary> |
3728 | Fetch all files from the resource that matches the specified arguments. | 3915 | Gets or sets requested method. |
3729 | </summary> | 3916 | </summary> |
3730 | <param name="path">Where the file should reside.</param> | 3917 | <remarks> |
3731 | <param name="filename">Files to check</param> | 3918 | Will always be in upper case. |
3732 | <returns> | 3919 | </remarks> |
3733 | a list of files if found; or an empty array if no files are found. | 3920 | <see cref="P:HttpServer.IHttpRequest.Method"/> |
3734 | </returns> | ||
3735 | </member> | 3921 | </member> |
3736 | <member name="M:HttpServer.Helpers.ResourceManager.ContainsResource(System.String)"> | 3922 | <member name="P:HttpServer.IHttpRequest.Param"> |
3737 | <summary> | 3923 | <summary> |
3738 | Returns whether or not the loader has an instance of the file requested | 3924 | Gets parameter from <see cref="P:HttpServer.IHttpRequest.QueryString"/> or <see cref="P:HttpServer.IHttpRequest.Form"/>. |
3739 | </summary> | 3925 | </summary> |
3740 | <param name="filename">The name of the template/file</param> | ||
3741 | <returns>True if the loader can provide the file</returns> | ||
3742 | </member> | 3926 | </member> |
3743 | <member name="T:HttpServer.Parser.RequestLineEventArgs"> | 3927 | <member name="P:HttpServer.IHttpRequest.QueryString"> |
3744 | <summary> | 3928 | <summary> |
3745 | Used when the request line have been successfully parsed. | 3929 | Gets variables sent in the query string |
3746 | </summary> | 3930 | </summary> |
3747 | </member> | 3931 | </member> |
3748 | <member name="M:HttpServer.Parser.RequestLineEventArgs.#ctor(System.String,System.String,System.String)"> | 3932 | <member name="P:HttpServer.IHttpRequest.Uri"> |
3749 | <summary> | 3933 | <summary> |
3750 | Initializes a new instance of the <see cref="T:HttpServer.Parser.RequestLineEventArgs"/> class. | 3934 | Gets or sets requested URI. |
3751 | </summary> | 3935 | </summary> |
3752 | <param name="httpMethod">The HTTP method.</param> | ||
3753 | <param name="uriPath">The URI path.</param> | ||
3754 | <param name="httpVersion">The HTTP version.</param> | ||
3755 | </member> | 3936 | </member> |
3756 | <member name="M:HttpServer.Parser.RequestLineEventArgs.#ctor"> | 3937 | <member name="P:HttpServer.IHttpRequest.UriParts"> |
3757 | <summary> | 3938 | <summary> |
3758 | Initializes a new instance of the <see cref="T:HttpServer.Parser.RequestLineEventArgs"/> class. | 3939 | Gets URI absolute path divided into parts. |
3759 | </summary> | 3940 | </summary> |
3941 | <example> | ||
3942 | // URI is: http://gauffin.com/code/tiny/ | ||
3943 | Console.WriteLine(request.UriParts[0]); // result: code | ||
3944 | Console.WriteLine(request.UriParts[1]); // result: tiny | ||
3945 | </example> | ||
3946 | <remarks> | ||
3947 | If you're using controllers than the first part is controller name, | ||
3948 | the second part is method name and the third part is Id property. | ||
3949 | </remarks> | ||
3950 | <seealso cref="P:HttpServer.IHttpRequest.Uri"/> | ||
3760 | </member> | 3951 | </member> |
3761 | <member name="P:HttpServer.Parser.RequestLineEventArgs.HttpMethod"> | 3952 | <member name="P:HttpServer.IHttpRequest.UriPath"> |
3762 | <summary> | 3953 | <summary> |
3763 | Gets or sets http method. | 3954 | Gets or sets path and query. |
3764 | </summary> | 3955 | </summary> |
3956 | <see cref="P:HttpServer.IHttpRequest.Uri"/> | ||
3765 | <remarks> | 3957 | <remarks> |
3766 | Should be one of the methods declared in <see cref="T:HttpServer.Method"/>. | 3958 | Are only used during request parsing. Cannot be set after "Host" header have been |
3959 | added. | ||
3767 | </remarks> | 3960 | </remarks> |
3768 | </member> | 3961 | </member> |
3769 | <member name="P:HttpServer.Parser.RequestLineEventArgs.HttpVersion"> | 3962 | <member name="M:HttpServer.IHttpRequest.AddHeader(System.String,System.String)"> |
3770 | <summary> | 3963 | <summary> |
3771 | Gets or sets the version of the HTTP protocol that the client want to use. | 3964 | Called during parsing of a <see cref="T:HttpServer.IHttpRequest"/>. |
3772 | </summary> | 3965 | </summary> |
3966 | <param name="name">Name of the header, should not be URL encoded</param> | ||
3967 | <param name="value">Value of the header, should not be URL encoded</param> | ||
3968 | <exception cref="T:HttpServer.Exceptions.BadRequestException">If a header is incorrect.</exception> | ||
3773 | </member> | 3969 | </member> |
3774 | <member name="P:HttpServer.Parser.RequestLineEventArgs.UriPath"> | 3970 | <member name="M:HttpServer.IHttpRequest.AddToBody(System.Byte[],System.Int32,System.Int32)"> |
3775 | <summary> | 3971 | <summary> |
3776 | Gets or sets requested URI path. | 3972 | Add bytes to the body |
3777 | </summary> | 3973 | </summary> |
3974 | <param name="bytes">buffer to read bytes from</param> | ||
3975 | <param name="offset">where to start read</param> | ||
3976 | <param name="length">number of bytes to read</param> | ||
3977 | <returns>Number of bytes actually read (same as length unless we got all body bytes).</returns> | ||
3978 | <exception cref="T:System.InvalidOperationException">If body is not writable</exception> | ||
3979 | <exception cref="T:System.ArgumentNullException"><c>bytes</c> is null.</exception> | ||
3980 | <exception cref="T:System.ArgumentOutOfRangeException"><c>offset</c> is out of range.</exception> | ||
3778 | </member> | 3981 | </member> |
3779 | <member name="T:HttpServer.IHttpContextHandler"> | 3982 | <member name="M:HttpServer.IHttpRequest.Clear"> |
3780 | <summary> | 3983 | <summary> |
3781 | Class that receives Requests from a <see cref="T:HttpServer.IHttpClientContext"/>. | 3984 | Clear everything in the request |
3782 | </summary> | 3985 | </summary> |
3783 | </member> | 3986 | </member> |
3784 | <member name="M:HttpServer.IHttpContextHandler.ClientDisconnected(HttpServer.IHttpClientContext,System.Net.Sockets.SocketError)"> | 3987 | <member name="M:HttpServer.IHttpRequest.DecodeBody(HttpServer.FormDecoders.FormDecoderProvider)"> |
3785 | <summary> | 3988 | <summary> |
3786 | Client have been disconnected. | 3989 | Decode body into a form. |
3787 | </summary> | 3990 | </summary> |
3788 | <param name="client">Client that was disconnected.</param> | 3991 | <param name="providers">A list with form decoders.</param> |
3789 | <param name="error">Reason</param> | 3992 | <exception cref="T:System.IO.InvalidDataException">If body contents is not valid for the chosen decoder.</exception> |
3790 | <see cref="T:HttpServer.IHttpClientContext"/> | 3993 | <exception cref="T:System.InvalidOperationException">If body is still being transferred.</exception> |
3791 | </member> | 3994 | </member> |
3792 | <member name="M:HttpServer.IHttpContextHandler.RequestReceived(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> | 3995 | <member name="M:HttpServer.IHttpRequest.SetCookies(HttpServer.RequestCookies)"> |
3793 | <summary> | 3996 | <summary> |
3794 | Invoked when a client context have received a new HTTP request | 3997 | Sets the cookies. |
3795 | </summary> | 3998 | </summary> |
3796 | <param name="client">Client that received the request.</param> | 3999 | <param name="cookies">The cookies.</param> |
3797 | <param name="request">Request that was received.</param> | ||
3798 | <see cref="T:HttpServer.IHttpClientContext"/> | ||
3799 | </member> | 4000 | </member> |
3800 | <member name="T:HttpServer.HttpForm"> | 4001 | <member name="M:HttpServer.IHttpRequest.CreateResponse(HttpServer.IHttpClientContext)"> |
3801 | <summary>Container for posted form data</summary> | 4002 | <summary> |
4003 | Create a response object. | ||
4004 | </summary> | ||
4005 | <param name="context">Context for the connected client.</param> | ||
4006 | <returns>A new <see cref="T:HttpServer.IHttpResponse"/>.</returns> | ||
3802 | </member> | 4007 | </member> |
3803 | <member name="F:HttpServer.HttpForm.EmptyForm"> | 4008 | <member name="T:HttpServer.IHttpRequestParser"> |
3804 | <summary>Instance to help mark a non-initialized form</summary> | 4009 | <summary> |
4010 | Event driven parser used to parse incoming HTTP requests. | ||
4011 | </summary> | ||
4012 | <remarks> | ||
4013 | The parser supports partial messages and keeps the states between | ||
4014 | each parsed buffer. It's therefore important that the parser gets | ||
4015 | <see cref="M:HttpServer.IHttpRequestParser.Clear"/>ed if a client disconnects. | ||
4016 | </remarks> | ||
3805 | </member> | 4017 | </member> |
3806 | <member name="M:HttpServer.HttpForm.#ctor"> | 4018 | <member name="P:HttpServer.IHttpRequestParser.CurrentState"> |
3807 | <summary>Initializes a form container with the specified name</summary> | 4019 | <summary> |
4020 | Current state in parser. | ||
4021 | </summary> | ||
3808 | </member> | 4022 | </member> |
3809 | <member name="M:HttpServer.HttpForm.#ctor(HttpServer.HttpInput)"> | 4023 | <member name="M:HttpServer.IHttpRequestParser.Parse(System.Byte[],System.Int32,System.Int32)"> |
3810 | <summary> | 4024 | <summary> |
3811 | Makes a deep copy of the input | 4025 | Parse partial or complete message. |
3812 | </summary> | 4026 | </summary> |
3813 | <param name="input">The input to copy</param> | 4027 | <param name="buffer">buffer containing incoming bytes</param> |
4028 | <param name="offset">where in buffer that parsing should start</param> | ||
4029 | <param name="count">number of bytes to parse</param> | ||
4030 | <returns>Unparsed bytes left in buffer.</returns> | ||
4031 | <exception cref="T:HttpServer.Exceptions.BadRequestException"><c>BadRequestException</c>.</exception> | ||
3814 | </member> | 4032 | </member> |
3815 | <member name="M:HttpServer.HttpForm.AddFile(HttpServer.HttpFile)"> | 4033 | <member name="E:HttpServer.IHttpRequestParser.RequestCompleted"> |
3816 | <summary> | 4034 | <summary> |
3817 | Adds a file to the collection of posted files | 4035 | A request have been successfully parsed. |
3818 | </summary> | 4036 | </summary> |
3819 | <param name="file">The file to add</param> | ||
3820 | <exception cref="T:System.ArgumentException">If the file is already added</exception> | ||
3821 | <exception cref="T:System.ArgumentNullException">If file is null</exception> | ||
3822 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
3823 | </member> | 4037 | </member> |
3824 | <member name="M:HttpServer.HttpForm.ContainsFile(System.String)"> | 4038 | <member name="E:HttpServer.IHttpRequestParser.BodyBytesReceived"> |
3825 | <summary> | 4039 | <summary> |
3826 | Checks if the form contains a specified file | 4040 | More body bytes have been received. |
3827 | </summary> | 4041 | </summary> |
3828 | <param name="name">Field name of the file parameter</param> | ||
3829 | <returns>True if the file exists</returns> | ||
3830 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
3831 | </member> | 4042 | </member> |
3832 | <member name="M:HttpServer.HttpForm.GetFile(System.String)"> | 4043 | <member name="E:HttpServer.IHttpRequestParser.RequestLineReceived"> |
3833 | <summary> | 4044 | <summary> |
3834 | Retrieves a file held by by the form | 4045 | Request line have been received. |
3835 | </summary> | 4046 | </summary> |
3836 | <param name="name">The identifier of the file</param> | ||
3837 | <returns>The requested file or null if the file was not found</returns> | ||
3838 | <exception cref="T:System.ArgumentNullException">If name is null or empty</exception> | ||
3839 | <exception cref="T:System.InvalidOperationException">If the instance is HttpForm.EmptyForm which cannot be modified</exception> | ||
3840 | </member> | 4047 | </member> |
3841 | <member name="M:HttpServer.HttpForm.Clear"> | 4048 | <member name="E:HttpServer.IHttpRequestParser.HeaderReceived"> |
3842 | <summary>Disposes all held HttpFile's and resets values</summary> | 4049 | <summary> |
4050 | A header have been received. | ||
4051 | </summary> | ||
3843 | </member> | 4052 | </member> |
3844 | <member name="P:HttpServer.HttpForm.Files"> | 4053 | <member name="M:HttpServer.IHttpRequestParser.Clear"> |
3845 | <summary> | 4054 | <summary> |
3846 | Retrieves the number of files added to the <see cref="T:HttpServer.HttpForm"/> | 4055 | Clear parser state. |
3847 | </summary> | 4056 | </summary> |
3848 | <returns>0 if no files are added</returns> | ||
3849 | </member> | 4057 | </member> |
3850 | <member name="T:HttpServer.HttpClientContext"> | 4058 | <member name="P:HttpServer.IHttpRequestParser.LogWriter"> |
3851 | <summary> | 4059 | <summary> |
3852 | Contains a connection to a browser/client. | 4060 | Gets or sets the log writer. |
3853 | </summary> | 4061 | </summary> |
3854 | <remarks> | ||
3855 | Remember to <see cref="M:HttpServer.HttpClientContext.Start"/> after you have hooked the <see cref="E:HttpServer.HttpClientContext.RequestReceived"/> event. | ||
3856 | </remarks> | ||
3857 | TODO: Maybe this class should be broken up into HttpClientChannel and HttpClientContext? | ||
3858 | </member> | 4062 | </member> |
3859 | <member name="M:HttpServer.HttpClientContext.#ctor(System.Boolean,System.Net.IPEndPoint,System.IO.Stream,HttpServer.IRequestParserFactory,System.Int32,System.Net.Sockets.Socket)"> | 4063 | <member name="T:HttpServer.RequestParserState"> |
3860 | <summary> | 4064 | <summary> |
3861 | Initializes a new instance of the <see cref="T:HttpServer.HttpClientContext"/> class. | 4065 | Current state in the parsing. |
3862 | </summary> | 4066 | </summary> |
3863 | <param name="secured">true if the connection is secured (SSL/TLS)</param> | ||
3864 | <param name="remoteEndPoint">client that connected.</param> | ||
3865 | <param name="stream">Stream used for communication</param> | ||
3866 | <param name="parserFactory">Used to create a <see cref="T:HttpServer.IHttpRequestParser"/>.</param> | ||
3867 | <param name="bufferSize">Size of buffer to use when reading data. Must be at least 4096 bytes.</param> | ||
3868 | <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> | ||
3869 | <exception cref="T:System.ArgumentException">Stream must be writable and readable.</exception> | ||
3870 | </member> | 4067 | </member> |
3871 | <member name="M:HttpServer.HttpClientContext.OnBodyBytesReceived(System.Object,HttpServer.Parser.BodyEventArgs)"> | 4068 | <member name="F:HttpServer.RequestParserState.FirstLine"> |
3872 | <summary> | 4069 | <summary> |
3873 | Process incoming body bytes. | 4070 | Should parse the request line |
3874 | </summary> | 4071 | </summary> |
3875 | <param name="sender"><see cref="T:HttpServer.IHttpRequestParser"/></param> | ||
3876 | <param name="e">Bytes</param> | ||
3877 | </member> | 4072 | </member> |
3878 | <member name="M:HttpServer.HttpClientContext.OnHeaderReceived(System.Object,HttpServer.Parser.HeaderEventArgs)"> | 4073 | <member name="F:HttpServer.RequestParserState.HeaderName"> |
3879 | <summary> | 4074 | <summary> |
3880 | 4075 | Searching for a complete header name | |
3881 | </summary> | 4076 | </summary> |
3882 | <param name="sender"></param> | ||
3883 | <param name="e"></param> | ||
3884 | </member> | 4077 | </member> |
3885 | <member name="M:HttpServer.HttpClientContext.Start"> | 4078 | <member name="F:HttpServer.RequestParserState.AfterName"> |
3886 | <summary> | 4079 | <summary> |
3887 | Start reading content. | 4080 | Searching for colon after header name (ignoring white spaces) |
3888 | </summary> | 4081 | </summary> |
3889 | <remarks> | ||
3890 | Make sure to call base.Start() if you override this method. | ||
3891 | </remarks> | ||
3892 | </member> | 4082 | </member> |
3893 | <member name="M:HttpServer.HttpClientContext.Cleanup"> | 4083 | <member name="F:HttpServer.RequestParserState.Between"> |
3894 | <summary> | 4084 | <summary> |
3895 | Clean up context. | 4085 | Searching for start of header value (ignoring white spaces) |
3896 | </summary> | 4086 | </summary> |
3897 | <remarks> | ||
3898 | Make sure to call base.Cleanup() if you override the method. | ||
3899 | </remarks> | ||
3900 | </member> | 4087 | </member> |
3901 | <member name="M:HttpServer.HttpClientContext.Disconnect(System.Net.Sockets.SocketError)"> | 4088 | <member name="F:HttpServer.RequestParserState.HeaderValue"> |
3902 | <summary> | 4089 | <summary> |
3903 | Disconnect from client | 4090 | Searching for a complete header value (can span over multiple lines, as long as they are prefixed with one/more whitespaces) |
3904 | </summary> | 4091 | </summary> |
3905 | <param name="error">error to report in the <see cref="E:HttpServer.HttpClientContext.Disconnected"/> event.</param> | ||
3906 | </member> | 4092 | </member> |
3907 | <member name="M:HttpServer.HttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String,System.String,System.String)"> | 4093 | <member name="F:HttpServer.RequestParserState.Body"> |
3908 | <summary> | 4094 | <summary> |
3909 | Send a response. | 4095 | Adding bytes to body |
3910 | </summary> | 4096 | </summary> |
3911 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> | ||
3912 | <param name="statusCode">HTTP status code</param> | ||
3913 | <param name="reason">reason for the status code.</param> | ||
3914 | <param name="body">HTML body contents, can be null or empty.</param> | ||
3915 | <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> | ||
3916 | <exception cref="T:System.ArgumentException">If <paramref name="httpVersion"/> is invalid.</exception> | ||
3917 | </member> | 4097 | </member> |
3918 | <member name="M:HttpServer.HttpClientContext.Respond(System.String,System.Net.HttpStatusCode,System.String)"> | 4098 | <member name="T:HttpServer.IHttpResponse"> |
3919 | <summary> | 4099 | <summary> |
3920 | Send a response. | 4100 | Response that is sent back to the web browser / client. |
4101 | |||
4102 | A response can be sent if different ways. The easiest one is | ||
4103 | to just fill the Body stream with content, everything else | ||
4104 | will then be taken care of by the framework. The default content-type | ||
4105 | is text/html, you should change it if you send anything else. | ||
4106 | |||
4107 | The second and slighty more complex way is to send the response | ||
4108 | as parts. Start with sending the header using the SendHeaders method and | ||
4109 | then you can send the body using SendBody method, but do not forget | ||
4110 | to set ContentType and ContentLength before doing so. | ||
3921 | </summary> | 4111 | </summary> |
3922 | <param name="httpVersion">Either <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/></param> | 4112 | <example> |
3923 | <param name="statusCode">HTTP status code</param> | 4113 | public void MyHandler(IHttpRequest request, IHttpResponse response) |
3924 | <param name="reason">reason for the status code.</param> | 4114 | { |
4115 | |||
4116 | } | ||
4117 | </example> | ||
3925 | </member> | 4118 | </member> |
3926 | <member name="M:HttpServer.HttpClientContext.Respond(System.String)"> | 4119 | <member name="P:HttpServer.IHttpResponse.Body"> |
3927 | <summary> | 4120 | <summary> |
3928 | Send a response. | 4121 | The body stream is used to cache the body contents |
4122 | before sending everything to the client. It's the simplest | ||
4123 | way to serve documents. | ||
3929 | </summary> | 4124 | </summary> |
3930 | <exception cref="T:System.ArgumentNullException"></exception> | ||
3931 | </member> | 4125 | </member> |
3932 | <member name="M:HttpServer.HttpClientContext.Send(System.Byte[])"> | 4126 | <member name="P:HttpServer.IHttpResponse.ProtocolVersion"> |
3933 | <summary> | 4127 | <summary> |
3934 | send a whole buffer | 4128 | Defines the version of the HTTP Response for applications where it's required |
4129 | for this to be forced. | ||
3935 | </summary> | 4130 | </summary> |
3936 | <param name="buffer">buffer to send</param> | ||
3937 | <exception cref="T:System.ArgumentNullException"></exception> | ||
3938 | </member> | 4131 | </member> |
3939 | <member name="M:HttpServer.HttpClientContext.Send(System.Byte[],System.Int32,System.Int32)"> | 4132 | <member name="P:HttpServer.IHttpResponse.Chunked"> |
3940 | <summary> | 4133 | <summary> |
3941 | Send data using the stream | 4134 | The chunked encoding modifies the body of a message in order to |
4135 | transfer it as a series of chunks, each with its own size indicator, | ||
4136 | followed by an OPTIONAL trailer containing entity-header fields. This | ||
4137 | allows dynamically produced content to be transferred along with the | ||
4138 | information necessary for the recipient to verify that it has | ||
4139 | received the full message. | ||
3942 | </summary> | 4140 | </summary> |
3943 | <param name="buffer">Contains data to send</param> | ||
3944 | <param name="offset">Start position in buffer</param> | ||
3945 | <param name="size">number of bytes to send</param> | ||
3946 | <exception cref="T:System.ArgumentNullException"></exception> | ||
3947 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> | ||
3948 | </member> | 4141 | </member> |
3949 | <member name="E:HttpServer.HttpClientContext.Cleaned"> | 4142 | <member name="P:HttpServer.IHttpResponse.Connection"> |
3950 | <summary> | 4143 | <summary> |
3951 | This context have been cleaned, which means that it can be reused. | 4144 | Kind of connection |
3952 | </summary> | 4145 | </summary> |
3953 | </member> | 4146 | </member> |
3954 | <member name="E:HttpServer.HttpClientContext.Started"> | 4147 | <member name="P:HttpServer.IHttpResponse.Encoding"> |
3955 | <summary> | 4148 | <summary> |
3956 | Context have been started (a new client have connected) | 4149 | Encoding to use when sending stuff to the client. |
3957 | </summary> | 4150 | </summary> |
4151 | <remarks>Default is UTF8</remarks> | ||
3958 | </member> | 4152 | </member> |
3959 | <member name="P:HttpServer.HttpClientContext.CurrentRequest"> | 4153 | <member name="P:HttpServer.IHttpResponse.KeepAlive"> |
3960 | <summary> | 4154 | <summary> |
3961 | Overload to specify own type. | 4155 | Number of seconds to keep connection alive |
3962 | </summary> | 4156 | </summary> |
3963 | <remarks> | 4157 | <remarks>Only used if Connection property is set to ConnectionType.KeepAlive</remarks> |
3964 | Must be specified before the context is being used. | ||
3965 | </remarks> | ||
3966 | </member> | 4158 | </member> |
3967 | <member name="P:HttpServer.HttpClientContext.Secured"> | 4159 | <member name="P:HttpServer.IHttpResponse.Status"> |
3968 | <summary> | 4160 | <summary> |
3969 | Using SSL or other encryption method. | 4161 | Status code that is sent to the client. |
3970 | </summary> | 4162 | </summary> |
4163 | <remarks>Default is HttpStatusCode.Ok</remarks> | ||
3971 | </member> | 4164 | </member> |
3972 | <member name="P:HttpServer.HttpClientContext.IsSecured"> | 4165 | <member name="P:HttpServer.IHttpResponse.Reason"> |
3973 | <summary> | 4166 | <summary> |
3974 | Using SSL or other encryption method. | 4167 | Information about why a specific status code was used. |
3975 | </summary> | 4168 | </summary> |
3976 | </member> | 4169 | </member> |
3977 | <member name="P:HttpServer.HttpClientContext.LogWriter"> | 4170 | <member name="P:HttpServer.IHttpResponse.ContentLength"> |
3978 | <summary> | 4171 | <summary> |
3979 | Specify which logger to use. | 4172 | Size of the body. MUST be specified before sending the header, |
4173 | unless property Chunked is set to true. | ||
3980 | </summary> | 4174 | </summary> |
3981 | </member> | 4175 | </member> |
3982 | <member name="P:HttpServer.HttpClientContext.Stream"> | 4176 | <member name="P:HttpServer.IHttpResponse.ContentType"> |
3983 | <summary> | 4177 | <summary> |
3984 | Gets or sets the network stream. | 4178 | Kind of content in the body |
3985 | </summary> | 4179 | </summary> |
4180 | <remarks>Default is text/html</remarks> | ||
3986 | </member> | 4181 | </member> |
3987 | <member name="P:HttpServer.HttpClientContext.RemoteAddress"> | 4182 | <member name="P:HttpServer.IHttpResponse.HeadersSent"> |
3988 | <summary> | 4183 | <summary> |
3989 | Gets or sets IP address that the client connected from. | 4184 | Headers have been sent to the client- |
3990 | </summary> | 4185 | </summary> |
4186 | <remarks>You can not send any additional headers if they have already been sent.</remarks> | ||
3991 | </member> | 4187 | </member> |
3992 | <member name="P:HttpServer.HttpClientContext.RemotePort"> | 4188 | <member name="P:HttpServer.IHttpResponse.Sent"> |
3993 | <summary> | 4189 | <summary> |
3994 | Gets or sets port that the client connected from. | 4190 | The whole response have been sent. |
3995 | </summary> | 4191 | </summary> |
3996 | </member> | 4192 | </member> |
3997 | <member name="E:HttpServer.HttpClientContext.Disconnected"> | 4193 | <member name="P:HttpServer.IHttpResponse.Cookies"> |
3998 | <summary> | 4194 | <summary> |
3999 | The context have been disconnected. | 4195 | Cookies that should be created/changed. |
4000 | </summary> | 4196 | </summary> |
4001 | <remarks> | ||
4002 | Event can be used to clean up a context, or to reuse it. | ||
4003 | </remarks> | ||
4004 | </member> | 4197 | </member> |
4005 | <member name="E:HttpServer.HttpClientContext.RequestReceived"> | 4198 | <member name="M:HttpServer.IHttpResponse.AddHeader(System.String,System.String)"> |
4006 | <summary> | 4199 | <summary> |
4007 | A request have been received in the context. | 4200 | Add another header to the document. |
4008 | </summary> | 4201 | </summary> |
4202 | <param name="name">Name of the header, case sensitive, use lower cases.</param> | ||
4203 | <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> | ||
4204 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
4205 | <exception cref="T:System.ArgumentException">If value conditions have not been met.</exception> | ||
4206 | <remarks>Adding any header will override the default ones and those specified by properties.</remarks> | ||
4009 | </member> | 4207 | </member> |
4010 | <member name="T:HttpServer.Helpers.XmlHelper"> | 4208 | <member name="M:HttpServer.IHttpResponse.Send"> |
4011 | <summary> | 4209 | <summary> |
4012 | Helpers to make XML handling easier | 4210 | Send headers and body to the browser. |
4013 | </summary> | 4211 | </summary> |
4212 | <exception cref="T:System.InvalidOperationException">If content have already been sent.</exception> | ||
4014 | </member> | 4213 | </member> |
4015 | <member name="M:HttpServer.Helpers.XmlHelper.Serialize(System.Object)"> | 4214 | <member name="M:HttpServer.IHttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)"> |
4016 | <summary> | 4215 | <summary> |
4017 | Serializes object to XML. | 4216 | Make sure that you have specified ContentLength and sent the headers first. |
4018 | </summary> | 4217 | </summary> |
4019 | <param name="value">object to serialize.</param> | 4218 | <param name="buffer"></param> |
4020 | <returns>XML</returns> | 4219 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> |
4021 | <remarks> | 4220 | <see cref="M:HttpServer.IHttpResponse.SendHeaders"/> |
4022 | Removes name spaces and adds indentation | 4221 | <param name="offset">offest of first byte to send</param> |
4023 | </remarks> | 4222 | <param name="count">number of bytes to send.</param> |
4223 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | ||
4224 | <seealso cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
4225 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
4226 | is recommended for larger files to keep the memory usage low.</remarks> | ||
4024 | </member> | 4227 | </member> |
4025 | <member name="M:HttpServer.Helpers.XmlHelper.Deserialize``1(System.String)"> | 4228 | <member name="M:HttpServer.IHttpResponse.SendBody(System.Byte[])"> |
4026 | <summary> | 4229 | <summary> |
4027 | Create an object from a XML string | 4230 | Make sure that you have specified ContentLength and sent the headers first. |
4028 | </summary> | 4231 | </summary> |
4029 | <typeparam name="T">Type of object</typeparam> | 4232 | <param name="buffer"></param> |
4030 | <param name="xml">XML string</param> | 4233 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> |
4031 | <returns>object</returns> | 4234 | <see cref="M:HttpServer.IHttpResponse.SendHeaders"/> |
4235 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> | ||
4236 | <seealso cref="M:HttpServer.IHttpResponse.SendHeaders"/> | ||
4237 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
4238 | is recommended for larger files to keep the memory usage low.</remarks> | ||
4032 | </member> | 4239 | </member> |
4033 | <member name="M:HttpServer.FormDecoders.HttpMultipart.ReadLine"> | 4240 | <member name="M:HttpServer.IHttpResponse.SendHeaders"> |
4034 | <summary> | 4241 | <summary> |
4035 | 4242 | Send headers to the client. | |
4036 | </summary> | 4243 | </summary> |
4037 | <returns></returns> | 4244 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> |
4038 | <exception cref="T:System.ArgumentOutOfRangeException"></exception> | 4245 | <seealso cref="M:HttpServer.IHttpResponse.AddHeader(System.String,System.String)"/> |
4039 | <exception cref="T:System.ObjectDisposedException"></exception> | 4246 | <seealso cref="M:HttpServer.IHttpResponse.Send"/> |
4247 | <seealso cref="M:HttpServer.IHttpResponse.SendBody(System.Byte[])"/> | ||
4040 | </member> | 4248 | </member> |
4041 | <member name="T:HttpServer.FormDecoders.HttpMultipart.Element"> | 4249 | <member name="M:HttpServer.IHttpResponse.Redirect(System.Uri)"> |
4042 | <summary>Represents a field in a multipart form</summary> | 4250 | <summary> |
4251 | Redirect client to somewhere else using the 302 status code. | ||
4252 | </summary> | ||
4253 | <param name="uri">Destination of the redirect</param> | ||
4254 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
4255 | <remarks>You can not do anything more with the request when a redirect have been done. This should be your last | ||
4256 | action.</remarks> | ||
4043 | </member> | 4257 | </member> |
4044 | <member name="T:HttpServer.Check"> | 4258 | <member name="M:HttpServer.IHttpResponse.Redirect(System.String)"> |
4045 | <summary> | 4259 | <summary> |
4046 | Small design by contract implementation. | 4260 | redirect to somewhere |
4047 | </summary> | 4261 | </summary> |
4262 | <param name="url">where the redirect should go</param> | ||
4263 | <remarks> | ||
4264 | No body are allowed when doing redirects. | ||
4265 | </remarks> | ||
4048 | </member> | 4266 | </member> |
4049 | <member name="M:HttpServer.Check.NotEmpty(System.String,System.String)"> | 4267 | <member name="T:HttpServer.ConnectionType"> |
4050 | <summary> | 4268 | <summary> |
4051 | Check whether a parameter is empty. | 4269 | Type of HTTP connection |
4052 | </summary> | 4270 | </summary> |
4053 | <param name="value">Parameter value</param> | ||
4054 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> | ||
4055 | <exception cref="T:System.ArgumentException">value is empty.</exception> | ||
4056 | </member> | 4271 | </member> |
4057 | <member name="M:HttpServer.Check.Require(System.Object,System.String)"> | 4272 | <member name="F:HttpServer.ConnectionType.Close"> |
4058 | <summary> | 4273 | <summary> |
4059 | Checks whether a parameter is null. | 4274 | Connection is closed after each request-response |
4060 | </summary> | 4275 | </summary> |
4061 | <param name="value">Parameter value</param> | ||
4062 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> | ||
4063 | <exception cref="T:System.ArgumentNullException">value is null.</exception> | ||
4064 | </member> | 4276 | </member> |
4065 | <member name="M:HttpServer.Check.Min(System.Int32,System.Object,System.String)"> | 4277 | <member name="F:HttpServer.ConnectionType.KeepAlive"> |
4066 | <summary> | 4278 | <summary> |
4067 | Checks whether a parameter is null. | 4279 | Connection is kept alive for X seconds (unless another request have been made) |
4068 | </summary> | 4280 | </summary> |
4069 | <param name="minValue"></param> | ||
4070 | <param name="value">Parameter value</param> | ||
4071 | <param name="parameterOrErrorMessage">Parameter name, or error description.</param> | ||
4072 | <exception cref="T:System.ArgumentException">value is null.</exception> | ||
4073 | </member> | 4281 | </member> |
4074 | <member name="T:HttpServer.LogPrio"> | 4282 | <member name="T:HttpServer.LogPrio"> |
4075 | <summary> | 4283 | <summary> |
@@ -4166,722 +4374,852 @@ | |||
4166 | <param name="prio">Importance of the log message</param> | 4374 | <param name="prio">Importance of the log message</param> |
4167 | <param name="message">The message.</param> | 4375 | <param name="message">The message.</param> |
4168 | </member> | 4376 | </member> |
4169 | <member name="T:HttpServer.HttpResponse"> | 4377 | <member name="T:HttpServer.LocklessQueue`1"> |
4170 | <summary> | 4378 | <summary> |
4171 | Response that is sent back to the web browser / client. | 4379 | A thread-safe lockless queue that supports multiple readers and |
4380 | multiple writers | ||
4172 | </summary> | 4381 | </summary> |
4173 | <remarks> | ||
4174 | <para> | ||
4175 | A response can be sent if different ways. The easiest one is | ||
4176 | to just fill the Body stream with content, everything else | ||
4177 | will then be taken care of by the framework. The default content-type | ||
4178 | is text/html, you should change it if you send anything else. | ||
4179 | </para><para> | ||
4180 | The second and slightly more complex way is to send the response | ||
4181 | as parts. Start with sending the header using the SendHeaders method and | ||
4182 | then you can send the body using SendBody method, but do not forget | ||
4183 | to set <see cref="P:HttpServer.HttpResponse.ContentType"/> and <see cref="P:HttpServer.HttpResponse.ContentLength"/> before doing so. | ||
4184 | </para> | ||
4185 | </remarks> | ||
4186 | <example> | ||
4187 | <code> | ||
4188 | // Example using response body. | ||
4189 | class MyModule : HttpModule | ||
4190 | { | ||
4191 | public override bool Process(IHttpRequest request, IHttpResponse response, IHttpSession session) | ||
4192 | { | ||
4193 | StreamWriter writer = new StreamWriter(response.Body); | ||
4194 | writer.WriteLine("Hello dear World!"); | ||
4195 | writer.Flush(); | ||
4196 | |||
4197 | // return true to tell webserver that we've handled the url | ||
4198 | return true; | ||
4199 | } | ||
4200 | } | ||
4201 | </code> | ||
4202 | </example> | ||
4203 | todo: add two examples, using SendHeaders/SendBody and just the Body stream. | ||
4204 | </member> | 4382 | </member> |
4205 | <member name="M:HttpServer.HttpResponse.#ctor(HttpServer.IHttpClientContext,HttpServer.IHttpRequest)"> | 4383 | <member name="T:HttpServer.LocklessQueue`1.SingleLinkNode"> |
4206 | <summary> | 4384 | <summary> |
4207 | Initializes a new instance of the <see cref="T:HttpServer.IHttpResponse"/> class. | 4385 | Provides a node container for data in a singly linked list |
4208 | </summary> | 4386 | </summary> |
4209 | <param name="context">Client that send the <see cref="T:HttpServer.IHttpRequest"/>.</param> | ||
4210 | <param name="request">Contains information of what the client want to receive.</param> | ||
4211 | <exception cref="T:System.ArgumentException"><see cref="P:HttpServer.IHttpRequest.HttpVersion"/> cannot be empty.</exception> | ||
4212 | </member> | 4387 | </member> |
4213 | <member name="M:HttpServer.HttpResponse.#ctor(HttpServer.IHttpClientContext,System.String,HttpServer.ConnectionType)"> | 4388 | <member name="F:HttpServer.LocklessQueue`1.SingleLinkNode.Next"> |
4389 | <summary>Pointer to the next node in list</summary> | ||
4390 | </member> | ||
4391 | <member name="F:HttpServer.LocklessQueue`1.SingleLinkNode.Item"> | ||
4392 | <summary>The data contained by the node</summary> | ||
4393 | </member> | ||
4394 | <member name="M:HttpServer.LocklessQueue`1.SingleLinkNode.#ctor"> | ||
4214 | <summary> | 4395 | <summary> |
4215 | Initializes a new instance of the <see cref="T:HttpServer.IHttpResponse"/> class. | 4396 | Constructor |
4216 | </summary> | 4397 | </summary> |
4217 | <param name="context">Client that send the <see cref="T:HttpServer.IHttpRequest"/>.</param> | ||
4218 | <param name="httpVersion">Version of HTTP protocol that the client uses.</param> | ||
4219 | <param name="connectionType">Type of HTTP connection used.</param> | ||
4220 | </member> | 4398 | </member> |
4221 | <member name="M:HttpServer.HttpResponse.AddHeader(System.String,System.String)"> | 4399 | <member name="M:HttpServer.LocklessQueue`1.SingleLinkNode.#ctor(`0)"> |
4222 | <summary> | 4400 | <summary> |
4223 | Add another header to the document. | 4401 | Constructor |
4224 | </summary> | 4402 | </summary> |
4225 | <param name="name">Name of the header, case sensitive, use lower cases.</param> | ||
4226 | <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> | ||
4227 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
4228 | <exception cref="T:System.ArgumentException">If value conditions have not been met.</exception> | ||
4229 | <remarks>Adding any header will override the default ones and those specified by properties.</remarks> | ||
4230 | </member> | 4403 | </member> |
4231 | <member name="M:HttpServer.HttpResponse.Send"> | 4404 | <member name="F:HttpServer.LocklessQueue`1.head"> |
4405 | <summary>Queue head</summary> | ||
4406 | </member> | ||
4407 | <member name="F:HttpServer.LocklessQueue`1.tail"> | ||
4408 | <summary>Queue tail</summary> | ||
4409 | </member> | ||
4410 | <member name="F:HttpServer.LocklessQueue`1.count"> | ||
4411 | <summary>Queue item count</summary> | ||
4412 | </member> | ||
4413 | <member name="P:HttpServer.LocklessQueue`1.Count"> | ||
4414 | <summary>Gets the current number of items in the queue. Since this | ||
4415 | is a lockless collection this value should be treated as a close | ||
4416 | estimate</summary> | ||
4417 | </member> | ||
4418 | <member name="M:HttpServer.LocklessQueue`1.#ctor"> | ||
4232 | <summary> | 4419 | <summary> |
4233 | Send headers and body to the browser. | 4420 | Constructor |
4234 | </summary> | 4421 | </summary> |
4235 | <exception cref="T:System.InvalidOperationException">If content have already been sent.</exception> | ||
4236 | </member> | 4422 | </member> |
4237 | <member name="M:HttpServer.HttpResponse.SendBody(System.Byte[],System.Int32,System.Int32)"> | 4423 | <member name="M:HttpServer.LocklessQueue`1.Enqueue(`0)"> |
4238 | <summary> | 4424 | <summary> |
4239 | Make sure that you have specified <see cref="P:HttpServer.HttpResponse.ContentLength"/> and sent the headers first. | 4425 | Enqueue an item |
4240 | </summary> | 4426 | </summary> |
4241 | <param name="buffer"></param> | 4427 | <param name="item">Item to enqeue</param> |
4242 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | ||
4243 | <see cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
4244 | <param name="offset">offset of first byte to send</param> | ||
4245 | <param name="count">number of bytes to send.</param> | ||
4246 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
4247 | <seealso cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
4248 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
4249 | is recommended for larger files to keep the memory usage low.</remarks> | ||
4250 | </member> | 4428 | </member> |
4251 | <member name="M:HttpServer.HttpResponse.SendBody(System.Byte[])"> | 4429 | <member name="M:HttpServer.LocklessQueue`1.TryDequeue(`0@)"> |
4252 | <summary> | 4430 | <summary> |
4253 | Make sure that you have specified <see cref="P:HttpServer.HttpResponse.ContentLength"/> and sent the headers first. | 4431 | Try to dequeue an item |
4254 | </summary> | 4432 | </summary> |
4255 | <param name="buffer"></param> | 4433 | <param name="item">Dequeued item if the dequeue was successful</param> |
4256 | <exception cref="T:System.InvalidOperationException">If headers have not been sent.</exception> | 4434 | <returns>True if an item was successfully deqeued, otherwise false</returns> |
4257 | <see cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
4258 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
4259 | <seealso cref="M:HttpServer.HttpResponse.SendHeaders"/> | ||
4260 | <remarks>This method can be used if you want to send body contents without caching them first. This | ||
4261 | is recommended for larger files to keep the memory usage low.</remarks> | ||
4262 | </member> | 4435 | </member> |
4263 | <member name="M:HttpServer.HttpResponse.SendHeaders"> | 4436 | <member name="T:HttpServer.Method"> |
4264 | <summary> | 4437 | <summary> |
4265 | Send headers to the client. | 4438 | Contains all HTTP Methods (according to the HTTP 1.1 specification) |
4439 | <para> | ||
4440 | See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html | ||
4441 | </para> | ||
4266 | </summary> | 4442 | </summary> |
4267 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | ||
4268 | <seealso cref="M:HttpServer.HttpResponse.AddHeader(System.String,System.String)"/> | ||
4269 | <seealso cref="M:HttpServer.HttpResponse.Send"/> | ||
4270 | <seealso cref="M:HttpServer.HttpResponse.SendBody(System.Byte[])"/> | ||
4271 | </member> | 4443 | </member> |
4272 | <member name="M:HttpServer.HttpResponse.Redirect(System.Uri)"> | 4444 | <member name="F:HttpServer.Method.Delete"> |
4273 | <summary> | 4445 | <summary> |
4274 | Redirect client to somewhere else using the 302 status code. | 4446 | The DELETE method requests that the origin server delete the resource identified by the Request-URI. |
4275 | </summary> | 4447 | </summary> |
4276 | <param name="uri">Destination of the redirect</param> | 4448 | <remarks> |
4277 | <exception cref="T:System.InvalidOperationException">If headers already been sent.</exception> | 4449 | <para> |
4278 | <remarks>You can not do anything more with the request when a redirect have been done. This should be your last | 4450 | This method MAY be overridden by human intervention (or other means) on the origin server. |
4279 | action.</remarks> | 4451 | The client cannot be guaranteed that the operation has been carried out, even if the status code |
4452 | returned from the origin server indicates that the action has been completed successfully. | ||
4453 | </para> | ||
4454 | <para> | ||
4455 | However, the server SHOULD NOT indicate success unless, at the time the response is given, | ||
4456 | it intends to delete the resource or move it to an inaccessible location. | ||
4457 | </para> | ||
4458 | <para> | ||
4459 | A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, | ||
4460 | 202 (Accepted) if the action has not yet been enacted, | ||
4461 | or 204 (No Content) if the action has been enacted but the response does not include an entity. | ||
4462 | </para> | ||
4463 | <para> | ||
4464 | If the request passes through a cache and the Request-URI identifies one or more currently cached entities, | ||
4465 | those entries SHOULD be treated as stale. Responses to this method are not cacheable. | ||
4466 | </para> | ||
4467 | </remarks> | ||
4280 | </member> | 4468 | </member> |
4281 | <member name="M:HttpServer.HttpResponse.Redirect(System.String)"> | 4469 | <member name="F:HttpServer.Method.Get"> |
4282 | <summary> | 4470 | <summary> |
4283 | redirect to somewhere | 4471 | The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. |
4284 | </summary> | 4472 | </summary> |
4285 | <param name="url">where the redirect should go</param> | ||
4286 | <remarks> | 4473 | <remarks> |
4287 | No body are allowed when doing redirects. | 4474 | <para> |
4475 | If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the | ||
4476 | entity in the response and not the source text of the process, unless that text happens to be the output of the process. | ||
4477 | </para> | ||
4478 | <para> | ||
4479 | The semantics of the GET method change to a "conditional GET" if the request message includes an | ||
4480 | If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. | ||
4481 | A conditional GET method requests that the entity be transferred only under the circumstances described | ||
4482 | by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network | ||
4483 | usage by allowing cached entities to be refreshed without requiring multiple requests or transferring | ||
4484 | data already held by the client. | ||
4485 | </para> | ||
4288 | </remarks> | 4486 | </remarks> |
4289 | </member> | 4487 | </member> |
4290 | <member name="P:HttpServer.HttpResponse.Body"> | 4488 | <member name="F:HttpServer.Method.Header"> |
4291 | <summary> | 4489 | <summary> |
4292 | The body stream is used to cache the body contents | 4490 | The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. |
4293 | before sending everything to the client. It's the simplest | ||
4294 | way to serve documents. | ||
4295 | </summary> | 4491 | </summary> |
4492 | <remarks> | ||
4493 | The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the | ||
4494 | information sent in response to a GET request. This method can be used for obtaining meta information about | ||
4495 | the entity implied by the request without transferring the entity-body itself. | ||
4496 | |||
4497 | This method is often used for testing hypertext links for validity, accessibility, and recent modification. | ||
4498 | </remarks> | ||
4296 | </member> | 4499 | </member> |
4297 | <member name="P:HttpServer.HttpResponse.Chunked"> | 4500 | <member name="F:HttpServer.Method.Options"> |
4298 | <summary> | 4501 | <summary> |
4299 | The chunked encoding modifies the body of a message in order to | 4502 | <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> |
4300 | transfer it as a series of chunks, each with its own size indicator, | ||
4301 | followed by an OPTIONAL trailer containing entity-header fields. This | ||
4302 | allows dynamically produced content to be transferred along with the | ||
4303 | information necessary for the recipient to verify that it has | ||
4304 | received the full message. | ||
4305 | </summary> | 4503 | </summary> |
4504 | <remarks> | ||
4505 | <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> | ||
4506 | </remarks> | ||
4306 | </member> | 4507 | </member> |
4307 | <member name="P:HttpServer.HttpResponse.ProtocolVersion"> | 4508 | <member name="F:HttpServer.Method.Post"> |
4308 | <summary> | 4509 | <summary> |
4309 | Defines the version of the HTTP Response for applications where it's required | 4510 | The POST method is used to request that the origin server accept the entity enclosed |
4310 | for this to be forced. | 4511 | in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. |
4311 | </summary> | 4512 | </summary> |
4513 | <remarks> | ||
4514 | POST is designed to allow a uniform method to cover the following functions: | ||
4515 | <list type="bullet"> | ||
4516 | <item> | ||
4517 | Annotation of existing resources; | ||
4518 | </item><item> | ||
4519 | Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; | ||
4520 | </item><item> | ||
4521 | Providing a block of data, such as the result of submitting a form, to a data-handling process; | ||
4522 | </item><item> | ||
4523 | Extending a database through an append operation. | ||
4524 | </item> | ||
4525 | </list> | ||
4526 | <para> | ||
4527 | If a resource has been created on the origin server, the response SHOULD be 201 (Created) and | ||
4528 | contain an entity which describes the status of the request and refers to the new resource, and a | ||
4529 | Location header (see section 14.30). | ||
4530 | </para> | ||
4531 | <para> | ||
4532 | The action performed by the POST method might not result in a resource that can be identified by a URI. | ||
4533 | In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on | ||
4534 | whether or not the response includes an entity that describes the result. | ||
4535 | </para><para> | ||
4536 | Responses to this method are not cacheable, unless the response includes appropriate Cache-Control | ||
4537 | or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent | ||
4538 | to retrieve a cacheable resource. | ||
4539 | </para> | ||
4540 | </remarks> | ||
4312 | </member> | 4541 | </member> |
4313 | <member name="P:HttpServer.HttpResponse.Connection"> | 4542 | <member name="F:HttpServer.Method.Put"> |
4314 | <summary> | 4543 | <summary> |
4315 | Kind of connection | 4544 | The PUT method requests that the enclosed entity be stored under the supplied Request-URI. |
4316 | </summary> | 4545 | </summary> |
4546 | <remarks> | ||
4547 | <list type="bullet"> | ||
4548 | <item> | ||
4549 | If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a | ||
4550 | modified version of the one residing on the origin server. | ||
4551 | </item><item> | ||
4552 | If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new | ||
4553 | resource by the requesting user agent, the origin server can create the resource with that URI. | ||
4554 | </item><item> | ||
4555 | If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. | ||
4556 | </item><item> | ||
4557 | If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to | ||
4558 | indicate successful completion of the request. | ||
4559 | </item><item> | ||
4560 | If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be | ||
4561 | given that reflects the nature of the problem. | ||
4562 | </item> | ||
4563 | </list> | ||
4564 | <para> | ||
4565 | The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not | ||
4566 | understand or implement and MUST return a 501 (Not Implemented) response in such cases. | ||
4567 | </para> | ||
4568 | </remarks> | ||
4317 | </member> | 4569 | </member> |
4318 | <member name="P:HttpServer.HttpResponse.Encoding"> | 4570 | <member name="F:HttpServer.Method.Trace"> |
4319 | <summary> | 4571 | <summary> |
4320 | Encoding to use when sending stuff to the client. | 4572 | The TRACE method is used to invoke a remote, application-layer loop- back of the request message. |
4321 | </summary> | 4573 | </summary> |
4322 | <remarks>Default is UTF8</remarks> | ||
4323 | </member> | 4574 | </member> |
4324 | <member name="P:HttpServer.HttpResponse.KeepAlive"> | 4575 | <member name="T:HttpServer.Methods"> |
4325 | <summary> | 4576 | <summary> |
4326 | Number of seconds to keep connection alive | 4577 | Contains all HTTP Methods (according to the HTTP 1.1 specification) |
4578 | <para> | ||
4579 | See: http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html | ||
4580 | </para> | ||
4327 | </summary> | 4581 | </summary> |
4328 | <remarks>Only used if Connection property is set to <see cref="F:HttpServer.ConnectionType.KeepAlive"/>.</remarks> | ||
4329 | </member> | 4582 | </member> |
4330 | <member name="P:HttpServer.HttpResponse.Status"> | 4583 | <member name="F:HttpServer.Methods.Delete"> |
4331 | <summary> | 4584 | <summary> |
4332 | Status code that is sent to the client. | 4585 | The DELETE method requests that the origin server delete the resource identified by the Request-URI. |
4333 | </summary> | 4586 | </summary> |
4334 | <remarks>Default is <see cref="F:System.Net.HttpStatusCode.OK"/></remarks> | 4587 | <remarks> |
4588 | <para> | ||
4589 | This method MAY be overridden by human intervention (or other means) on the origin server. | ||
4590 | The client cannot be guaranteed that the operation has been carried out, even if the status code | ||
4591 | returned from the origin server indicates that the action has been completed successfully. | ||
4592 | </para> | ||
4593 | <para> | ||
4594 | However, the server SHOULD NOT indicate success unless, at the time the response is given, | ||
4595 | it intends to delete the resource or move it to an inaccessible location. | ||
4596 | </para> | ||
4597 | <para> | ||
4598 | A successful response SHOULD be 200 (OK) if the response includes an entity describing the status, | ||
4599 | 202 (Accepted) if the action has not yet been enacted, | ||
4600 | or 204 (No Content) if the action has been enacted but the response does not include an entity. | ||
4601 | </para> | ||
4602 | <para> | ||
4603 | If the request passes through a cache and the Request-URI identifies one or more currently cached entities, | ||
4604 | those entries SHOULD be treated as stale. Responses to this method are not cacheable. | ||
4605 | </para> | ||
4606 | </remarks> | ||
4335 | </member> | 4607 | </member> |
4336 | <member name="P:HttpServer.HttpResponse.Reason"> | 4608 | <member name="F:HttpServer.Methods.Get"> |
4337 | <summary> | 4609 | <summary> |
4338 | Information about why a specific status code was used. | 4610 | The GET method means retrieve whatever information (in the form of an entity) is identified by the Request-URI. |
4339 | </summary> | 4611 | </summary> |
4612 | <remarks> | ||
4613 | <para> | ||
4614 | If the Request-URI refers to a data-producing process, it is the produced data which shall be returned as the | ||
4615 | entity in the response and not the source text of the process, unless that text happens to be the output of the process. | ||
4616 | </para> | ||
4617 | <para> | ||
4618 | The semantics of the GET method change to a "conditional GET" if the request message includes an | ||
4619 | If-Modified-Since, If-Unmodified-Since, If-Match, If-None-Match, or If-Range header field. | ||
4620 | A conditional GET method requests that the entity be transferred only under the circumstances described | ||
4621 | by the conditional header field(s). The conditional GET method is intended to reduce unnecessary network | ||
4622 | usage by allowing cached entities to be refreshed without requiring multiple requests or transferring | ||
4623 | data already held by the client. | ||
4624 | </para> | ||
4625 | </remarks> | ||
4340 | </member> | 4626 | </member> |
4341 | <member name="P:HttpServer.HttpResponse.ContentLength"> | 4627 | <member name="F:HttpServer.Methods.Header"> |
4342 | <summary> | 4628 | <summary> |
4343 | Size of the body. MUST be specified before sending the header, | 4629 | The HEAD method is identical to GET except that the server MUST NOT return a message-body in the response. |
4344 | unless property Chunked is set to true. | ||
4345 | </summary> | 4630 | </summary> |
4631 | <remarks> | ||
4632 | The meta information contained in the HTTP headers in response to a HEAD request SHOULD be identical to the | ||
4633 | information sent in response to a GET request. This method can be used for obtaining meta information about | ||
4634 | the entity implied by the request without transferring the entity-body itself. | ||
4635 | |||
4636 | This method is often used for testing hypertext links for validity, accessibility, and recent modification. | ||
4637 | </remarks> | ||
4346 | </member> | 4638 | </member> |
4347 | <member name="P:HttpServer.HttpResponse.ContentType"> | 4639 | <member name="F:HttpServer.Methods.Options"> |
4348 | <summary> | 4640 | <summary> |
4349 | Kind of content in the body | 4641 | <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> |
4350 | </summary> | 4642 | </summary> |
4351 | <remarks>Default type is "text/html"</remarks> | 4643 | <remarks> |
4644 | <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> | ||
4645 | </remarks> | ||
4352 | </member> | 4646 | </member> |
4353 | <member name="P:HttpServer.HttpResponse.HeadersSent"> | 4647 | <member name="F:HttpServer.Methods.Post"> |
4354 | <summary> | 4648 | <summary> |
4355 | Headers have been sent to the client- | 4649 | The POST method is used to request that the origin server accept the entity enclosed |
4650 | in the request as a new subordinate of the resource identified by the Request-URI in the Request-Line. | ||
4356 | </summary> | 4651 | </summary> |
4357 | <remarks>You can not send any additional headers if they have already been sent.</remarks> | 4652 | <remarks> |
4653 | POST is designed to allow a uniform method to cover the following functions: | ||
4654 | <list type="bullet"> | ||
4655 | <item> | ||
4656 | Annotation of existing resources; | ||
4657 | </item><item> | ||
4658 | Posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; | ||
4659 | </item><item> | ||
4660 | Providing a block of data, such as the result of submitting a form, to a data-handling process; | ||
4661 | </item><item> | ||
4662 | Extending a database through an append operation. | ||
4663 | </item> | ||
4664 | </list> | ||
4665 | <para> | ||
4666 | If a resource has been created on the origin server, the response SHOULD be 201 (Created) and | ||
4667 | contain an entity which describes the status of the request and refers to the new resource, and a | ||
4668 | Location header (see section 14.30). | ||
4669 | </para> | ||
4670 | <para> | ||
4671 | The action performed by the POST method might not result in a resource that can be identified by a URI. | ||
4672 | In this case, either 200 (OK) or 204 (No Content) is the appropriate response status, depending on | ||
4673 | whether or not the response includes an entity that describes the result. | ||
4674 | </para><para> | ||
4675 | Responses to this method are not cacheable, unless the response includes appropriate Cache-Control | ||
4676 | or Expires header fields. However, the 303 (See Other) response can be used to direct the user agent | ||
4677 | to retrieve a cacheable resource. | ||
4678 | </para> | ||
4679 | </remarks> | ||
4358 | </member> | 4680 | </member> |
4359 | <member name="P:HttpServer.HttpResponse.Sent"> | 4681 | <member name="F:HttpServer.Methods.Put"> |
4360 | <summary> | 4682 | <summary> |
4361 | The whole response have been sent. | 4683 | The PUT method requests that the enclosed entity be stored under the supplied Request-URI. |
4362 | </summary> | 4684 | </summary> |
4685 | <remarks> | ||
4686 | <list type="bullet"> | ||
4687 | <item> | ||
4688 | If the Request-URI refers to an already existing resource, the enclosed entity SHOULD be considered as a | ||
4689 | modified version of the one residing on the origin server. | ||
4690 | </item><item> | ||
4691 | If the Request-URI does not point to an existing resource, and that URI is capable of being defined as a new | ||
4692 | resource by the requesting user agent, the origin server can create the resource with that URI. | ||
4693 | </item><item> | ||
4694 | If a new resource is created, the origin server MUST inform the user agent via the 201 (Created) response. | ||
4695 | </item><item> | ||
4696 | If an existing resource is modified, either the 200 (OK) or 204 (No Content) response codes SHOULD be sent to | ||
4697 | indicate successful completion of the request. | ||
4698 | </item><item> | ||
4699 | If the resource could not be created or modified with the Request-URI, an appropriate error response SHOULD be | ||
4700 | given that reflects the nature of the problem. | ||
4701 | </item> | ||
4702 | </list> | ||
4703 | <para> | ||
4704 | The recipient of the entity MUST NOT ignore any Content-* (e.g. Content-Range) headers that it does not | ||
4705 | understand or implement and MUST return a 501 (Not Implemented) response in such cases. | ||
4706 | </para> | ||
4707 | </remarks> | ||
4363 | </member> | 4708 | </member> |
4364 | <member name="P:HttpServer.HttpResponse.Cookies"> | 4709 | <member name="F:HttpServer.Methods.Trace"> |
4365 | <summary> | 4710 | <summary> |
4366 | Cookies that should be created/changed. | 4711 | The TRACE method is used to invoke a remote, application-layer loop- back of the request message. |
4367 | </summary> | 4712 | </summary> |
4368 | </member> | 4713 | </member> |
4369 | <member name="T:HttpServer.Exceptions.NotFoundException"> | 4714 | <member name="T:HttpServer.Parser.BodyEventArgs"> |
4370 | <summary> | 4715 | <summary> |
4371 | The requested resource was not found in the web server. | 4716 | Arguments used when more body bytes have come. |
4372 | </summary> | 4717 | </summary> |
4373 | </member> | 4718 | </member> |
4374 | <member name="M:HttpServer.Exceptions.NotFoundException.#ctor(System.String,System.Exception)"> | 4719 | <member name="M:HttpServer.Parser.BodyEventArgs.#ctor(System.Byte[],System.Int32,System.Int32)"> |
4375 | <summary> | 4720 | <summary> |
4376 | Create a new exception | 4721 | Initializes a new instance of the <see cref="T:HttpServer.Parser.BodyEventArgs"/> class. |
4377 | </summary> | 4722 | </summary> |
4378 | <param name="message">message describing the error</param> | 4723 | <param name="buffer">buffer that contains the received bytes.</param> |
4379 | <param name="inner">inner exception</param> | 4724 | <param name="offset">offset in buffer where to start processing.</param> |
4725 | <param name="count">number of bytes from <paramref name="offset"/> that should be parsed.</param> | ||
4380 | </member> | 4726 | </member> |
4381 | <member name="M:HttpServer.Exceptions.NotFoundException.#ctor(System.String)"> | 4727 | <member name="M:HttpServer.Parser.BodyEventArgs.#ctor"> |
4382 | <summary> | 4728 | <summary> |
4383 | Create a new exception | 4729 | Initializes a new instance of the <see cref="T:HttpServer.Parser.BodyEventArgs"/> class. |
4384 | </summary> | 4730 | </summary> |
4385 | <param name="message">message describing the error</param> | ||
4386 | </member> | 4731 | </member> |
4387 | <member name="T:HttpServer.ContextTimeoutManager"> | 4732 | <member name="P:HttpServer.Parser.BodyEventArgs.Buffer"> |
4388 | <summary> | 4733 | <summary> |
4389 | Timeout Manager. Checks for dead clients. Clients with open connections that are not doing anything. Closes sessions opened with keepalive. | 4734 | Gets or sets buffer that contains the received bytes. |
4390 | </summary> | 4735 | </summary> |
4391 | </member> | 4736 | </member> |
4392 | <member name="M:HttpServer.ContextTimeoutManager.ProcessContextTimeouts"> | 4737 | <member name="P:HttpServer.Parser.BodyEventArgs.Count"> |
4393 | <summary> | 4738 | <summary> |
4394 | Causes the watcher to immediately check the connections. | 4739 | Gets or sets number of bytes from <see cref="P:HttpServer.Parser.BodyEventArgs.Offset"/> that should be parsed. |
4395 | </summary> | 4740 | </summary> |
4396 | </member> | 4741 | </member> |
4397 | <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCount"> | 4742 | <member name="P:HttpServer.Parser.BodyEventArgs.Offset"> |
4398 | <summary> | 4743 | <summary> |
4399 | Environment.TickCount is an int but it counts all 32 bits so it goes positive | 4744 | Gets or sets offset in buffer where to start processing. |
4400 | and negative every 24.9 days. This trims down TickCount so it doesn't wrap | ||
4401 | for the callers. | ||
4402 | This trims it to a 12 day interval so don't let your frame time get too long. | ||
4403 | </summary> | 4745 | </summary> |
4404 | <returns></returns> | ||
4405 | </member> | 4746 | </member> |
4406 | <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCountSubtract(System.Int32,System.Int32)"> | 4747 | <member name="T:HttpServer.Parser.HeaderEventArgs"> |
4407 | <summary> | 4748 | <summary> |
4408 | Environment.TickCount is an int but it counts all 32 bits so it goes positive | 4749 | Event arguments used when a new header have been parsed. |
4409 | and negative every 24.9 days. Subtracts the passed value (previously fetched by | ||
4410 | 'EnvironmentTickCount()') and accounts for any wrapping. | ||
4411 | </summary> | 4750 | </summary> |
4412 | <param name="newValue"></param> | ||
4413 | <param name="prevValue"></param> | ||
4414 | <returns>subtraction of passed prevValue from current Environment.TickCount</returns> | ||
4415 | </member> | 4751 | </member> |
4416 | <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCountAdd(System.Int32,System.Int32)"> | 4752 | <member name="M:HttpServer.Parser.HeaderEventArgs.#ctor(System.String,System.String)"> |
4417 | <summary> | 4753 | <summary> |
4418 | Environment.TickCount is an int but it counts all 32 bits so it goes positive | 4754 | Initializes a new instance of the <see cref="T:HttpServer.Parser.HeaderEventArgs"/> class. |
4419 | and negative every 24.9 days. Subtracts the passed value (previously fetched by | ||
4420 | 'EnvironmentTickCount()') and accounts for any wrapping. | ||
4421 | </summary> | 4755 | </summary> |
4422 | <param name="newValue"></param> | 4756 | <param name="name">Name of header.</param> |
4423 | <param name="prevValue"></param> | 4757 | <param name="value">Header value.</param> |
4424 | <returns>subtraction of passed prevValue from current Environment.TickCount</returns> | ||
4425 | </member> | 4758 | </member> |
4426 | <member name="M:HttpServer.ContextTimeoutManager.EnvironmentTickCountSubtract(System.Int32)"> | 4759 | <member name="M:HttpServer.Parser.HeaderEventArgs.#ctor"> |
4427 | <summary> | 4760 | <summary> |
4428 | Environment.TickCount is an int but it counts all 32 bits so it goes positive | 4761 | Initializes a new instance of the <see cref="T:HttpServer.Parser.HeaderEventArgs"/> class. |
4429 | and negative every 24.9 days. Subtracts the passed value (previously fetched by | ||
4430 | 'EnvironmentTickCount()') and accounts for any wrapping. | ||
4431 | </summary> | 4762 | </summary> |
4432 | <returns>subtraction of passed prevValue from current Environment.TickCount</returns> | ||
4433 | </member> | 4763 | </member> |
4434 | <member name="T:HttpServer.ContextTimeoutManager.MonitorType"> | 4764 | <member name="P:HttpServer.Parser.HeaderEventArgs.Name"> |
4435 | <summary> | 4765 | <summary> |
4436 | Use a Thread or a Timer to monitor the ugly | 4766 | Gets or sets header name. |
4437 | </summary> | 4767 | </summary> |
4438 | </member> | 4768 | </member> |
4439 | <member name="T:HttpServer.Sessions.MemorySessionStore"> | 4769 | <member name="P:HttpServer.Parser.HeaderEventArgs.Value"> |
4440 | <summary> | 4770 | <summary> |
4441 | Session store using memory for each session. | 4771 | Gets or sets header value. |
4442 | </summary> | 4772 | </summary> |
4443 | </member> | 4773 | </member> |
4444 | <member name="T:HttpServer.Sessions.IHttpSessionStore"> | 4774 | <member name="T:HttpServer.Parser.HttpRequestParser"> |
4445 | <summary> | 4775 | <summary> |
4446 | A session store is used to store and load sessions on a media. | 4776 | Parses a HTTP request directly from a stream |
4447 | The default implementation (<see cref="T:HttpServer.Sessions.MemorySessionStore"/>) saves/retrieves sessions from memory. | ||
4448 | </summary> | 4777 | </summary> |
4449 | </member> | 4778 | </member> |
4450 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Create"> | 4779 | <member name="M:HttpServer.Parser.HttpRequestParser.#ctor(HttpServer.ILogWriter)"> |
4451 | <summary> | 4780 | <summary> |
4452 | Creates a new http session with a generated id. | 4781 | Create a new request parser |
4453 | </summary> | 4782 | </summary> |
4454 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object</returns> | 4783 | <param name="logWriter">delegate receiving log entries.</param> |
4455 | </member> | 4784 | </member> |
4456 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Create(System.String)"> | 4785 | <member name="M:HttpServer.Parser.HttpRequestParser.AddToBody(System.Byte[],System.Int32,System.Int32)"> |
4457 | <summary> | 4786 | <summary> |
4458 | Creates a new http session with a specific id | 4787 | Add a number of bytes to the body |
4459 | </summary> | 4788 | </summary> |
4460 | <param name="id">Id used to identify the new cookie..</param> | 4789 | <param name="buffer">buffer containing more body bytes.</param> |
4461 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object.</returns> | 4790 | <param name="offset">starting offset in buffer</param> |
4462 | <remarks> | 4791 | <param name="count">number of bytes, from offset, to read.</param> |
4463 | Id should be generated by the store implementation if it's null or <see cref="F:System.String.Empty"/>. | 4792 | <returns>offset to continue from.</returns> |
4464 | </remarks> | ||
4465 | </member> | 4793 | </member> |
4466 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Load(System.String)"> | 4794 | <member name="M:HttpServer.Parser.HttpRequestParser.Clear"> |
4467 | <summary> | 4795 | <summary> |
4468 | Load an existing session. | 4796 | Remove all state information for the request. |
4469 | </summary> | 4797 | </summary> |
4470 | <param name="sessionId">Session id (usually retrieved from a client side cookie).</param> | ||
4471 | <returns>A session if found; otherwise null.</returns> | ||
4472 | </member> | 4798 | </member> |
4473 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Save(HttpServer.Sessions.IHttpSession)"> | 4799 | <member name="P:HttpServer.Parser.HttpRequestParser.LogWriter"> |
4474 | <summary> | 4800 | <summary> |
4475 | Save an updated session to the store. | 4801 | Gets or sets the log writer. |
4476 | </summary> | 4802 | </summary> |
4477 | <param name="session">Session id (usually retrieved from a client side cookie).</param> | ||
4478 | <exception cref="T:System.ArgumentException">If Id property have not been specified.</exception> | ||
4479 | </member> | 4803 | </member> |
4480 | <member name="M:HttpServer.Sessions.IHttpSessionStore.AddUnused(HttpServer.Sessions.IHttpSession)"> | 4804 | <member name="M:HttpServer.Parser.HttpRequestParser.OnFirstLine(System.String)"> |
4481 | <summary> | 4805 | <summary> |
4482 | We use the flyweight pattern which reuses small objects | 4806 | Parse request line |
4483 | instead of creating new each time. | ||
4484 | </summary> | 4807 | </summary> |
4485 | <param name="session">Unused session that should be reused next time Create is called.</param> | 4808 | <param name="value"></param> |
4809 | <exception cref="T:HttpServer.Exceptions.BadRequestException">If line is incorrect</exception> | ||
4810 | <remarks>Expects the following format: "Method SP Request-URI SP HTTP-Version CRLF"</remarks> | ||
4486 | </member> | 4811 | </member> |
4487 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Cleanup"> | 4812 | <member name="M:HttpServer.Parser.HttpRequestParser.OnHeader(System.String,System.String)"> |
4488 | <summary> | 4813 | <summary> |
4489 | Remove expired sessions | 4814 | We've parsed a new header. |
4490 | </summary> | 4815 | </summary> |
4816 | <param name="name">Name in lower case</param> | ||
4817 | <param name="value">Value, unmodified.</param> | ||
4818 | <exception cref="T:HttpServer.Exceptions.BadRequestException">If content length cannot be parsed.</exception> | ||
4491 | </member> | 4819 | </member> |
4492 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Remove(System.String)"> | 4820 | <member name="P:HttpServer.Parser.HttpRequestParser.CurrentState"> |
4493 | <summary> | 4821 | <summary> |
4494 | Remove a session | 4822 | Current state in parser. |
4495 | </summary> | 4823 | </summary> |
4496 | <param name="sessionId">id of the session.</param> | ||
4497 | </member> | 4824 | </member> |
4498 | <member name="P:HttpServer.Sessions.IHttpSessionStore.Item(System.String)"> | 4825 | <member name="M:HttpServer.Parser.HttpRequestParser.Parse(System.Byte[],System.Int32,System.Int32)"> |
4499 | <summary> | 4826 | <summary> |
4500 | Load a session from the store | 4827 | Parse a message |
4501 | </summary> | 4828 | </summary> |
4502 | <param name="sessionId"></param> | 4829 | <param name="buffer">bytes to parse.</param> |
4503 | <returns>null if session is not found.</returns> | 4830 | <param name="offset">where in buffer that parsing should start</param> |
4831 | <param name="count">number of bytes to parse, starting on <paramref name="offset"/>.</param> | ||
4832 | <returns>offset (where to start parsing next).</returns> | ||
4833 | <exception cref="T:HttpServer.Exceptions.BadRequestException"><c>BadRequestException</c>.</exception> | ||
4504 | </member> | 4834 | </member> |
4505 | <member name="P:HttpServer.Sessions.IHttpSessionStore.ExpireTime"> | 4835 | <member name="E:HttpServer.Parser.HttpRequestParser.RequestCompleted"> |
4506 | <summary> | 4836 | <summary> |
4507 | Number of minutes before a session expires. | 4837 | A request have been successfully parsed. |
4508 | </summary> | 4838 | </summary> |
4509 | <value>Default time is 20 minutes.</value> | ||
4510 | </member> | 4839 | </member> |
4511 | <member name="M:HttpServer.Sessions.MemorySessionStore.#ctor"> | 4840 | <member name="E:HttpServer.Parser.HttpRequestParser.BodyBytesReceived"> |
4512 | <summary> | 4841 | <summary> |
4513 | Initializes the class setting the expirationtimer to clean the session every minute | 4842 | More body bytes have been received. |
4514 | </summary> | 4843 | </summary> |
4515 | </member> | 4844 | </member> |
4516 | <member name="M:HttpServer.Sessions.MemorySessionStore.Cleanup(System.Object)"> | 4845 | <member name="E:HttpServer.Parser.HttpRequestParser.RequestLineReceived"> |
4517 | <summary> | 4846 | <summary> |
4518 | Delegate for the cleanup timer | 4847 | Request line have been received. |
4519 | </summary> | 4848 | </summary> |
4520 | </member> | 4849 | </member> |
4521 | <member name="M:HttpServer.Sessions.MemorySessionStore.Create"> | 4850 | <member name="E:HttpServer.Parser.HttpRequestParser.HeaderReceived"> |
4522 | <summary> | 4851 | <summary> |
4523 | Creates a new http session | 4852 | A header have been received. |
4524 | </summary> | 4853 | </summary> |
4525 | <returns></returns> | ||
4526 | </member> | 4854 | </member> |
4527 | <member name="M:HttpServer.Sessions.MemorySessionStore.Create(System.String)"> | 4855 | <member name="T:HttpServer.Parser.RequestLineEventArgs"> |
4528 | <summary> | 4856 | <summary> |
4529 | Creates a new http session with a specific id | 4857 | Used when the request line have been successfully parsed. |
4530 | </summary> | 4858 | </summary> |
4531 | <param name="id">Id used to identify the new cookie..</param> | ||
4532 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object.</returns> | ||
4533 | <remarks> | ||
4534 | Id should be generated by the store implementation if it's null or <see cref="F:System.String.Empty"/>. | ||
4535 | </remarks> | ||
4536 | </member> | 4859 | </member> |
4537 | <member name="M:HttpServer.Sessions.MemorySessionStore.Load(System.String)"> | 4860 | <member name="M:HttpServer.Parser.RequestLineEventArgs.#ctor(System.String,System.String,System.String)"> |
4538 | <summary> | 4861 | <summary> |
4539 | Load an existing session. | 4862 | Initializes a new instance of the <see cref="T:HttpServer.Parser.RequestLineEventArgs"/> class. |
4540 | </summary> | 4863 | </summary> |
4541 | <param name="sessionId"></param> | 4864 | <param name="httpMethod">The HTTP method.</param> |
4542 | <returns></returns> | 4865 | <param name="uriPath">The URI path.</param> |
4866 | <param name="httpVersion">The HTTP version.</param> | ||
4543 | </member> | 4867 | </member> |
4544 | <member name="M:HttpServer.Sessions.MemorySessionStore.Save(HttpServer.Sessions.IHttpSession)"> | 4868 | <member name="M:HttpServer.Parser.RequestLineEventArgs.#ctor"> |
4545 | <summary> | 4869 | <summary> |
4546 | Save an updated session to the store. | 4870 | Initializes a new instance of the <see cref="T:HttpServer.Parser.RequestLineEventArgs"/> class. |
4547 | </summary> | 4871 | </summary> |
4548 | <param name="session"></param> | ||
4549 | </member> | 4872 | </member> |
4550 | <member name="M:HttpServer.Sessions.MemorySessionStore.AddUnused(HttpServer.Sessions.IHttpSession)"> | 4873 | <member name="P:HttpServer.Parser.RequestLineEventArgs.HttpMethod"> |
4551 | <summary> | 4874 | <summary> |
4552 | We use the flyweight pattern which reuses small objects | 4875 | Gets or sets http method. |
4553 | instead of creating new each time. | ||
4554 | </summary> | 4876 | </summary> |
4555 | <param name="session">EmptyLanguageNode (unused) session that should be reused next time Create is called.</param> | 4877 | <remarks> |
4878 | Should be one of the methods declared in <see cref="T:HttpServer.Method"/>. | ||
4879 | </remarks> | ||
4556 | </member> | 4880 | </member> |
4557 | <member name="M:HttpServer.Sessions.MemorySessionStore.Cleanup"> | 4881 | <member name="P:HttpServer.Parser.RequestLineEventArgs.HttpVersion"> |
4558 | <summary> | 4882 | <summary> |
4559 | Remove expired sessions | 4883 | Gets or sets the version of the HTTP protocol that the client want to use. |
4560 | </summary> | 4884 | </summary> |
4561 | </member> | 4885 | </member> |
4562 | <member name="M:HttpServer.Sessions.MemorySessionStore.Remove(System.String)"> | 4886 | <member name="P:HttpServer.Parser.RequestLineEventArgs.UriPath"> |
4563 | <summary> | 4887 | <summary> |
4564 | Remove a session | 4888 | Gets or sets requested URI path. |
4565 | </summary> | 4889 | </summary> |
4566 | <param name="sessionId">id of the session.</param> | ||
4567 | </member> | 4890 | </member> |
4568 | <member name="P:HttpServer.Sessions.MemorySessionStore.Item(System.String)"> | 4891 | <member name="T:HttpServer.RequestParserFactory"> |
4569 | <summary> | 4892 | <summary> |
4570 | Load a session from the store | 4893 | Creates request parsers when needed. |
4571 | </summary> | 4894 | </summary> |
4572 | <param name="sessionId"></param> | ||
4573 | <returns>null if session is not found.</returns> | ||
4574 | </member> | 4895 | </member> |
4575 | <member name="P:HttpServer.Sessions.MemorySessionStore.ExpireTime"> | 4896 | <member name="M:HttpServer.RequestParserFactory.CreateParser(HttpServer.ILogWriter)"> |
4576 | <summary> | 4897 | <summary> |
4577 | Number of minutes before a session expires. | 4898 | Create a new request parser. |
4578 | Default is 20 minutes. | ||
4579 | </summary> | 4899 | </summary> |
4900 | <param name="logWriter">Used when logging should be enabled.</param> | ||
4901 | <returns>A new request parser.</returns> | ||
4580 | </member> | 4902 | </member> |
4581 | <member name="T:HttpServer.Sessions.HttpSessionClearedArgs"> | 4903 | <member name="T:HttpServer.IRequestParserFactory"> |
4582 | <summary> | 4904 | <summary> |
4583 | Arguments sent when a <see cref="T:HttpServer.Sessions.IHttpSession"/> is cleared | 4905 | Creates request parsers when needed. |
4584 | </summary> | 4906 | </summary> |
4585 | </member> | 4907 | </member> |
4586 | <member name="M:HttpServer.Sessions.HttpSessionClearedArgs.#ctor(System.Boolean)"> | 4908 | <member name="M:HttpServer.IRequestParserFactory.CreateParser(HttpServer.ILogWriter)"> |
4587 | <summary> | 4909 | <summary> |
4588 | Instantiates the arguments for the event | 4910 | Create a new request parser. |
4589 | </summary> | 4911 | </summary> |
4590 | <param name="expired">True if the session is cleared due to expiration</param> | 4912 | <param name="logWriter">Used when logging should be enabled.</param> |
4913 | <returns>A new request parser.</returns> | ||
4591 | </member> | 4914 | </member> |
4592 | <member name="P:HttpServer.Sessions.HttpSessionClearedArgs.Expired"> | 4915 | <member name="T:HttpServer.RequestCookie"> |
4593 | <summary> | 4916 | <summary> |
4594 | Returns true if the session is cleared due to expiration | 4917 | cookie sent by the client/browser |
4595 | </summary> | 4918 | </summary> |
4919 | <seealso cref="T:HttpServer.ResponseCookie"/> | ||
4596 | </member> | 4920 | </member> |
4597 | <member name="T:HttpServer.Sessions.HttpSessionClearedHandler"> | 4921 | <member name="M:HttpServer.RequestCookie.#ctor(System.String,System.String)"> |
4598 | <summary> | 4922 | <summary> |
4599 | Delegate for when a IHttpSession is cleared | 4923 | Constructor. |
4600 | </summary> | 4924 | </summary> |
4601 | <param name="session"><see cref="T:HttpServer.Sessions.IHttpSession"/> this is being cleared.</param> | 4925 | <param name="id">cookie identifier</param> |
4602 | <param name="args">Arguments for the clearing</param> | 4926 | <param name="content">cookie content</param> |
4927 | <exception cref="T:System.ArgumentNullException">id or content is null</exception> | ||
4928 | <exception cref="T:System.ArgumentException">id is empty</exception> | ||
4603 | </member> | 4929 | </member> |
4604 | <member name="T:HttpServer.RequestQueue"> | 4930 | <member name="M:HttpServer.RequestCookie.ToString"> |
4605 | <summary> | 4931 | <summary> |
4606 | Used to queue incoming requests. | 4932 | Gets the cookie HTML representation. |
4607 | </summary> | 4933 | </summary> |
4934 | <returns>cookie string</returns> | ||
4608 | </member> | 4935 | </member> |
4609 | <member name="M:HttpServer.RequestQueue.#ctor(HttpServer.ProcessRequestHandler)"> | 4936 | <member name="P:HttpServer.RequestCookie.Name"> |
4610 | <summary> | 4937 | <summary> |
4611 | Initializes a new instance of the <see cref="T:HttpServer.RequestQueue"/> class. | 4938 | Gets the cookie identifier. |
4612 | </summary> | 4939 | </summary> |
4613 | <param name="handler">Called when a request should be processed.</param> | ||
4614 | </member> | 4940 | </member> |
4615 | <member name="M:HttpServer.RequestQueue.QueueThread"> | 4941 | <member name="P:HttpServer.RequestCookie.Value"> |
4616 | <summary> | 4942 | <summary> |
4617 | Used to process queued requests. | 4943 | Cookie value. Set to null to remove cookie. |
4618 | </summary> | 4944 | </summary> |
4619 | </member> | 4945 | </member> |
4620 | <member name="P:HttpServer.RequestQueue.MaxRequestCount"> | 4946 | <member name="T:HttpServer.RequestCookies"> |
4621 | <summary> | 4947 | <summary> |
4622 | Gets or sets maximum number of allowed simultaneous requests. | 4948 | This class is created as a wrapper, since there are two different cookie types in .Net (Cookie and HttpCookie). |
4949 | The framework might switch class in the future and we dont want to have to replace all instances | ||
4623 | </summary> | 4950 | </summary> |
4624 | </member> | 4951 | </member> |
4625 | <member name="P:HttpServer.RequestQueue.MaxQueueSize"> | 4952 | <member name="M:HttpServer.RequestCookies.#ctor(System.String)"> |
4626 | <summary> | 4953 | <summary> |
4627 | Gets or sets maximum number of requests queuing to be handled. | 4954 | Let's copy all the cookies. |
4628 | </summary> | 4955 | </summary> |
4956 | <param name="cookies">value from cookie header.</param> | ||
4629 | </member> | 4957 | </member> |
4630 | <member name="P:HttpServer.RequestQueue.CurrentRequestCount"> | 4958 | <member name="M:HttpServer.RequestCookies.Add(HttpServer.RequestCookie)"> |
4631 | <summary> | 4959 | <summary> |
4632 | Specifies how many requests the HTTP server is currently processing. | 4960 | Adds a cookie in the collection. |
4633 | </summary> | 4961 | </summary> |
4962 | <param name="cookie">cookie to add</param> | ||
4963 | <exception cref="T:System.ArgumentNullException">cookie is null</exception> | ||
4634 | </member> | 4964 | </member> |
4635 | <member name="T:HttpServer.RequestQueue.QueueItem"> | 4965 | <member name="P:HttpServer.RequestCookies.Count"> |
4636 | <summary> | 4966 | <summary> |
4637 | Used two queue incoming requests to avoid | 4967 | Gets the count of cookies in the collection. |
4638 | thread starvation. | ||
4639 | </summary> | 4968 | </summary> |
4640 | </member> | 4969 | </member> |
4641 | <member name="T:HttpServer.ProcessRequestHandler"> | 4970 | <member name="P:HttpServer.RequestCookies.Item(System.String)"> |
4642 | <summary> | 4971 | <summary> |
4643 | Method used to process a queued request | 4972 | Gets the cookie of a given identifier (null if not existing). |
4644 | </summary> | 4973 | </summary> |
4645 | <param name="context">Context that the request was received from.</param> | ||
4646 | <param name="request">Request to process.</param> | ||
4647 | </member> | 4974 | </member> |
4648 | <member name="T:HttpServer.Parser.HeaderEventArgs"> | 4975 | <member name="M:HttpServer.RequestCookies.GetEnumerator"> |
4649 | <summary> | 4976 | <summary> |
4650 | Event arguments used when a new header have been parsed. | 4977 | Gets a collection enumerator on the cookie list. |
4651 | </summary> | 4978 | </summary> |
4979 | <returns>collection enumerator</returns> | ||
4652 | </member> | 4980 | </member> |
4653 | <member name="M:HttpServer.Parser.HeaderEventArgs.#ctor(System.String,System.String)"> | 4981 | <member name="M:HttpServer.RequestCookies.Clear"> |
4654 | <summary> | 4982 | <summary> |
4655 | Initializes a new instance of the <see cref="T:HttpServer.Parser.HeaderEventArgs"/> class. | 4983 | Remove all cookies. |
4656 | </summary> | 4984 | </summary> |
4657 | <param name="name">Name of header.</param> | ||
4658 | <param name="value">Header value.</param> | ||
4659 | </member> | 4985 | </member> |
4660 | <member name="M:HttpServer.Parser.HeaderEventArgs.#ctor"> | 4986 | <member name="M:HttpServer.RequestCookies.System#Collections#Generic#IEnumerable{HttpServer#RequestCookie}#GetEnumerator"> |
4661 | <summary> | 4987 | <summary> |
4662 | Initializes a new instance of the <see cref="T:HttpServer.Parser.HeaderEventArgs"/> class. | 4988 | Returns an enumerator that iterates through the collection. |
4663 | </summary> | 4989 | </summary> |
4990 | |||
4991 | <returns> | ||
4992 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | ||
4993 | </returns> | ||
4994 | <filterpriority>1</filterpriority> | ||
4664 | </member> | 4995 | </member> |
4665 | <member name="P:HttpServer.Parser.HeaderEventArgs.Name"> | 4996 | <member name="M:HttpServer.RequestCookies.Remove(System.String)"> |
4666 | <summary> | 4997 | <summary> |
4667 | Gets or sets header name. | 4998 | Remove a cookie from the collection. |
4668 | </summary> | 4999 | </summary> |
5000 | <param name="cookieName">Name of cookie.</param> | ||
4669 | </member> | 5001 | </member> |
4670 | <member name="P:HttpServer.Parser.HeaderEventArgs.Value"> | 5002 | <member name="T:HttpServer.RequestQueue"> |
4671 | <summary> | 5003 | <summary> |
4672 | Gets or sets header value. | 5004 | Used to queue incoming requests. |
4673 | </summary> | 5005 | </summary> |
4674 | </member> | 5006 | </member> |
4675 | <member name="T:HttpServer.HttpRequest"> | 5007 | <member name="M:HttpServer.RequestQueue.#ctor(HttpServer.ProcessRequestHandler)"> |
4676 | <summary> | 5008 | <summary> |
4677 | Contains server side HTTP request information. | 5009 | Initializes a new instance of the <see cref="T:HttpServer.RequestQueue"/> class. |
4678 | </summary> | 5010 | </summary> |
5011 | <param name="handler">Called when a request should be processed.</param> | ||
4679 | </member> | 5012 | </member> |
4680 | <member name="F:HttpServer.HttpRequest.UriSplitters"> | 5013 | <member name="T:HttpServer.RequestQueue.QueueItem"> |
4681 | <summary> | 5014 | <summary> |
4682 | Chars used to split an URL path into multiple parts. | 5015 | Used two queue incoming requests to avoid |
5016 | thread starvation. | ||
4683 | </summary> | 5017 | </summary> |
4684 | </member> | 5018 | </member> |
4685 | <member name="M:HttpServer.HttpRequest.AssignForm(HttpServer.HttpForm)"> | 5019 | <member name="P:HttpServer.RequestQueue.MaxRequestCount"> |
4686 | <summary> | 5020 | <summary> |
4687 | Assign a form. | 5021 | Gets or sets maximum number of allowed simultaneous requests. |
4688 | </summary> | 5022 | </summary> |
4689 | <param name="form"></param> | ||
4690 | </member> | 5023 | </member> |
4691 | <member name="M:HttpServer.HttpRequest.Clone"> | 5024 | <member name="P:HttpServer.RequestQueue.MaxQueueSize"> |
4692 | <summary> | 5025 | <summary> |
4693 | Creates a new object that is a copy of the current instance. | 5026 | Gets or sets maximum number of requests queuing to be handled. |
4694 | </summary> | 5027 | </summary> |
4695 | |||
4696 | <returns> | ||
4697 | A new object that is a copy of this instance. | ||
4698 | </returns> | ||
4699 | <filterpriority>2</filterpriority> | ||
4700 | </member> | 5028 | </member> |
4701 | <member name="M:HttpServer.HttpRequest.DecodeBody(HttpServer.FormDecoders.FormDecoderProvider)"> | 5029 | <member name="P:HttpServer.RequestQueue.CurrentRequestCount"> |
4702 | <summary> | 5030 | <summary> |
4703 | Decode body into a form. | 5031 | Specifies how many requests the HTTP server is currently processing. |
4704 | </summary> | 5032 | </summary> |
4705 | <param name="providers">A list with form decoders.</param> | ||
4706 | <exception cref="T:System.IO.InvalidDataException">If body contents is not valid for the chosen decoder.</exception> | ||
4707 | <exception cref="T:System.InvalidOperationException">If body is still being transferred.</exception> | ||
4708 | </member> | 5033 | </member> |
4709 | <member name="M:HttpServer.HttpRequest.SetCookies(HttpServer.RequestCookies)"> | 5034 | <member name="M:HttpServer.RequestQueue.QueueThread"> |
4710 | <summary> | 5035 | <summary> |
4711 | Cookies | 5036 | Used to process queued requests. |
4712 | </summary> | 5037 | </summary> |
4713 | <param name="cookies">the cookies</param> | ||
4714 | </member> | 5038 | </member> |
4715 | <member name="M:HttpServer.HttpRequest.CreateResponse(HttpServer.IHttpClientContext)"> | 5039 | <member name="T:HttpServer.ProcessRequestHandler"> |
4716 | <summary> | 5040 | <summary> |
4717 | Create a response object. | 5041 | Method used to process a queued request |
4718 | </summary> | 5042 | </summary> |
4719 | <returns>A new <see cref="T:HttpServer.IHttpResponse"/>.</returns> | 5043 | <param name="context">Context that the request was received from.</param> |
5044 | <param name="request">Request to process.</param> | ||
4720 | </member> | 5045 | </member> |
4721 | <member name="M:HttpServer.HttpRequest.AddHeader(System.String,System.String)"> | 5046 | <member name="T:HttpServer.ResponseCookie"> |
4722 | <summary> | 5047 | <summary> |
4723 | Called during parsing of a <see cref="T:HttpServer.IHttpRequest"/>. | 5048 | cookie being sent back to the browser. |
4724 | </summary> | 5049 | </summary> |
4725 | <param name="name">Name of the header, should not be URL encoded</param> | 5050 | <seealso cref="T:HttpServer.ResponseCookie"/> |
4726 | <param name="value">Value of the header, should not be URL encoded</param> | ||
4727 | <exception cref="T:HttpServer.Exceptions.BadRequestException">If a header is incorrect.</exception> | ||
4728 | </member> | 5051 | </member> |
4729 | <member name="M:HttpServer.HttpRequest.AddToBody(System.Byte[],System.Int32,System.Int32)"> | 5052 | <member name="M:HttpServer.ResponseCookie.#ctor(System.String,System.String,System.DateTime)"> |
4730 | <summary> | 5053 | <summary> |
4731 | Add bytes to the body | 5054 | Constructor. |
4732 | </summary> | 5055 | </summary> |
4733 | <param name="bytes">buffer to read bytes from</param> | 5056 | <param name="id">cookie identifier</param> |
4734 | <param name="offset">where to start read</param> | 5057 | <param name="content">cookie content</param> |
4735 | <param name="length">number of bytes to read</param> | 5058 | <param name="expiresAt">cookie expiration date. Use DateTime.MinValue for session cookie.</param> |
4736 | <returns>Number of bytes actually read (same as length unless we got all body bytes).</returns> | 5059 | <exception cref="T:System.ArgumentNullException">id or content is null</exception> |
4737 | <exception cref="T:System.InvalidOperationException">If body is not writable</exception> | 5060 | <exception cref="T:System.ArgumentException">id is empty</exception> |
4738 | <exception cref="T:System.ArgumentNullException"><c>bytes</c> is null.</exception> | ||
4739 | <exception cref="T:System.ArgumentOutOfRangeException"><c>offset</c> is out of range.</exception> | ||
4740 | </member> | 5061 | </member> |
4741 | <member name="M:HttpServer.HttpRequest.Clear"> | 5062 | <member name="M:HttpServer.ResponseCookie.#ctor(System.String,System.String,System.DateTime,System.String,System.String)"> |
4742 | <summary> | 5063 | <summary> |
4743 | Clear everything in the request | 5064 | Create a new cookie |
4744 | </summary> | 5065 | </summary> |
5066 | <param name="name">name identifying the cookie</param> | ||
5067 | <param name="value">cookie value</param> | ||
5068 | <param name="expires">when the cookie expires. Setting DateTime.MinValue will delete the cookie when the session is closed.</param> | ||
5069 | <param name="path">Path to where the cookie is valid</param> | ||
5070 | <param name="domain">Domain that the cookie is valid for.</param> | ||
4745 | </member> | 5071 | </member> |
4746 | <member name="P:HttpServer.HttpRequest.Secure"> | 5072 | <member name="M:HttpServer.ResponseCookie.#ctor(HttpServer.RequestCookie,System.DateTime)"> |
4747 | <summary> | 5073 | <summary> |
4748 | Gets or sets a value indicating whether this <see cref="T:HttpServer.HttpRequest"/> is secure. | 5074 | Create a new cookie |
4749 | </summary> | 5075 | </summary> |
5076 | <param name="cookie">Name and value will be used</param> | ||
5077 | <param name="expires">when the cookie expires.</param> | ||
4750 | </member> | 5078 | </member> |
4751 | <member name="P:HttpServer.HttpRequest.UriPath"> | 5079 | <member name="M:HttpServer.ResponseCookie.ToString"> |
4752 | <summary> | 5080 | <summary> |
4753 | Path and query (will be merged with the host header) and put in Uri | 5081 | Gets the cookie HTML representation. |
4754 | </summary> | 5082 | </summary> |
4755 | <see cref="P:HttpServer.HttpRequest.Uri"/> | 5083 | <returns>cookie string</returns> |
4756 | </member> | 5084 | </member> |
4757 | <member name="P:HttpServer.HttpRequest.BodyIsComplete"> | 5085 | <member name="P:HttpServer.ResponseCookie.Expires"> |
4758 | <summary> | 5086 | <summary> |
4759 | Gets whether the body is complete. | 5087 | When the cookie expires. |
5088 | DateTime.MinValue means that the cookie expires when the session do so. | ||
4760 | </summary> | 5089 | </summary> |
4761 | </member> | 5090 | </member> |
4762 | <member name="P:HttpServer.HttpRequest.AcceptTypes"> | 5091 | <member name="P:HttpServer.ResponseCookie.Path"> |
4763 | <summary> | 5092 | <summary> |
4764 | Gets kind of types accepted by the client. | 5093 | Cookie is only valid under this path. |
4765 | </summary> | 5094 | </summary> |
4766 | </member> | 5095 | </member> |
4767 | <member name="P:HttpServer.HttpRequest.Body"> | 5096 | <member name="T:HttpServer.ResponseCookies"> |
4768 | <summary> | 5097 | <summary> |
4769 | Gets or sets body stream. | 5098 | Cookies that should be set. |
4770 | </summary> | 5099 | </summary> |
4771 | </member> | 5100 | </member> |
4772 | <member name="P:HttpServer.HttpRequest.Connection"> | 5101 | <member name="M:HttpServer.ResponseCookies.Add(HttpServer.ResponseCookie)"> |
4773 | <summary> | 5102 | <summary> |
4774 | Gets or sets kind of connection used for the session. | 5103 | Adds a cookie in the collection. |
4775 | </summary> | 5104 | </summary> |
5105 | <param name="cookie">cookie to add</param> | ||
5106 | <exception cref="T:System.ArgumentNullException">cookie is null</exception> | ||
4776 | </member> | 5107 | </member> |
4777 | <member name="P:HttpServer.HttpRequest.ContentLength"> | 5108 | <member name="M:HttpServer.ResponseCookies.Add(HttpServer.RequestCookie,System.DateTime)"> |
4778 | <summary> | 5109 | <summary> |
4779 | Gets or sets number of bytes in the body. | 5110 | Copy a request cookie |
4780 | </summary> | 5111 | </summary> |
5112 | <param name="cookie"></param> | ||
5113 | <param name="expires">When the cookie should expire</param> | ||
4781 | </member> | 5114 | </member> |
4782 | <member name="P:HttpServer.HttpRequest.Headers"> | 5115 | <member name="P:HttpServer.ResponseCookies.Count"> |
4783 | <summary> | 5116 | <summary> |
4784 | Gets headers sent by the client. | 5117 | Gets the count of cookies in the collection. |
4785 | </summary> | 5118 | </summary> |
4786 | </member> | 5119 | </member> |
4787 | <member name="P:HttpServer.HttpRequest.HttpVersion"> | 5120 | <member name="P:HttpServer.ResponseCookies.Item(System.String)"> |
4788 | <summary> | 5121 | <summary> |
4789 | Gets or sets version of HTTP protocol that's used. | 5122 | Gets the cookie of a given identifier (null if not existing). |
4790 | </summary> | 5123 | </summary> |
4791 | <remarks> | ||
4792 | Probably <see cref="F:HttpServer.HttpHelper.HTTP10"/> or <see cref="F:HttpServer.HttpHelper.HTTP11"/>. | ||
4793 | </remarks> | ||
4794 | <seealso cref="T:HttpServer.HttpHelper"/> | ||
4795 | </member> | 5124 | </member> |
4796 | <member name="P:HttpServer.HttpRequest.Method"> | 5125 | <member name="M:HttpServer.ResponseCookies.GetEnumerator"> |
4797 | <summary> | 5126 | <summary> |
4798 | Gets or sets requested method. | 5127 | Gets a collection enumerator on the cookie list. |
4799 | </summary> | 5128 | </summary> |
4800 | <value></value> | 5129 | <returns>collection enumerator</returns> |
4801 | <remarks> | ||
4802 | Will always be in upper case. | ||
4803 | </remarks> | ||
4804 | <see cref="!:HttpServer.Method"/> | ||
4805 | </member> | 5130 | </member> |
4806 | <member name="P:HttpServer.HttpRequest.QueryString"> | 5131 | <member name="M:HttpServer.ResponseCookies.Clear"> |
4807 | <summary> | 5132 | <summary> |
4808 | Gets variables sent in the query string | 5133 | Remove all cookies |
4809 | </summary> | 5134 | </summary> |
4810 | </member> | 5135 | </member> |
4811 | <member name="P:HttpServer.HttpRequest.Uri"> | 5136 | <member name="M:HttpServer.ResponseCookies.System#Collections#Generic#IEnumerable{HttpServer#ResponseCookie}#GetEnumerator"> |
4812 | <summary> | 5137 | <summary> |
4813 | Gets or sets requested URI. | 5138 | Returns an enumerator that iterates through the collection. |
4814 | </summary> | 5139 | </summary> |
5140 | |||
5141 | <returns> | ||
5142 | A <see cref="T:System.Collections.Generic.IEnumerator`1"></see> that can be used to iterate through the collection. | ||
5143 | </returns> | ||
5144 | <filterpriority>1</filterpriority> | ||
4815 | </member> | 5145 | </member> |
4816 | <member name="P:HttpServer.HttpRequest.UriParts"> | 5146 | <member name="T:HttpServer.Rules.IRule"> |
4817 | <summary> | 5147 | <summary> |
4818 | Uri absolute path splitted into parts. | 5148 | Rules are used to perform operations before a request is being handled. |
5149 | Rules can be used to create routing etc. | ||
4819 | </summary> | 5150 | </summary> |
4820 | <example> | 5151 | </member> |
4821 | // uri is: http://gauffin.com/code/tiny/ | 5152 | <member name="M:HttpServer.Rules.IRule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse)"> |
4822 | Console.WriteLine(request.UriParts[0]); // result: code | 5153 | <summary> |
4823 | Console.WriteLine(request.UriParts[1]); // result: tiny | 5154 | Process the incoming request. |
4824 | </example> | 5155 | </summary> |
5156 | <param name="request">incoming HTTP request</param> | ||
5157 | <param name="response">outgoing HTTP response</param> | ||
5158 | <returns>true if response should be sent to the browser directly (no other rules or modules will be processed).</returns> | ||
4825 | <remarks> | 5159 | <remarks> |
4826 | If you're using controllers than the first part is controller name, | 5160 | returning true means that no modules will get the request. Returning true is typically being done |
4827 | the second part is method name and the third part is Id property. | 5161 | for redirects. |
4828 | </remarks> | 5162 | </remarks> |
4829 | <seealso cref="P:HttpServer.HttpRequest.Uri"/> | 5163 | <exception cref="T:System.ArgumentNullException">If request or response is null.</exception> |
4830 | </member> | 5164 | </member> |
4831 | <member name="P:HttpServer.HttpRequest.Param"> | 5165 | <member name="T:HttpServer.Rules.RedirectRule"> |
4832 | <summary> | 5166 | <summary> |
4833 | Gets parameter from <see cref="P:HttpServer.HttpRequest.QueryString"/> or <see cref="P:HttpServer.HttpRequest.Form"/>. | 5167 | redirects from one URL to another. |
4834 | </summary> | 5168 | </summary> |
4835 | </member> | 5169 | </member> |
4836 | <member name="P:HttpServer.HttpRequest.Form"> | 5170 | <member name="M:HttpServer.Rules.RedirectRule.#ctor(System.String,System.String)"> |
4837 | <summary> | 5171 | <summary> |
4838 | Gets form parameters. | 5172 | Initializes a new instance of the <see cref="T:HttpServer.Rules.RedirectRule"/> class. |
4839 | </summary> | 5173 | </summary> |
5174 | <param name="fromUrl">Absolute path (no server name)</param> | ||
5175 | <param name="toUrl">Absolute path (no server name)</param> | ||
5176 | <example> | ||
5177 | server.Add(new RedirectRule("/", "/user/index")); | ||
5178 | </example> | ||
4840 | </member> | 5179 | </member> |
4841 | <member name="P:HttpServer.HttpRequest.IsAjax"> | 5180 | <member name="M:HttpServer.Rules.RedirectRule.#ctor(System.String,System.String,System.Boolean)"> |
4842 | <summary> | 5181 | <summary> |
4843 | Gets whether the request was made by Ajax (Asynchronous JavaScript) | 5182 | Initializes a new instance of the <see cref="T:HttpServer.Rules.RedirectRule"/> class. |
4844 | </summary> | 5183 | </summary> |
5184 | <param name="fromUrl">Absolute path (no server name)</param> | ||
5185 | <param name="toUrl">Absolute path (no server name)</param> | ||
5186 | <param name="shouldRedirect">true if request should be redirected, false if the request URI should be replaced.</param> | ||
5187 | <example> | ||
5188 | server.Add(new RedirectRule("/", "/user/index")); | ||
5189 | </example> | ||
4845 | </member> | 5190 | </member> |
4846 | <member name="P:HttpServer.HttpRequest.Cookies"> | 5191 | <member name="P:HttpServer.Rules.RedirectRule.FromUrl"> |
4847 | <summary> | 5192 | <summary> |
4848 | Gets cookies that was sent with the request. | 5193 | Gets string to match request URI with. |
4849 | </summary> | 5194 | </summary> |
5195 | <remarks>Is compared to request.Uri.AbsolutePath</remarks> | ||
4850 | </member> | 5196 | </member> |
4851 | <member name="M:HttpServer.ComponentProvider.AddInstance``1(System.Object)"> | 5197 | <member name="P:HttpServer.Rules.RedirectRule.ToUrl"> |
4852 | <summary> | 5198 | <summary> |
4853 | Add a component instance | 5199 | Gets where to redirect. |
4854 | </summary> | 5200 | </summary> |
4855 | <typeparam name="T">Interface type</typeparam> | ||
4856 | <param name="instance">Instance to add</param> | ||
4857 | </member> | 5201 | </member> |
4858 | <member name="M:HttpServer.ComponentProvider.Get``1"> | 5202 | <member name="P:HttpServer.Rules.RedirectRule.ShouldRedirect"> |
4859 | <summary> | 5203 | <summary> |
4860 | Get a component. | 5204 | Gets whether server should redirect client. |
4861 | </summary> | 5205 | </summary> |
4862 | <typeparam name="T">Interface type</typeparam> | ||
4863 | <returns>Component if registered, otherwise null.</returns> | ||
4864 | <remarks> | 5206 | <remarks> |
4865 | Component will get created if needed. | 5207 | <c>false</c> means that the rule will replace |
5208 | the current request URI with the new one from this class. | ||
5209 | <c>true</c> means that a redirect response is sent to the client. | ||
4866 | </remarks> | 5210 | </remarks> |
4867 | </member> | 5211 | </member> |
4868 | <member name="M:HttpServer.ComponentProvider.Create(HttpServer.ComponentProvider.TypeInformation)"> | 5212 | <member name="M:HttpServer.Rules.RedirectRule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse)"> |
4869 | <exception cref="T:System.InvalidOperationException">If instance cannot be created.</exception> | ||
4870 | </member> | ||
4871 | <member name="M:HttpServer.ComponentProvider.Contains(System.Type)"> | ||
4872 | <summary> | ||
4873 | Checks if the specified component interface have been added. | ||
4874 | </summary> | ||
4875 | <param name="interfaceType"></param> | ||
4876 | <returns>true if found; otherwise false.</returns> | ||
4877 | </member> | ||
4878 | <member name="M:HttpServer.ComponentProvider.Add``2"> | ||
4879 | <summary> | 5213 | <summary> |
4880 | Add a component. | 5214 | Process the incoming request. |
4881 | </summary> | 5215 | </summary> |
4882 | <typeparam name="InterfaceType">Type being requested.</typeparam> | 5216 | <param name="request">incoming HTTP request</param> |
4883 | <typeparam name="InstanceType">Type being created.</typeparam> | 5217 | <param name="response">outgoing HTTP response</param> |
4884 | <exception cref="T:System.InvalidOperationException">Type have already been mapped.</exception> | 5218 | <returns>true if response should be sent to the browser directly (no other rules or modules will be processed).</returns> |
5219 | <remarks> | ||
5220 | returning true means that no modules will get the request. Returning true is typically being done | ||
5221 | for redirects. | ||
5222 | </remarks> | ||
4885 | </member> | 5223 | </member> |
4886 | <member name="T:HttpServer.Rules.RegexRedirectRule"> | 5224 | <member name="T:HttpServer.Rules.RegexRedirectRule"> |
4887 | <summary> | 5225 | <summary> |
@@ -4951,624 +5289,286 @@ | |||
4951 | </remarks> | 5289 | </remarks> |
4952 | <exception cref="T:System.ArgumentNullException">If request or response is null</exception> | 5290 | <exception cref="T:System.ArgumentNullException">If request or response is null</exception> |
4953 | </member> | 5291 | </member> |
4954 | <member name="T:HttpServer.Helpers.ResourceInfo"> | 5292 | <member name="T:HttpServer.Sessions.IHttpSession"> |
4955 | <summary> | ||
4956 | Container to bind resource names to assemblies | ||
4957 | </summary> | ||
4958 | </member> | ||
4959 | <member name="M:HttpServer.Helpers.ResourceInfo.#ctor(System.String,System.String,System.Reflection.Assembly)"> | ||
4960 | <summary> | ||
4961 | Instantiates an instance of <see cref="T:HttpServer.Helpers.ResourceInfo"/> | ||
4962 | </summary> | ||
4963 | <param name="uri">The dot seperated uri the resource maps to</param> | ||
4964 | <param name="resourceName">The full resource name</param> | ||
4965 | <param name="assembly">The assembly the resource exists in</param> | ||
4966 | </member> | ||
4967 | <member name="M:HttpServer.Helpers.ResourceInfo.GetStream"> | ||
4968 | <summary> | ||
4969 | Retrieves a stream to the resource | ||
4970 | </summary> | ||
4971 | <returns>Null if the resource couldn't be located somehow</returns> | ||
4972 | </member> | ||
4973 | <member name="P:HttpServer.Helpers.ResourceInfo.Assembly"> | ||
4974 | <summary> | ||
4975 | Retrieves the assembly the resource resides in | ||
4976 | </summary> | ||
4977 | </member> | ||
4978 | <member name="P:HttpServer.Helpers.ResourceInfo.Uri"> | ||
4979 | <summary> | ||
4980 | Retrieves the full name/path of the assembly | ||
4981 | </summary> | ||
4982 | </member> | ||
4983 | <member name="P:HttpServer.Helpers.ResourceInfo.Extension"> | ||
4984 | <summary> | ||
4985 | Retrieves the extension of the resource | ||
4986 | </summary> | ||
4987 | </member> | ||
4988 | <member name="P:HttpServer.Helpers.ResourceInfo.ExtensionLessUri"> | ||
4989 | <summary>Returns the Uri without extension</summary> | ||
4990 | </member> | ||
4991 | <member name="P:HttpServer.Helpers.ResourceInfo.ResourceName"> | ||
4992 | <summary>Retrieves the full path name to the resource file</summary> | ||
4993 | </member> | ||
4994 | <member name="T:HttpServer.Authentication.BasicAuthentication"> | ||
4995 | <summary> | ||
4996 | The "basic" authentication scheme is based on the model that the | ||
4997 | client must authenticate itself with a user-ID and a password for | ||
4998 | each realm. The realm value should be considered an opaque string | ||
4999 | which can only be compared for equality with other realms on that | ||
5000 | server. The server will service the request only if it can validate | ||
5001 | the user-ID and password for the protection space of the Request-URI. | ||
5002 | There are no optional authentication parameters. | ||
5003 | </summary> | ||
5004 | </member> | ||
5005 | <member name="M:HttpServer.Authentication.BasicAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler,HttpServer.Authentication.AuthenticationRequiredHandler)"> | ||
5006 | <summary> | ||
5007 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.BasicAuthentication"/> class. | ||
5008 | </summary> | ||
5009 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | ||
5010 | <param name="authenticationRequiredHandler">Delegate used to determine if authentication is required (may be null).</param> | ||
5011 | </member> | ||
5012 | <member name="M:HttpServer.Authentication.BasicAuthentication.#ctor(HttpServer.Authentication.AuthenticationHandler)"> | ||
5013 | <summary> | ||
5014 | Initializes a new instance of the <see cref="T:HttpServer.Authentication.BasicAuthentication"/> class. | ||
5015 | </summary> | ||
5016 | <param name="authenticator">Delegate used to provide information used during authentication.</param> | ||
5017 | </member> | ||
5018 | <member name="M:HttpServer.Authentication.BasicAuthentication.CreateResponse(System.String,System.Object[])"> | ||
5019 | <summary> | ||
5020 | Create a response that can be sent in the WWW-Authenticate header. | ||
5021 | </summary> | ||
5022 | <param name="realm">Realm that the user should authenticate in</param> | ||
5023 | <param name="options">Not used in basic auth</param> | ||
5024 | <returns>A correct auth request.</returns> | ||
5025 | </member> | ||
5026 | <member name="M:HttpServer.Authentication.BasicAuthentication.Authenticate(System.String,System.String,System.String,System.Object[])"> | ||
5027 | <summary> | ||
5028 | An authentication response have been received from the web browser. | ||
5029 | Check if it's correct | ||
5030 | </summary> | ||
5031 | <param name="authenticationHeader">Contents from the Authorization header</param> | ||
5032 | <param name="realm">Realm that should be authenticated</param> | ||
5033 | <param name="httpVerb">GET/POST/PUT/DELETE etc.</param> | ||
5034 | <param name="options">Not used in basic auth</param> | ||
5035 | <returns>Authentication object that is stored for the request. A user class or something like that.</returns> | ||
5036 | <exception cref="T:System.ArgumentException">if authenticationHeader is invalid</exception> | ||
5037 | <exception cref="T:System.ArgumentNullException">If any of the paramters is empty or null.</exception> | ||
5038 | </member> | ||
5039 | <member name="P:HttpServer.Authentication.BasicAuthentication.Name"> | ||
5040 | <summary> | 5293 | <summary> |
5041 | name used in http request. | 5294 | Interface for sessions |
5042 | </summary> | 5295 | </summary> |
5043 | </member> | 5296 | </member> |
5044 | <member name="T:HttpServer.RequestParserState"> | 5297 | <member name="P:HttpServer.Sessions.IHttpSession.Id"> |
5045 | <summary> | 5298 | <summary> |
5046 | Current state in the parsing. | 5299 | Session id |
5047 | </summary> | 5300 | </summary> |
5048 | </member> | 5301 | </member> |
5049 | <member name="F:HttpServer.RequestParserState.FirstLine"> | 5302 | <member name="P:HttpServer.Sessions.IHttpSession.Item(System.String)"> |
5050 | <summary> | 5303 | <summary> |
5051 | Should parse the request line | 5304 | Should |
5052 | </summary> | 5305 | </summary> |
5306 | <param name="name">Name of the session variable</param> | ||
5307 | <returns>null if it's not set</returns> | ||
5308 | <exception cref="T:System.Runtime.Serialization.SerializationException">If the object cant be serialized.</exception> | ||
5053 | </member> | 5309 | </member> |
5054 | <member name="F:HttpServer.RequestParserState.HeaderName"> | 5310 | <member name="P:HttpServer.Sessions.IHttpSession.Accessed"> |
5055 | <summary> | 5311 | <summary> |
5056 | Searching for a complete header name | 5312 | When the session was last accessed. |
5313 | This property is touched by the http server each time the | ||
5314 | session is requested. | ||
5057 | </summary> | 5315 | </summary> |
5058 | </member> | 5316 | </member> |
5059 | <member name="F:HttpServer.RequestParserState.AfterName"> | 5317 | <member name="P:HttpServer.Sessions.IHttpSession.Count"> |
5060 | <summary> | 5318 | <summary> |
5061 | Searching for colon after header name (ignoring white spaces) | 5319 | Number of session variables. |
5062 | </summary> | 5320 | </summary> |
5063 | </member> | 5321 | </member> |
5064 | <member name="F:HttpServer.RequestParserState.Between"> | 5322 | <member name="M:HttpServer.Sessions.IHttpSession.Clear"> |
5065 | <summary> | 5323 | <summary> |
5066 | Searching for start of header value (ignoring white spaces) | 5324 | Remove everything from the session |
5067 | </summary> | 5325 | </summary> |
5068 | </member> | 5326 | </member> |
5069 | <member name="F:HttpServer.RequestParserState.HeaderValue"> | 5327 | <member name="M:HttpServer.Sessions.IHttpSession.Clear(System.Boolean)"> |
5070 | <summary> | 5328 | <summary> |
5071 | Searching for a complete header value (can span over multiple lines, as long as they are prefixed with one/more whitespaces) | 5329 | Remove everything from the session |
5072 | </summary> | 5330 | </summary> |
5331 | <param name="expires">True if the session is cleared due to expiration</param> | ||
5073 | </member> | 5332 | </member> |
5074 | <member name="F:HttpServer.RequestParserState.Body"> | 5333 | <member name="E:HttpServer.Sessions.IHttpSession.BeforeClear"> |
5075 | <summary> | 5334 | <summary> |
5076 | Adding bytes to body | 5335 | Event triggered upon clearing the session |
5077 | </summary> | 5336 | </summary> |
5078 | </member> | 5337 | </member> |
5079 | <member name="T:HttpServer.Helpers.JSHelper"> | 5338 | <member name="T:HttpServer.Sessions.HttpSessionClearedArgs"> |
5080 | <summary> | 5339 | <summary> |
5081 | Will contain helper functions for javascript. | 5340 | Arguments sent when a <see cref="T:HttpServer.Sessions.IHttpSession" /> is cleared |
5082 | </summary> | 5341 | </summary> |
5083 | </member> | 5342 | </member> |
5084 | <member name="M:HttpServer.Helpers.JSHelper.AjaxRequest(System.String,System.String[])"> | 5343 | <member name="M:HttpServer.Sessions.HttpSessionClearedArgs.#ctor(System.Boolean)"> |
5085 | <summary> | 5344 | <summary> |
5086 | Requests a url through ajax | 5345 | Instantiates the arguments for the event |
5087 | </summary> | 5346 | </summary> |
5088 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | 5347 | <param name="expired">True if the session is cleared due to expiration</param> |
5089 | <param name="options">optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.</param> | ||
5090 | <returns>a link tag</returns> | ||
5091 | <remarks>onclick attribute is used by this method.</remarks> | ||
5092 | <example> | ||
5093 | <code> | ||
5094 | // plain text | ||
5095 | JSHelper.AjaxRequest("'/user/show/1'"); | ||
5096 | |||
5097 | // ajax request using this.href | ||
5098 | string link = "<a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/<call user</a>"; | ||
5099 | </code> | ||
5100 | </example> | ||
5101 | </member> | 5348 | </member> |
5102 | <member name="M:HttpServer.Helpers.JSHelper.AjaxUpdater(System.String,System.String,System.String[])"> | 5349 | <member name="P:HttpServer.Sessions.HttpSessionClearedArgs.Expired"> |
5103 | <summary> | 5350 | <summary> |
5104 | Ajax requests that updates an element with | 5351 | Returns true if the session is cleared due to expiration |
5105 | the fetched content | ||
5106 | </summary> | 5352 | </summary> |
5107 | <param name="url">url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.</param> | ||
5108 | <param name="targetId">element to update</param> | ||
5109 | <param name="options">options in format "key, value, key, value". All keys should end with colon.</param> | ||
5110 | <returns>A link tag.</returns> | ||
5111 | <example> | ||
5112 | <code> | ||
5113 | JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true"); | ||
5114 | </code> | ||
5115 | </example> | ||
5116 | </member> | 5353 | </member> |
5117 | <member name="M:HttpServer.Helpers.JSHelper.CreateDialog(System.String,System.String,System.String[])"> | 5354 | <member name="T:HttpServer.Sessions.HttpSessionClearedHandler"> |
5118 | <summary> | 5355 | <summary> |
5119 | Opens contents in a dialog window. | 5356 | Delegate for when a IHttpSession is cleared |
5120 | </summary> | 5357 | </summary> |
5121 | <param name="url">url to contents of dialog</param> | 5358 | <param name="session"><see cref="T:HttpServer.Sessions.IHttpSession"/> this is being cleared.</param> |
5122 | <param name="title">link title</param> | 5359 | <param name="args">Arguments for the clearing</param> |
5123 | <param name="options">name, value, name, value, all parameter names should end with colon.</param> | ||
5124 | </member> | 5360 | </member> |
5125 | <member name="M:HttpServer.Helpers.JSHelper.CloseDialog"> | 5361 | <member name="T:HttpServer.Sessions.IHttpSessionStore"> |
5126 | <summary> | 5362 | <summary> |
5127 | Close a javascript dialog window/div. | 5363 | A session store is used to store and load sessions on a media. |
5364 | The default implementation (<see cref="T:HttpServer.Sessions.MemorySessionStore"/>) saves/retrieves sessions from memory. | ||
5128 | </summary> | 5365 | </summary> |
5129 | <returns>javascript for closing a dialog.</returns> | ||
5130 | <see cref="M:HttpServer.Helpers.JSHelper.CreateDialog(System.String,System.String,System.String[])"/> | ||
5131 | </member> | 5366 | </member> |
5132 | <member name="T:HttpServer.ContentType"> | 5367 | <member name="P:HttpServer.Sessions.IHttpSessionStore.Item(System.String)"> |
5133 | <summary> | 5368 | <summary> |
5134 | Lists content type mime types. | 5369 | Load a session from the store |
5135 | </summary> | 5370 | </summary> |
5371 | <param name="sessionId"></param> | ||
5372 | <returns>null if session is not found.</returns> | ||
5136 | </member> | 5373 | </member> |
5137 | <member name="F:HttpServer.ContentType.Text"> | 5374 | <member name="P:HttpServer.Sessions.IHttpSessionStore.ExpireTime"> |
5138 | <summary> | 5375 | <summary> |
5139 | text/plain | 5376 | Number of minutes before a session expires. |
5140 | </summary> | 5377 | </summary> |
5378 | <value>Default time is 20 minutes.</value> | ||
5141 | </member> | 5379 | </member> |
5142 | <member name="F:HttpServer.ContentType.Html"> | 5380 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Create"> |
5143 | <summary> | 5381 | <summary> |
5144 | text/haml | 5382 | Creates a new http session with a generated id. |
5145 | </summary> | 5383 | </summary> |
5384 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object</returns> | ||
5146 | </member> | 5385 | </member> |
5147 | <member name="F:HttpServer.ContentType.Javascript"> | 5386 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Create(System.String)"> |
5148 | <summary> | 5387 | <summary> |
5149 | content type for javascript documents = application/javascript | 5388 | Creates a new http session with a specific id |
5150 | </summary> | 5389 | </summary> |
5390 | <param name="id">Id used to identify the new cookie..</param> | ||
5391 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object.</returns> | ||
5151 | <remarks> | 5392 | <remarks> |
5152 | <para> | 5393 | Id should be generated by the store implementation if it's null or <see cref="F:System.String.Empty"/>. |
5153 | RFC 4329 states that text/javascript have been superseeded by | ||
5154 | application/javascript. You might still want to check browser versions | ||
5155 | since older ones do not support application/javascript. | ||
5156 | </para> | ||
5157 | <para>Browser support: http://krijnhoetmer.nl/stuff/javascript/mime-types/</para> | ||
5158 | </remarks> | 5394 | </remarks> |
5159 | </member> | 5395 | </member> |
5160 | <member name="F:HttpServer.ContentType.Xml"> | 5396 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Load(System.String)"> |
5161 | <summary> | ||
5162 | text/xml | ||
5163 | </summary> | ||
5164 | </member> | ||
5165 | <member name="T:HttpServer.ContentTypes"> | ||
5166 | <summary> | ||
5167 | A list of content types | ||
5168 | </summary> | ||
5169 | </member> | ||
5170 | <member name="M:HttpServer.ContentTypes.#ctor(System.String)"> | ||
5171 | <summary> | ||
5172 | |||
5173 | </summary> | ||
5174 | <param name="types">Semicolon separated content types.</param> | ||
5175 | </member> | ||
5176 | <member name="M:HttpServer.ContentTypes.GetEnumerator"> | ||
5177 | <summary> | ||
5178 | Returns an enumerator that iterates through a collection. | ||
5179 | </summary> | ||
5180 | <returns> | ||
5181 | An <see cref="T:System.Collections.IEnumerator"/> object that can be used to iterate through the collection. | ||
5182 | </returns> | ||
5183 | </member> | ||
5184 | <member name="M:HttpServer.ContentTypes.Contains(System.String)"> | ||
5185 | <summary> | ||
5186 | Searches for the specified type | ||
5187 | </summary> | ||
5188 | <param name="type">Can also be a part of a type (searching for "xml" would return true for "application/xml").</param> | ||
5189 | <returns>true if type was found.</returns> | ||
5190 | </member> | ||
5191 | <member name="P:HttpServer.ContentTypes.First"> | ||
5192 | <summary> | 5397 | <summary> |
5193 | Get this first content type. | 5398 | Load an existing session. |
5194 | </summary> | 5399 | </summary> |
5400 | <param name="sessionId">Session id (usually retrieved from a client side cookie).</param> | ||
5401 | <returns>A session if found; otherwise null.</returns> | ||
5195 | </member> | 5402 | </member> |
5196 | <member name="P:HttpServer.ContentTypes.Item(System.String)"> | 5403 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Save(HttpServer.Sessions.IHttpSession)"> |
5197 | <summary> | 5404 | <summary> |
5198 | Fetch a content type | 5405 | Save an updated session to the store. |
5199 | </summary> | 5406 | </summary> |
5200 | <param name="type">Part of type ("xml" would return "application/xml")</param> | 5407 | <param name="session">Session id (usually retrieved from a client side cookie).</param> |
5201 | <returns></returns> | 5408 | <exception cref="T:System.ArgumentException">If Id property have not been specified.</exception> |
5202 | <remarks>All content types are in lower case.</remarks> | ||
5203 | </member> | 5409 | </member> |
5204 | <member name="T:HttpServer.RequestParserFactory"> | 5410 | <member name="M:HttpServer.Sessions.IHttpSessionStore.AddUnused(HttpServer.Sessions.IHttpSession)"> |
5205 | <summary> | 5411 | <summary> |
5206 | Creates request parsers when needed. | 5412 | We use the flyweight pattern which reuses small objects |
5413 | instead of creating new each time. | ||
5207 | </summary> | 5414 | </summary> |
5415 | <param name="session">Unused session that should be reused next time Create is called.</param> | ||
5208 | </member> | 5416 | </member> |
5209 | <member name="T:HttpServer.IRequestParserFactory"> | 5417 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Cleanup"> |
5210 | <summary> | 5418 | <summary> |
5211 | Creates request parsers when needed. | 5419 | Remove expired sessions |
5212 | </summary> | 5420 | </summary> |
5213 | </member> | 5421 | </member> |
5214 | <member name="M:HttpServer.IRequestParserFactory.CreateParser(HttpServer.ILogWriter)"> | 5422 | <member name="M:HttpServer.Sessions.IHttpSessionStore.Remove(System.String)"> |
5215 | <summary> | 5423 | <summary> |
5216 | Create a new request parser. | 5424 | Remove a session |
5217 | </summary> | 5425 | </summary> |
5218 | <param name="logWriter">Used when logging should be enabled.</param> | 5426 | <param name="sessionId">id of the session.</param> |
5219 | <returns>A new request parser.</returns> | ||
5220 | </member> | 5427 | </member> |
5221 | <member name="M:HttpServer.RequestParserFactory.CreateParser(HttpServer.ILogWriter)"> | 5428 | <member name="T:HttpServer.Sessions.MemorySession"> |
5222 | <summary> | 5429 | <summary> |
5223 | Create a new request parser. | 5430 | A session stored in memory. |
5224 | </summary> | 5431 | </summary> |
5225 | <param name="logWriter">Used when logging should be enabled.</param> | ||
5226 | <returns>A new request parser.</returns> | ||
5227 | </member> | 5432 | </member> |
5228 | <member name="T:HttpServer.Exceptions.UnauthorizedException"> | 5433 | <member name="M:HttpServer.Sessions.MemorySession.#ctor(System.String)"> |
5229 | <summary> | 5434 | <summary> |
5230 | The request requires user authentication. The response MUST include a | ||
5231 | WWW-Authenticate header field (section 14.47) containing a challenge | ||
5232 | applicable to the requested resource. | ||
5233 | |||
5234 | The client MAY repeat the request with a suitable Authorization header | ||
5235 | field (section 14.8). If the request already included Authorization | ||
5236 | credentials, then the 401 response indicates that authorization has been | ||
5237 | refused for those credentials. If the 401 response contains the same challenge | ||
5238 | as the prior response, and the user agent has already attempted authentication | ||
5239 | at least once, then the user SHOULD be presented the entity that was given in the response, | ||
5240 | since that entity might include relevant diagnostic information. | ||
5241 | 5435 | ||
5242 | HTTP access authentication is explained in rfc2617: | ||
5243 | http://www.ietf.org/rfc/rfc2617.txt | ||
5244 | |||
5245 | (description is taken from | ||
5246 | http://www.submissionchamber.com/help-guides/error-codes.php#sec10.4.2) | ||
5247 | </summary> | ||
5248 | </member> | ||
5249 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor"> | ||
5250 | <summary> | ||
5251 | Create a new unauhtorized exception. | ||
5252 | </summary> | ||
5253 | <seealso cref="T:HttpServer.Exceptions.UnauthorizedException"/> | ||
5254 | </member> | ||
5255 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor(System.String,System.Exception)"> | ||
5256 | <summary> | ||
5257 | Create a new unauhtorized exception. | ||
5258 | </summary> | ||
5259 | <param name="message">reason to why the request was unauthorized.</param> | ||
5260 | <param name="inner">inner exception</param> | ||
5261 | </member> | ||
5262 | <member name="M:HttpServer.Exceptions.UnauthorizedException.#ctor(System.String)"> | ||
5263 | <summary> | ||
5264 | Create a new unauhtorized exception. | ||
5265 | </summary> | ||
5266 | <param name="message">reason to why the request was unauthorized.</param> | ||
5267 | </member> | ||
5268 | <member name="T:HttpServer.HttpModules.FileModule"> | ||
5269 | <summary> | ||
5270 | The purpose of this module is to serve files. | ||
5271 | </summary> | 5436 | </summary> |
5437 | <param name="id">A unique id used by the sessions store to identify the session</param> | ||
5272 | </member> | 5438 | </member> |
5273 | <member name="M:HttpServer.HttpModules.FileModule.#ctor(System.String,System.String,System.Boolean)"> | 5439 | <member name="M:HttpServer.Sessions.MemorySession.SetId(System.String)"> |
5274 | <summary> | 5440 | <summary> |
5275 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.FileModule"/> class. | 5441 | Id |
5276 | </summary> | 5442 | </summary> |
5277 | <param name="baseUri">Uri to serve, for instance "/files/"</param> | 5443 | <param name="id"></param> |
5278 | <param name="basePath">Path on hard drive where we should start looking for files</param> | ||
5279 | <param name="useLastModifiedHeader">If true a Last-Modifed header will be sent upon requests urging web browser to cache files</param> | ||
5280 | </member> | 5444 | </member> |
5281 | <member name="M:HttpServer.HttpModules.FileModule.#ctor(System.String,System.String)"> | 5445 | <member name="P:HttpServer.Sessions.MemorySession.Id"> |
5282 | <summary> | 5446 | <summary> |
5283 | Initializes a new instance of the <see cref="T:HttpServer.HttpModules.FileModule"/> class. | 5447 | Session id |
5284 | </summary> | 5448 | </summary> |
5285 | <param name="baseUri">Uri to serve, for instance "/files/"</param> | ||
5286 | <param name="basePath">Path on hard drive where we should start looking for files</param> | ||
5287 | </member> | 5449 | </member> |
5288 | <member name="M:HttpServer.HttpModules.FileModule.AddDefaultMimeTypes"> | 5450 | <member name="P:HttpServer.Sessions.MemorySession.Item(System.String)"> |
5289 | <summary> | 5451 | <summary> |
5290 | Mimtypes that this class can handle per default | 5452 | Should |
5291 | </summary> | 5453 | </summary> |
5454 | <param name="name">Name of the session variable</param> | ||
5455 | <returns>null if it's not set</returns> | ||
5292 | </member> | 5456 | </member> |
5293 | <member name="M:HttpServer.HttpModules.FileModule.CanHandle(System.Uri)"> | 5457 | <member name="P:HttpServer.Sessions.MemorySession.Accessed"> |
5294 | <summary> | 5458 | <summary> |
5295 | Determines if the request should be handled by this module. | 5459 | when the session was last accessed. |
5296 | Invoked by the <see cref="T:HttpServer.HttpServer"/> | ||
5297 | </summary> | 5460 | </summary> |
5298 | <param name="uri"></param> | 5461 | <remarks> |
5299 | <returns>true if this module should handle it.</returns> | 5462 | Used to determine when the session should be removed. |
5300 | </member> | 5463 | </remarks> |
5301 | <member name="M:HttpServer.HttpModules.FileModule.GetPath(System.Uri)"> | ||
5302 | <exception cref="T:HttpServer.Exceptions.BadRequestException">Illegal path</exception> | ||
5303 | </member> | 5464 | </member> |
5304 | <member name="M:HttpServer.HttpModules.FileModule.Contains(System.String,System.Collections.Generic.IEnumerable{System.String})"> | 5465 | <member name="P:HttpServer.Sessions.MemorySession.Count"> |
5305 | <summary> | 5466 | <summary> |
5306 | check if source contains any of the chars. | 5467 | Number of values in the session |
5307 | </summary> | 5468 | </summary> |
5308 | <param name="source"></param> | ||
5309 | <param name="chars"></param> | ||
5310 | <returns></returns> | ||
5311 | </member> | 5469 | </member> |
5312 | <member name="M:HttpServer.HttpModules.FileModule.Process(HttpServer.IHttpRequest,HttpServer.IHttpResponse,HttpServer.Sessions.IHttpSession)"> | 5470 | <member name="P:HttpServer.Sessions.MemorySession.Changed"> |
5313 | <summary> | 5471 | <summary> |
5314 | Method that process the Uri. | 5472 | Flag to indicate that the session have been changed |
5473 | and should be saved into the session store. | ||
5315 | </summary> | 5474 | </summary> |
5316 | <param name="request">Information sent by the browser about the request</param> | ||
5317 | <param name="response">Information that is being sent back to the client.</param> | ||
5318 | <param name="session">Session used to </param> | ||
5319 | <exception cref="T:HttpServer.Exceptions.InternalServerException">Failed to find file extension</exception> | ||
5320 | <exception cref="T:HttpServer.Exceptions.ForbiddenException">File type is forbidden.</exception> | ||
5321 | </member> | 5475 | </member> |
5322 | <member name="M:HttpServer.HttpModules.FileModule.GetFileExtension(System.String)"> | 5476 | <member name="M:HttpServer.Sessions.MemorySession.Clear"> |
5323 | <summary> | 5477 | <summary> |
5324 | return a file extension from an absolute Uri path (or plain filename) | 5478 | Remove everything from the session |
5325 | </summary> | 5479 | </summary> |
5326 | <param name="uri"></param> | ||
5327 | <returns></returns> | ||
5328 | </member> | 5480 | </member> |
5329 | <member name="P:HttpServer.HttpModules.FileModule.MimeTypes"> | 5481 | <member name="M:HttpServer.Sessions.MemorySession.Clear(System.Boolean)"> |
5330 | <summary> | 5482 | <summary> |
5331 | List with all mime-type that are allowed. | 5483 | Clears the specified expire. |
5332 | </summary> | 5484 | </summary> |
5333 | <remarks>All other mime types will result in a Forbidden http status code.</remarks> | 5485 | <param name="expires">True if the session is cleared due to expiration</param> |
5334 | </member> | 5486 | </member> |
5335 | <member name="P:HttpServer.HttpModules.FileModule.ForbiddenChars"> | 5487 | <member name="M:HttpServer.Sessions.MemorySession.Dispose"> |
5336 | <summary> | 5488 | <summary> |
5337 | characters that may not exist in a path. | 5489 | Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. |
5338 | </summary> | 5490 | </summary> |
5339 | <example> | 5491 | <filterpriority>2</filterpriority> |
5340 | fileMod.ForbiddenChars = new string[]{ "\\", "..", ":" }; | ||
5341 | </example> | ||
5342 | </member> | 5492 | </member> |
5343 | <member name="T:HttpServer.Helpers.WebHelper"> | 5493 | <member name="E:HttpServer.Sessions.MemorySession.BeforeClear"> |
5344 | <summary> | 5494 | <summary> |
5345 | Webhelper provides helpers for common tasks in HTML. | 5495 | Event triggered upon clearing the session |
5346 | </summary> | 5496 | </summary> |
5347 | </member> | 5497 | </member> |
5348 | <member name="F:HttpServer.Helpers.WebHelper.JSImplementation"> | 5498 | <member name="T:HttpServer.Sessions.MemorySessionStore"> |
5349 | <summary> | 5499 | <summary> |
5350 | Used to let the website use different javascript libraries. | 5500 | Session store using memory for each session. |
5351 | Default is <see cref="T:HttpServer.Helpers.Implementations.PrototypeImp"/> | ||
5352 | </summary> | 5501 | </summary> |
5353 | </member> | 5502 | </member> |
5354 | <member name="M:HttpServer.Helpers.WebHelper.AjaxRequest(System.String,System.String,System.String[])"> | 5503 | <member name="M:HttpServer.Sessions.MemorySessionStore.#ctor"> |
5355 | <summary> | 5504 | <summary> |
5356 | Creates a link that invokes through ajax. | 5505 | Initializes the class setting the expirationtimer to clean the session every minute |
5357 | </summary> | 5506 | </summary> |
5358 | <param name="url">url to fetch</param> | ||
5359 | <param name="title">link title</param> | ||
5360 | <param name="options"> | ||
5361 | optional options in format "key, value, key, value". | ||
5362 | Javascript options starts with ':'. | ||
5363 | </param> | ||
5364 | <returns>a link tag</returns> | ||
5365 | <example> | ||
5366 | WebHelper.AjaxRequest("/users/add/", "Add user", "method:", "post", "onclick", "validate('this');"); | ||
5367 | </example> | ||
5368 | </member> | 5507 | </member> |
5369 | <member name="M:HttpServer.Helpers.WebHelper.AjaxUpdater(System.String,System.String,System.String,System.String[])"> | 5508 | <member name="M:HttpServer.Sessions.MemorySessionStore.Cleanup(System.Object)"> |
5370 | <summary> | 5509 | <summary> |
5371 | Builds a link that updates an element with the fetched ajax content. | 5510 | Delegate for the cleanup timer |
5372 | </summary> | 5511 | </summary> |
5373 | <param name="url">Url to fetch content from</param> | ||
5374 | <param name="title">link title</param> | ||
5375 | <param name="targetId">html element to update with the results of the ajax request.</param> | ||
5376 | <param name="options">optional options in format "key, value, key, value"</param> | ||
5377 | <returns>A link tag.</returns> | ||
5378 | </member> | 5512 | </member> |
5379 | <member name="M:HttpServer.Helpers.WebHelper.DialogLink(System.String,System.String,System.String[])"> | 5513 | <member name="P:HttpServer.Sessions.MemorySessionStore.Item(System.String)"> |
5380 | <summary> | 5514 | <summary> |
5381 | A link that pop ups a Dialog (overlay div) | 5515 | Load a session from the store |
5382 | </summary> | 5516 | </summary> |
5383 | <param name="url">url to contents of dialog</param> | 5517 | <param name="sessionId"></param> |
5384 | <param name="title">link title</param> | 5518 | <returns>null if session is not found.</returns> |
5385 | <param name="htmlAttributes">name/value of html attributes.</param> | ||
5386 | <returns>A "a"-tag that popups a dialog when clicked</returns> | ||
5387 | <example> | ||
5388 | WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');"); | ||
5389 | </example> | ||
5390 | </member> | 5519 | </member> |
5391 | <member name="M:HttpServer.Helpers.WebHelper.CreateDialog(System.String,System.String,System.String[])"> | 5520 | <member name="M:HttpServer.Sessions.MemorySessionStore.Create"> |
5392 | <summary> | 5521 | <summary> |
5393 | Create/Open a dialog box using ajax | 5522 | Creates a new http session |
5394 | </summary> | 5523 | </summary> |
5395 | <param name="url"></param> | ||
5396 | <param name="title"></param> | ||
5397 | <param name="parameters"></param> | ||
5398 | <returns></returns> | 5524 | <returns></returns> |
5399 | </member> | 5525 | </member> |
5400 | <member name="M:HttpServer.Helpers.WebHelper.CloseDialog"> | 5526 | <member name="M:HttpServer.Sessions.MemorySessionStore.Create(System.String)"> |
5401 | <summary> | ||
5402 | Close a javascript dialog window/div. | ||
5403 | </summary> | ||
5404 | <returns>javascript for closing a dialog.</returns> | ||
5405 | <see cref="M:HttpServer.Helpers.WebHelper.DialogLink(System.String,System.String,System.String[])"/> | ||
5406 | </member> | ||
5407 | <member name="M:HttpServer.Helpers.WebHelper.FormStart(System.String,System.String,System.Boolean)"> | ||
5408 | <summary> | ||
5409 | Create a <form> tag. | ||
5410 | </summary> | ||
5411 | <param name="name">name of form</param> | ||
5412 | <param name="action">action to invoke on submit</param> | ||
5413 | <param name="isAjax">form should be posted as ajax</param> | ||
5414 | <returns>html code</returns> | ||
5415 | <example> | ||
5416 | WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax); | ||
5417 | </example> | ||
5418 | </member> | ||
5419 | <member name="M:HttpServer.Helpers.WebHelper.Link(System.String,System.String,System.String[])"> | ||
5420 | <summary> | ||
5421 | Create a link tag. | ||
5422 | </summary> | ||
5423 | <param name="url">url to go to</param> | ||
5424 | <param name="title">link title (text that is displayed)</param> | ||
5425 | <param name="htmlAttributes">html attributes, name, value, name, value</param> | ||
5426 | <returns>html code</returns> | ||
5427 | <example> | ||
5428 | WebHelper.Link("/user/show/1", "Show user", "id", "showUser", "onclick", "return confirm('Are you shure?');"); | ||
5429 | </example> | ||
5430 | </member> | ||
5431 | <member name="M:HttpServer.Helpers.WebHelper.BuildLink(System.String,System.String,System.String[])"> | ||
5432 | <summary> | ||
5433 | Build a link | ||
5434 | </summary> | ||
5435 | <param name="url">url to go to.</param> | ||
5436 | <param name="title">title of link (displayed text)</param> | ||
5437 | <param name="htmlAttributes">extra html attributes.</param> | ||
5438 | <returns>a complete link</returns> | ||
5439 | </member> | ||
5440 | <member name="M:HttpServer.Helpers.WebHelper.BuildLink(System.String,System.String,System.String[],System.String[])"> | ||
5441 | <summary> | ||
5442 | Build a link | ||
5443 | </summary> | ||
5444 | <param name="url">url to go to.</param> | ||
5445 | <param name="title">title of link (displayed text)</param> | ||
5446 | <param name="htmlAttributes">extra html attributes.</param> | ||
5447 | <returns>a complete link</returns> | ||
5448 | <param name="options">more options</param> | ||
5449 | </member> | ||
5450 | <member name="M:HttpServer.Helpers.WebHelper.Select(System.String,System.Collections.ICollection,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> | ||
5451 | <summary> | ||
5452 | Obsolete | ||
5453 | </summary> | ||
5454 | <param name="name">Obsolete</param> | ||
5455 | <param name="collection">Obsolete</param> | ||
5456 | <param name="getIdTitle">Obsolete</param> | ||
5457 | <param name="selectedValue">Obsolete</param> | ||
5458 | <param name="firstEmpty">Obsolete</param> | ||
5459 | <returns>Obsolete</returns> | ||
5460 | </member> | ||
5461 | <member name="M:HttpServer.Helpers.WebHelper.Select(System.String,System.String,System.Collections.ICollection,HttpServer.Helpers.GetIdTitle,System.Object,System.Boolean)"> | ||
5462 | <summary> | 5527 | <summary> |
5463 | Obsolete | 5528 | Creates a new http session with a specific id |
5464 | </summary> | 5529 | </summary> |
5465 | <param name="name">Obsolete</param> | 5530 | <param name="id">Id used to identify the new cookie..</param> |
5466 | <param name="id">Obsolete</param> | 5531 | <returns>A <see cref="T:HttpServer.Sessions.IHttpSession"/> object.</returns> |
5467 | <param name="collection">Obsolete</param> | 5532 | <remarks> |
5468 | <param name="getIdTitle">Obsolete</param> | 5533 | Id should be generated by the store implementation if it's null or <see cref="F:System.String.Empty"/>. |
5469 | <param name="selectedValue">Obsolete</param> | 5534 | </remarks> |
5470 | <param name="firstEmpty">Obsolete</param> | ||
5471 | <returns>Obsolete</returns> | ||
5472 | </member> | 5535 | </member> |
5473 | <member name="M:HttpServer.Helpers.WebHelper.List(System.Collections.Generic.IEnumerable{System.Object},System.String)"> | 5536 | <member name="M:HttpServer.Sessions.MemorySessionStore.Load(System.String)"> |
5474 | <summary> | 5537 | <summary> |
5475 | Render errors into a UL with class "errors" | 5538 | Load an existing session. |
5476 | </summary> | 5539 | </summary> |
5477 | <param name="className">class used by UL-tag.</param> | 5540 | <param name="sessionId"></param> |
5478 | <param name="theList">items to list</param> | 5541 | <returns></returns> |
5479 | <returns>an unordered html list.</returns> | ||
5480 | </member> | 5542 | </member> |
5481 | <member name="M:HttpServer.Helpers.WebHelper.List(System.Collections.Specialized.NameValueCollection,System.String)"> | 5543 | <member name="M:HttpServer.Sessions.MemorySessionStore.Save(HttpServer.Sessions.IHttpSession)"> |
5482 | <summary> | 5544 | <summary> |
5483 | Render errors into a UL with class "errors" | 5545 | Save an updated session to the store. |
5484 | </summary> | 5546 | </summary> |
5485 | <param name="className">class used by UL-tag.</param> | 5547 | <param name="session"></param> |
5486 | <param name="theList">items to list</param> | ||
5487 | <returns>an unordered html list.</returns> | ||
5488 | </member> | 5548 | </member> |
5489 | <member name="M:HttpServer.Helpers.WebHelper.Errors(System.Collections.Specialized.NameValueCollection)"> | 5549 | <member name="M:HttpServer.Sessions.MemorySessionStore.AddUnused(HttpServer.Sessions.IHttpSession)"> |
5490 | <summary> | 5550 | <summary> |
5491 | Render errors into a UL with class "errors" | 5551 | We use the flyweight pattern which reuses small objects |
5552 | instead of creating new each time. | ||
5492 | </summary> | 5553 | </summary> |
5493 | <param name="errors"></param> | 5554 | <param name="session">EmptyLanguageNode (unused) session that should be reused next time Create is called.</param> |
5494 | <returns></returns> | ||
5495 | </member> | 5555 | </member> |
5496 | <member name="M:HttpServer.Helpers.WebHelper.GenerateHtmlAttributes(System.Text.StringBuilder,System.String[],System.String[])"> | 5556 | <member name="M:HttpServer.Sessions.MemorySessionStore.Cleanup"> |
5497 | <summary> | 5557 | <summary> |
5498 | Generates a list with html attributes. | 5558 | Remove expired sessions |
5499 | </summary> | 5559 | </summary> |
5500 | <param name="sb">StringBuilder that the options should be added to.</param> | ||
5501 | <param name="firstOptions">attributes set by user.</param> | ||
5502 | <param name="secondOptions">attributes set by any of the helper classes.</param> | ||
5503 | </member> | 5560 | </member> |
5504 | <member name="M:HttpServer.Helpers.WebHelper.GenerateHtmlAttributes(System.Text.StringBuilder,System.String[])"> | 5561 | <member name="M:HttpServer.Sessions.MemorySessionStore.Remove(System.String)"> |
5505 | <summary> | 5562 | <summary> |
5506 | Generates a list with html attributes. | 5563 | Remove a session |
5507 | </summary> | 5564 | </summary> |
5508 | <param name="sb">StringBuilder that the options should be added to.</param> | 5565 | <param name="sessionId">id of the session.</param> |
5509 | <param name="options"></param> | ||
5510 | </member> | 5566 | </member> |
5511 | <member name="T:HttpServer.Helpers.GetIdTitle"> | 5567 | <member name="P:HttpServer.Sessions.MemorySessionStore.ExpireTime"> |
5512 | <summary> | 5568 | <summary> |
5513 | 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. | 5569 | Number of minutes before a session expires. |
5570 | Default is 20 minutes. | ||
5514 | </summary> | 5571 | </summary> |
5515 | <param name="obj">current object (for instance a User).</param> | ||
5516 | <param name="id">Text that should be displayed in the value part of a <optiongt;-tag.</param> | ||
5517 | <param name="title">Text shown in the select list.</param> | ||
5518 | <example> | ||
5519 | // Class that is going to be used in a SELECT-tag. | ||
5520 | public class User | ||
5521 | { | ||
5522 | private readonly string _realName; | ||
5523 | private readonly int _id; | ||
5524 | public User(int id, string realName) | ||
5525 | { | ||
5526 | _id = id; | ||
5527 | _realName = realName; | ||
5528 | } | ||
5529 | public string RealName | ||
5530 | { | ||
5531 | get { return _realName; } | ||
5532 | } | ||
5533 | |||
5534 | public int Id | ||
5535 | { | ||
5536 | get { return _id; } | ||
5537 | } | ||
5538 | } | ||
5539 | |||
5540 | // Using an inline delegate to generate the select list | ||
5541 | public void UserInlineDelegate() | ||
5542 | { | ||
5543 | List<User> items = new List<User>(); | ||
5544 | items.Add(new User(1, "adam")); | ||
5545 | items.Add(new User(2, "bertial")); | ||
5546 | items.Add(new User(3, "david")); | ||
5547 | string htmlSelect = Select("users", "users", items, delegate(object o, out object id, out object value) | ||
5548 | { | ||
5549 | User user = (User)o; | ||
5550 | id = user.Id; | ||
5551 | value = user.RealName; | ||
5552 | }, 2, true); | ||
5553 | } | ||
5554 | |||
5555 | // Using an method as delegate to generate the select list. | ||
5556 | public void UseExternalDelegate() | ||
5557 | { | ||
5558 | List<User> items = new List<User>(); | ||
5559 | items.Add(new User(1, "adam")); | ||
5560 | items.Add(new User(2, "bertial")); | ||
5561 | items.Add(new User(3, "david")); | ||
5562 | string htmlSelect = Select("users", "users", items, UserOptions, 1, true); | ||
5563 | } | ||
5564 | |||
5565 | // delegate returning id and title | ||
5566 | public static void UserOptions(object o, out object id, out object title) | ||
5567 | { | ||
5568 | User user = (User)o; | ||
5569 | id = user.Id; | ||
5570 | value = user.RealName; | ||
5571 | } /// </example> | ||
5572 | </member> | 5572 | </member> |
5573 | </members> | 5573 | </members> |
5574 | </doc> | 5574 | </doc> |