From cd3b7bcb03cf1fa8c5303926c79cebe77dd8af8e Mon Sep 17 00:00:00 2001
From: Teravus Ovares (Dan Olivares)
Date: Tue, 18 Aug 2009 01:19:01 -0400
Subject: * Update HTTP Server with jhurliman's longheader fix. Changes 1024
with 4096.
---
bin/HttpServer_OpenSim.xml | 6806 ++++++++++++++++++++++----------------------
1 file changed, 3403 insertions(+), 3403 deletions(-)
(limited to 'bin/HttpServer_OpenSim.xml')
diff --git a/bin/HttpServer_OpenSim.xml b/bin/HttpServer_OpenSim.xml
index c549ebc..9c3df78 100644
--- a/bin/HttpServer_OpenSim.xml
+++ b/bin/HttpServer_OpenSim.xml
@@ -4,389 +4,242 @@
HttpServer_OpenSim
-
+
- Interface for sessions
+ Inversion of control interface.
-
+
- Remove everything from the session
+ Add a component instance
+ Interface type
+ Instance to add
-
+
- Remove everything from the session
+ Get a component.
- True if the session is cleared due to expiration
+ Interface type
+ Component if registered, otherwise null.
+
+ Component will get created if needed.
+
-
+
- Session id
+ Checks if the specified component interface have been added.
+
+ true if found; otherwise false.
-
+
- Should
+ Add a component.
- Name of the session variable
- null if it's not set
- If the object cant be serialized.
+ Type being requested.
+ Type being created.
-
+
- When the session was last accessed.
- This property is touched by the http server each time the
- session is requested.
+ A HttpModule can be used to serve Uri's. The module itself
+ decides if it should serve a Uri or not. In this way, you can
+ get a very flexible http application since you can let multiple modules
+ serve almost similar urls.
+
+ Throw if you are using a and want to prompt for user name/password.
+
-
+
- Number of session variables.
+ Method that process the url
+ Information sent by the browser about the request
+ Information that is being sent back to the client.
+ Session used to
+ true if this module handled the request.
-
+
- Event triggered upon clearing the session
+ Set the log writer to use.
+ logwriter to use.
-
+
- Arguments sent when a is cleared
+ Log something.
+ importance of log message
+ message
-
+
- Instantiates the arguments for the event
+ If true specifies that the module doesn't consume the processing of a request so that subsequent modules
+ can continue processing afterwards. Default is false.
- True if the session is cleared due to expiration
-
+
- Returns true if the session is cleared due to expiration
+ Container to bind resource names to assemblies
-
+
- Delegate for when a IHttpSession is cleared
+ Instantiates an instance of
- this is being cleared.
- Arguments for the clearing
+ The dot seperated uri the resource maps to
+ The full resource name
+ The assembly the resource exists in
-
+
- Contains a listener that doesn't do anything with the connections.
+ Retrieves a stream to the resource
+ Null if the resource couldn't be located somehow
-
+
- Listen for regular HTTP connections
+ Retrieves the assembly the resource resides in
- IP Address to accept connections on
- TCP Port to listen on, default HTTP port is 80.
- Factory used to create es.
- address is null.
- Port must be a positive number.
-
+
- Initializes a new instance of the class.
+ Retrieves the full name/path of the assembly
- IP Address to accept connections on
- TCP Port to listen on, default HTTPS port is 443
- Factory used to create es.
- Certificate to use
-
+
- Initializes a new instance of the class.
+ Retrieves the extension of the resource
- IP Address to accept connections on
- TCP Port to listen on, default HTTPS port is 443
- Factory used to create es.
- Certificate to use
- which HTTPS protocol to use, default is TLS.
-
- Exception.
+
+ Returns the Uri without extension
-
-
- Will try to accept connections one more time.
-
- If any exceptions is thrown.
+
+ Retrieves the full path name to the resource file
-
+
- Can be used to create filtering of new connections.
+ The object form class takes an object and creates form items for it.
- Accepted socket
- true if connection can be accepted; otherwise false.
-
+
- Start listen for new connections
+ Initializes a new instance of the class.
- Number of connections that can stand in a queue to be accepted.
- Listener have already been started.
+
+ form name *and* id.
+ action to do when form is posted.
+
-
+
- Stop the listener
+ Initializes a new instance of the class.
-
+ form name *and* id.
+ action to do when form is posted.
+ object to get values from
-
+
- Gives you a change to receive log entries for all internals of the HTTP library.
+ Initializes a new instance of the class.
-
- You may not switch log writer after starting the listener.
-
+ form action.
+ object to get values from.
-
+
- True if we should turn on trace logs.
+ write out the FORM-tag.
+ generated html code
-
+
- Catch exceptions not handled by the listener.
+ Writeout the form tag
-
- Exceptions will be thrown during debug mode if this event is not used,
- exceptions will be printed to console and suppressed during release mode.
-
+ form should be posted through ajax.
+ generated html code
-
+
- A request have been received from a .
+ Generates a text box.
+
+
+ generated html code
-
+
- The server encountered an unexpected condition which prevented it from fulfilling the request.
+ password box
+
+
+ generated html code
-
+
- All HTTP based exceptions will derive this class.
+ Hiddens the specified property name.
+ Name of the property.
+ The options.
+ generated html code
-
+
- Create a new HttpException
+ Labels the specified property name.
- http status code (sent in the response)
- error description
+ property in object.
+ caption
+ generated html code
-
+
- Create a new HttpException
+ Generate a checkbox
- http status code (sent in the response)
- error description
- inner exception
+ property in object
+ checkbox value
+ additional html attributes.
+ generated html code
-
+
- status code to use in the response.
+ Write a html select tag
+ object property.
+ id column
+ The title column.
+ The options.
+
-
+
- Initializes a new instance of the class.
+ Selects the specified property name.
+ Name of the property.
+ The items.
+ The id column.
+ The title column.
+ The options.
+
-
+
- Initializes a new instance of the class.
+ Write a submit tag.
- error message.
+ button caption
+ html submit tag
-
+
- Initializes a new instance of the class.
+ html end form tag
- error message.
- inner exception.
+ html
-
+
- Used to inform http server that
-
-
-
-
- Eventarguments used when an exception is thrown by a module
-
- the exception
-
-
-
- Exception thrown in a module
-
-
-
-
- Container to bind resource names to assemblies
-
-
-
-
- Instantiates an instance of
-
- The dot seperated uri the resource maps to
- The full resource name
- The assembly the resource exists in
-
-
-
- Retrieves a stream to the resource
-
- Null if the resource couldn't be located somehow
-
-
-
- Retrieves the assembly the resource resides in
-
-
-
-
- Retrieves the full name/path of the assembly
-
-
-
-
- Retrieves the extension of the resource
-
-
-
- Returns the Uri without extension
-
-
- Retrieves the full path name to the resource file
-
-
-
-
-
-
-
-
-
-
- Represents a field in a multipart form
-
-
-
- Event arguments used when a new header have been parsed.
-
-
-
-
- Initializes a new instance of the class.
-
- Name of header.
- Header value.
-
-
-
- Initializes a new instance of the class.
-
-
-
-
- Gets or sets header name.
-
-
-
-
- Gets or sets header value.
-
-
-
-
- New implementation of the HTTP listener.
-
-
- Use the Create methods to create a default listener.
-
-
-
-
- Initializes a new instance of the class.
-
- IP Address to accept connections on
- TCP Port to listen on, default HTTP port is 80.
- Factory used to create es.
- address is null.
- Port must be a positive number.
-
-
-
- Initializes a new instance of the class.
-
- The address.
- The port.
- The factory.
- The certificate.
-
-
-
- Initializes a new instance of the class.
-
- The address.
- The port.
- The factory.
- The certificate.
- The protocol.
-
-
-
- Creates a new instance with default factories.
-
- Address that the listener should accept connections on.
- Port that listener should accept connections on.
- Created HTTP listener.
-
-
-
- Creates a new instance with default factories.
-
- Address that the listener should accept connections on.
- Port that listener should accept connections on.
- Certificate to use
- Created HTTP listener.
-
-
-
- Creates a new instance with default factories.
-
- Address that the listener should accept connections on.
- Port that listener should accept connections on.
- Certificate to use
- which HTTPS protocol to use, default is TLS.
- Created HTTP listener.
-
-
-
- Can be used to create filtering of new connections.
-
- Accepted socket
-
- true if connection can be accepted; otherwise false.
-
-
-
-
- A client have been accepted, but not handled, by the listener.
-
-
-
-
- This decoder converts XML documents to form items.
- Each element becomes a subitem in the form, and each attribute becomes an item.
+ This decoder converts XML documents to form items.
+ Each element becomes a subitem in the form, and each attribute becomes an item.
// xml: somethingdata
@@ -448,3593 +301,3643 @@
Content type (with any additional info like boundry). Content type is always supplied in lower case.
True if the decoder can parse the specified content type
-
+
- We dont want to let the server to die due to exceptions thrown in worker threads.
- therefore we use this delegate to give you a change to handle uncaught exceptions.
+ The server encountered an unexpected condition which prevented it from fulfilling the request.
- Class that the exception was thrown in.
- Exception
-
- Server will throw a InternalServerException in release version if you dont
- handle this delegate.
-
-
+
- Implements HTTP Digest authentication. It's more secure than Basic auth since password is
- encrypted with a "key" from the server.
+ All HTTP based exceptions will derive this class.
-
- Keep in mind that the password is encrypted with MD5. Use a combination of SSL and digest auth to be secure.
-
-
+
- Authentication modules are used to implement different
- kind of HTTP authentication.
+ Create a new HttpException
+ http status code (sent in the response)
+ error description
-
+
- Tag used for authentication.
+ Create a new HttpException
+ http status code (sent in the response)
+ error description
+ inner exception
-
+
- Initializes a new instance of the class.
+ status code to use in the response.
- Delegate used to provide information used during authentication.
- Delegate used to determine if authentication is required (may be null).
-
+
- Initializes a new instance of the class.
+ Initializes a new instance of the class.
- Delegate used to provide information used during authentication.
-
+
- Create a response that can be sent in the WWW-Authenticate header.
+ Initializes a new instance of the class.
- Realm that the user should authenticate in
- Array with optional options.
- A correct authentication request.
- If realm is empty or null.
+ error message.
-
+
- An authentication response have been received from the web browser.
- Check if it's correct
+ Initializes a new instance of the class.
- Contents from the Authorization header
- Realm that should be authenticated
- GET/POST/PUT/DELETE etc.
- options to specific implementations
- Authentication object that is stored for the request. A user class or something like that.
- if is invalid
- If any of the parameters is empty or null.
+ error message.
+ inner exception.
-
+
- Used to invoke the authentication delegate that is used to lookup the user name/realm.
+ Session store using memory for each session.
- Realm (domain) that user want to authenticate in
- User name
- Password used for validation. Some implementations got password in clear text, they are then sent to client.
- object that will be stored in the request to help you identify the user if authentication was successful.
- true if authentication was successful
-
+
- Determines if authentication is required.
+ A session store is used to store and load sessions on a media.
+ The default implementation () saves/retrieves sessions from memory.
- HTTP request from browser
- true if user should be authenticated.
- throw from your delegate if no more attempts are allowed.
- If no more attempts are allowed
-
+
- name used in HTTP request.
+ Creates a new http session with a generated id.
+ A object
-
+
- Initializes a new instance of the class.
+ Creates a new http session with a specific id
- Delegate used to provide information used during authentication.
- Delegate used to determine if authentication is required (may be null).
+ Id used to identify the new cookie..
+ A object.
+
+ Id should be generated by the store implementation if it's null or .
+
-
+
- Initializes a new instance of the class.
+ Load an existing session.
- Delegate used to provide information used during authentication.
+ Session id (usually retrieved from a client side cookie).
+ A session if found; otherwise null.
-
+
- Used by test classes to be able to use hardcoded values
+ Save an updated session to the store.
+ Session id (usually retrieved from a client side cookie).
+ If Id property have not been specified.
-
+
- An authentication response have been received from the web browser.
- Check if it's correct
+ We use the flyweight pattern which reuses small objects
+ instead of creating new each time.
- Contents from the Authorization header
- Realm that should be authenticated
- GET/POST/PUT/DELETE etc.
- First option: true if username/password is correct but not cnonce
-
- Authentication object that is stored for the request. A user class or something like that.
-
- if authenticationHeader is invalid
- If any of the paramters is empty or null.
+ Unused session that should be reused next time Create is called.
-
+
- Encrypts parameters into a Digest string
+ Remove expired sessions
- Realm that the user want to log into.
- User logging in
- Users password.
- HTTP method.
- Uri/domain that generated the login prompt.
- Quality of Protection.
- "Number used ONCE"
- Hexadecimal request counter.
- "Client Number used ONCE"
- Digest encrypted string
-
+
-
+ Remove a session
- Md5 hex encoded "userName:realm:password", without the quotes.
- Md5 hex encoded "method:uri", without the quotes
- Quality of Protection
- "Number used ONCE"
- Hexadecimal request counter.
- Client number used once
-
+ id of the session.
-
+
- Create a response that can be sent in the WWW-Authenticate header.
+ Load a session from the store
- Realm that the user should authenticate in
- First options specifies if true if username/password is correct but not cnonce.
- A correct auth request.
- If realm is empty or null.
+
+ null if session is not found.
-
+
- Decodes authorization header value
+ Number of minutes before a session expires.
- header value
- Encoding that the buffer is in
- All headers and their values if successful; otherwise null
-
- NameValueCollection header = DigestAuthentication.Decode("response=\"6629fae49393a05397450978507c4ef1\",\r\nc=00001", Encoding.ASCII);
-
- Can handle lots of whitespaces and new lines without failing.
+ Default time is 20 minutes.
-
+
- Gets the current nonce.
+ Initializes the class setting the expirationtimer to clean the session every minute
-
-
+
- Gets the Md5 hash bin hex2.
+ Delegate for the cleanup timer
- To be hashed.
-
-
+
- determines if the nonce is valid or has expired.
+ Creates a new http session
- nonce value (check wikipedia for info)
- true if the nonce has not expired.
+
-
+
- name used in http request.
+ Creates a new http session with a specific id
+ Id used to identify the new cookie..
+ A object.
+
+ Id should be generated by the store implementation if it's null or .
+
-
+
- Gets or sets whether the token supplied in is a
- HA1 generated string.
+ Load an existing session.
+
+
-
+
- Class that receives Requests from a .
+ Save an updated session to the store.
+
-
+
- Client have been disconnected.
+ We use the flyweight pattern which reuses small objects
+ instead of creating new each time.
- Client that was disconnected.
- Reason
-
+ EmptyLanguageNode (unused) session that should be reused next time Create is called.
-
+
- Invoked when a client context have received a new HTTP request
+ Remove expired sessions
- Client that received the request.
- Request that was received.
-
-
+
- Delegate used to find a realm/domain.
+ Remove a session
-
-
-
- Realms are used during HTTP Authentication
-
-
-
+ id of the session.
-
+
- A complete HTTP server, you need to add a module to it to be able to handle incoming requests.
+ Load a session from the store
-
-
- // this small example will add two web site modules, thus handling
- // two different sites. In reality you should add Controller modules or something
- // two the website modules to be able to handle different requests.
- HttpServer server = new HttpServer();
- server.Add(new WebSiteModule("www.gauffin.com", "Gauffin Telecom AB"));
- server.Add(new WebSiteModule("www.vapadi.se", "Remote PBX"));
-
- // start regular http
- server.Start(IPAddress.Any, 80);
-
- // start https
- server.Start(IPAddress.Any, 443, myCertificate);
-
-
-
-
-
+
+ null if session is not found.
-
+
- Initializes a new instance of the class.
+ Number of minutes before a session expires.
+ Default is 20 minutes.
- Used to get all components used in the server..
-
+
- Initializes a new instance of the class.
+ Cookies that should be set.
-
+
- Initializes a new instance of the class.
+ Adds a cookie in the collection.
- Form decoders are used to convert different types of posted data to the object types.
-
-
+ cookie to add
+ cookie is null
-
+
- Initializes a new instance of the class.
+ Copy a request cookie
- A session store is used to save and retrieve sessions
-
+
+ When the cookie should expire
-
+
- Initializes a new instance of the class.
+ Gets a collection enumerator on the cookie list.
- The log writer.
-
+ collection enumerator
-
+
- Initializes a new instance of the class.
+ Remove all cookies
- Form decoders are used to convert different types of posted data to the object types.
- The log writer.
-
-
-
-
+
- Initializes a new instance of the class.
+ Returns an enumerator that iterates through the collection.
- Form decoders are used to convert different types of posted data to the object types.
- A session store is used to save and retrieve sessions
- The log writer.
-
-
-
-
+
+
+ A that can be used to iterate through the collection.
+
+ 1
-
+
- Adds the specified rule.
+ Gets the count of cookies in the collection.
- The rule.
-
+
- Add a to the server.
+ Gets the cookie of a given identifier (null if not existing).
- mode to add
-
+
- Decodes the request body.
+ Small design by contract implementation.
- The request.
- Failed to decode form data.
-
+
- Generate a HTTP error page (that will be added to the response body).
- response status code is also set.
+ Check whether a parameter is empty.
- Response that the page will be generated in.
- .
- response body contents.
+ Parameter value
+ Parameter name, or error description.
+ value is empty.
-
+
- Generate a HTTP error page (that will be added to the response body).
- response status code is also set.
+ Checks whether a parameter is null.
- Response that the page will be generated in.
- exception.
+ Parameter value
+ Parameter name, or error description.
+ value is null.
-
+
- Realms are used by the s.
+ Checks whether a parameter is null.
- HTTP request
- domain/realm.
+
+ Parameter value
+ Parameter name, or error description.
+ value is null.
-
+
- Process an incoming request.
+ Parses a HTTP request directly from a stream
- connection to client
- request information
- response that should be filled
- session information
-
+
- Can be overloaded to implement stuff when a client have been connected.
+ Event driven parser used to parse incoming HTTP requests.
- Default implementation does nothing.
+ The parser supports partial messages and keeps the states between
+ each parsed buffer. It's therefore important that the parser gets
+ ed if a client disconnects.
- client that disconnected
- disconnect reason
-
+
- Handle authentication
+ Parse partial or complete message.
-
-
-
- true if request can be handled; false if not.
- Invalid authorization header
+ buffer containing incoming bytes
+ where in buffer that parsing should start
+ number of bytes to parse
+ Unparsed bytes left in buffer.
+ BadRequestException.
-
+
- Will request authentication.
+ Clear parser state.
-
- Sends respond to client, nothing else can be done with the response after this.
-
-
-
-
-
+
- Received from a when a request have been parsed successfully.
+ Current state in parser.
- that received the request.
- The request.
-
+
- To be able to track request count.
+ A request have been successfully parsed.
-
-
-
+
- Start the web server using regular HTTP.
+ More body bytes have been received.
- IP Address to listen on, use IpAddress.Any to accept connections on all IP addresses/network cards.
- Port to listen on. 80 can be a good idea =)
- address is null.
- Port must be a positive number.
-
+
- Accept secure connections.
+ Request line have been received.
- IP Address to listen on, use to accept connections on all IP Addresses / network cards.
- Port to listen on. 80 can be a good idea =)
- Certificate to use
- address is null.
- Port must be a positive number.
-
+
- shut down the server and listeners
+ A header have been received.
-
+
- write an entry to the log file
+ Gets or sets the log writer.
- importance of the message
- log message
-
+
- write an entry to the log file
+ Create a new request parser
- object that wrote the message
- importance of the message
- log message
+ delegate receiving log entries.
-
+
- Server that is handling the current request.
+ Add a number of bytes to the body
-
- Will be set as soon as a request arrives to the object.
-
+ buffer containing more body bytes.
+ starting offset in buffer
+ number of bytes, from offset, to read.
+ offset to continue from.
-
+
- Modules used for authentication. The module that is is added first is used as
- the default authentication module.
+ Remove all state information for the request.
- Use the corresponding property
- in the if you are using multiple websites.
-
+
- Form decoder providers are used to decode request body (which normally contains form data).
+ Parse request line
+
+ If line is incorrect
+ Expects the following format: "Method SP Request-URI SP HTTP-Version CRLF"
-
+
- Server name sent in HTTP responses.
+ We've parsed a new header.
-
- Do NOT include version in name, since it makes it
- easier for hackers.
-
+ Name in lower case
+ Value, unmodified.
+ If content length cannot be parsed.
-
+
- Name of cookie where session id is stored.
+ Parse a message
+ bytes to parse.
+ where in buffer that parsing should start
+ number of bytes to parse, starting on .
+ offset (where to start parsing next).
+ BadRequestException.
-
+
- Specified where logging should go.
+ Gets or sets the log writer.
-
-
-
-
+
- Number of connections that can wait to be accepted by the server.
+ Current state in parser.
- Default is 10.
-
+
- Gets or sets maximum number of allowed simultaneous requests.
+ A request have been successfully parsed.
-
-
- This property is useful in busy systems. The HTTP server
- will start queuing new requests if this limit is hit, instead
- of trying to process all incoming requests directly.
-
-
- The default number if allowed simultaneous requests are 10.
-
-
-
+
- Gets or sets maximum number of requests queuing to be handled.
+ More body bytes have been received.
-
-
- The WebServer will start turning requests away if response code
- to indicate that the server
- is too busy to be able to handle the request.
-
-
-
+
- Realms are used during HTTP authentication.
- Default realm is same as server name.
+ Request line have been received.
-
+
- Let's to receive unhandled exceptions from the threads.
+ A header have been received.
-
- Exceptions will be thrown during debug mode if this event is not used,
- exceptions will be printed to console and suppressed during release mode.
-
-
+
- Webhelper provides helpers for common tasks in HTML.
+ The website module let's you handle multiple websites in the same server.
+ It uses the "Host" header to check which site you want.
+ It's recommended that you do not
+ add any other modules to HttpServer if you are using the website module. Instead,
+ add all wanted modules to each website.
-
+
- Used to let the website use different javascript libraries.
- Default is
+
+ domain name that should be handled.
+
-
+
- Creates a link that invokes through ajax.
+ Method that process the url
- url to fetch
- link title
-
- optional options in format "key, value, key, value".
- Javascript options starts with ':'.
-
- a link tag
-
- WebHelper.AjaxRequest("/users/add/", "Add user", "method:", "post", "onclick", "validate('this');");
-
+ Information sent by the browser about the request
+ Information that is being sent back to the client.
+ Session used to
-
+
- Builds a link that updates an element with the fetched ajax content.
+ Name of site.
- Url to fetch content from
- link title
- html element to update with the results of the ajax request.
- optional options in format "key, value, key, value"
- A link tag.
-
+
+ Container for posted form data
+
+
- A link that pop ups a Dialog (overlay div)
+ Contains some kind of input from the browser/client.
+ can be QueryString, form data or any other request body content.
- url to contents of dialog
- link title
- name/value of html attributes.
- A "a"-tag that popups a dialog when clicked
-
- WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');");
-
-
+
- Create/Open a dialog box using ajax
+ Base class for request data containers
-
-
-
-
-
+
- Close a javascript dialog window/div.
+ Adds a parameter mapped to the presented name
- javascript for closing a dialog.
-
+ The name to map the parameter to
+ The parameter value
-
+
- Create a <form> tag.
+ Returns true if the container contains the requested parameter
- name of form
- action to invoke on submit
- form should be posted as ajax
- html code
-
- WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax);
-
+ Parameter id
+ True if parameter exists
-
+
- Create a link tag.
+ Returns a request parameter
- url to go to
- link title (text that is displayed)
- html attributes, name, value, name, value
- html code
-
- WebHelper.Link("/user/show/1", "Show user", "id", "showUser", "onclick", "return confirm('Are you shure?');");
-
+ The name associated with the parameter
+
-
+
+ Representation of a non-initialized class instance
+
+
+ Variable telling the class that it is non-initialized
+
+
- Build a link
+ Initializes a new instance of the class.
- url to go to.
- title of link (displayed text)
- extra html attributes.
- a complete link
+ form name.
-
+
- Build a link
+ Initializes a new instance of the class.
- url to go to.
- title of link (displayed text)
- extra html attributes.
- a complete link
- more options
+ form name.
+ if set to true all changes will be ignored.
+ this constructor should only be used by Empty
-
+
+ Creates a deep copy of the HttpInput class
+ The object to copy
+ The function makes a deep copy of quite a lot which can be slow
+
+
- Obsolete
+ Add a new element. Form array elements are parsed
+ and added in a correct hierarchy.
- Obsolete
- Obsolete
- Obsolete
- Obsolete
- Obsolete
- Obsolete
+ Name is converted to lower case.
+
+ name is null.
+ Cannot add stuff to .
-
+
- Obsolete
+ Returns true if the class contains a with the corresponding name.
- Obsolete
- Obsolete
- Obsolete
- Obsolete
- Obsolete
- Obsolete
- Obsolete
+ The field/query string name
+ True if the value exists
-
+
- Render errors into a UL with class "errors"
+ Parses an item and returns it.
+ This function is primarily used to parse array items as in user[name].
- class used by UL-tag.
- items to list
- an unordered html list.
+
+
+
-
+
+ Outputs the instance representing all its values joined together
+
+
+
+ Returns all items as an unescaped query string.
+
+
+
- Render errors into a UL with class "errors"
+ Extracts one parameter from an array
- class used by UL-tag.
- items to list
- an unordered html list.
+ Containing the string array
+ All but the first value
+
+ string test1 = ExtractOne("system[user][extension][id]");
+ string test2 = ExtractOne(test1);
+ string test3 = ExtractOne(test2);
+ // test1 = user[extension][id]
+ // test2 = extension[id]
+ // test3 = id
+
-
+
+ Resets all data contained by class
+
+
- Render errors into a UL with class "errors"
+ Returns an enumerator that iterates through the collection.
-
-
+
+
+ A that can be used to iterate through the collection.
+
+ 1
-
+
- Generates a list with html attributes.
+ Returns an enumerator that iterates through a collection.
- StringBuilder that the options should be added to.
- attributes set by user.
- attributes set by any of the helper classes.
+
+
+ An object that can be used to iterate through the collection.
+
+ 2
-
+
- Generates a list with html attributes.
+ Form name as lower case
- StringBuilder that the options should be added to.
-
-
+
- Purpose of this class is to create a javascript toolkit independent javascript helper.
+ Get a form item.
+
+ Returns if item was not found.
-
+
+ Instance to help mark a non-initialized form
+
+
+ Initializes a form container with the specified name
+
+
- Generates a list with JS options.
+ Makes a deep copy of the input
- StringBuilder that the options should be added to.
- the javascript options. name, value pairs. each string value should be escaped by YOU!
- true if we should start with a comma.
+ The input to copy
-
+
- Removes any javascript parameters from an array of parameters
+ Adds a file to the collection of posted files
- The array of parameters to remove javascript params from
- An array of html parameters
+ The file to add
+ If the file is already added
+ If file is null
+ If the instance is HttpForm.EmptyForm which cannot be modified
-
+
- javascript action that should be added to the "onsubmit" event in the form tag.
+ Checks if the form contains a specified file
-
- All javascript option names should end with colon.
-
-
- JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);");
-
-
+ Field name of the file parameter
+ True if the file exists
+ If the instance is HttpForm.EmptyForm which cannot be modified
-
+
- Requests a url through ajax
+ Retrieves a file held by by the form
- url to fetch
- optional options in format "key, value, key, value", used in JS request object.
- a link tag
- All javascript option names should end with colon.
-
-
- JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);");
-
-
+ The identifier of the file
+ The requested file or null if the file was not found
+ If name is null or empty
+ If the instance is HttpForm.EmptyForm which cannot be modified
-
+
+ Disposes all held HttpFile's and resets values
+
+
- Ajax requests that updates an element with
- the fetched content
+ Retrieves the number of files added to the
- Url to fetch content from
- element to update
- optional options in format "key, value, key, value", used in JS updater object.
- A link tag.
- All javascript option names should end with colon.
-
-
- JSHelper.AjaxUpdater("/user/show/1", "userInfo", "onsuccess:", "alert('Successful!');");
-
-
+ 0 if no files are added
-
+
- A link that pop ups a Dialog (overlay div)
+ The request could not be understood by the server due to malformed syntax.
+ The client SHOULD NOT repeat the request without modifications.
+
+ Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php
- url to contents of dialog
- link title
- A "a"-tag that popups a dialog when clicked
- name/value of html attributes
-
- WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');");
-
-
+
- Close a javascript dialog window/div.
+ Create a new bad request exception.
- javascript for closing a dialog.
-
+ reason to why the request was bad.
-
+
- Creates a new modal dialog window
+ Create a new bad request exception.
- url to open in window.
- window title (may not be supported by all js implementations)
-
-
+ reason to why the request was bad.
+ inner exception
-
+
- PrototypeJS implementation of the javascript functions.
+ A session stored in memory.
-
+
- Requests a url through ajax
+ Interface for sessions
- url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.
- optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.
- a link tag
- onclick attribute is used by this method.
-
-
- // plain text
- JSHelper.AjaxRequest("'/user/show/1'");
-
- // ajax request using this.href
- string link = "<a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/<call user</a>";
-
-
-
+
- Determins if a list of strings contains a specific value
+ Remove everything from the session
- options to check in
- value to find
- true if value was found
- case insensitive
-
+
- Ajax requests that updates an element with
- the fetched content
+ Remove everything from the session
- URL to fetch. URL is NOT enclosed in quotes by the implementation. You need to do that yourself.
- element to update
- options in format "key, value, key, value". All keys should end with colon.
- A link tag.
-
-
- JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true");
-
-
+ True if the session is cleared due to expiration
-
+
- A link that pop ups a Dialog (overlay div)
+ Session id
- URL to contents of dialog
- link title
- name, value, name, value
-
- A "a"-tag that popups a dialog when clicked
-
- Requires Control.Modal found here: http://livepipe.net/projects/control_modal/
- And the following JavaScript (load it in application.js):
-
- Event.observe(window, 'load',
- function() {
- document.getElementsByClassName('modal').each(function(link){ new Control.Modal(link); });
- }
- );
-
-
-
- WebHelper.DialogLink("/user/show/1", "show user", "onmouseover", "alert('booh!');");
-
-
+
- create a modal dialog (usually using DIVs)
+ Should
- url to fetch
- dialog title
- javascript/html attributes. javascript options ends with colon ':'.
-
+ Name of the session variable
+ null if it's not set
+ If the object cant be serialized.
-
+
- Close a javascript dialog window/div.
+ When the session was last accessed.
+ This property is touched by the http server each time the
+ session is requested.
- javascript for closing a dialog.
-
-
+
- javascript action that should be added to the "onsubmit" event in the form tag.
+ Number of session variables.
- remember to encapsulate strings in ''
-
- All javascript option names should end with colon.
-
-
- JSHelper.AjaxRequest("/user/show/1", "onsuccess:", "$('userInfo').update(result);");
-
-
-
+
- Event driven parser used to parse incoming HTTP requests.
+ Event triggered upon clearing the session
-
- The parser supports partial messages and keeps the states between
- each parsed buffer. It's therefore important that the parser gets
- ed if a client disconnects.
-
-
+
- Parse partial or complete message.
+
- buffer containing incoming bytes
- where in buffer that parsing should start
- number of bytes to parse
- Unparsed bytes left in buffer.
- BadRequestException.
+ A unique id used by the sessions store to identify the session
-
+
- Clear parser state.
+ Id
+
-
+
- Current state in parser.
+ Remove everything from the session
-
+
- A request have been successfully parsed.
+ Clears the specified expire.
+ True if the session is cleared due to expiration
-
+
- More body bytes have been received.
+ Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
+ 2
-
+
- Request line have been received.
+ Session id
-
+
- A header have been received.
+ Should
+ Name of the session variable
+ null if it's not set
-
+
- Gets or sets the log writer.
+ when the session was last accessed.
+
+ Used to determine when the session should be removed.
+
-
+
- Current state in the parsing.
+ Number of values in the session
-
+
- Should parse the request line
+ Flag to indicate that the session have been changed
+ and should be saved into the session store.
-
+
- Searching for a complete header name
+ Event triggered upon clearing the session
-
+
- Searching for colon after header name (ignoring white spaces)
+ redirects from one URL to another.
-
+
- Searching for start of header value (ignoring white spaces)
+ Rules are used to perform operations before a request is being handled.
+ Rules can be used to create routing etc.
-
+
- Searching for a complete header value (can span over multiple lines, as long as they are prefixed with one/more whitespaces)
+ Process the incoming request.
+ incoming HTTP request
+ outgoing HTTP response
+ true if response should be sent to the browser directly (no other rules or modules will be processed).
+
+ returning true means that no modules will get the request. Returning true is typically being done
+ for redirects.
+
+ If request or response is null.
-
+
- Adding bytes to body
+ Initializes a new instance of the class.
+ Absolute path (no server name)
+ Absolute path (no server name)
+
+ server.Add(new RedirectRule("/", "/user/index"));
+
-
+
- Contains server side HTTP request information.
+ Initializes a new instance of the class.
+ Absolute path (no server name)
+ Absolute path (no server name)
+ true if request should be redirected, false if the request URI should be replaced.
+
+ server.Add(new RedirectRule("/", "/user/index"));
+
-
+
- Called during parsing of a .
+ Process the incoming request.
- Name of the header, should not be URL encoded
- Value of the header, should not be URL encoded
- If a header is incorrect.
+ incoming HTTP request
+ outgoing HTTP response
+ true if response should be sent to the browser directly (no other rules or modules will be processed).
+
+ returning true means that no modules will get the request. Returning true is typically being done
+ for redirects.
+
-
+
- Add bytes to the body
+ Gets string to match request URI with.
- buffer to read bytes from
- where to start read
- number of bytes to read
- Number of bytes actually read (same as length unless we got all body bytes).
- If body is not writable
- bytes is null.
- offset is out of range.
+ Is compared to request.Uri.AbsolutePath
-
+
- Clear everything in the request
+ Gets where to redirect.
-
+
- Decode body into a form.
+ Gets whether server should redirect client.
- A list with form decoders.
- If body contents is not valid for the chosen decoder.
- If body is still being transferred.
+
+ false means that the rule will replace
+ the current request URI with the new one from this class.
+ true means that a redirect response is sent to the client.
+
-
+
- Sets the cookies.
+ cookie sent by the client/browser
- The cookies.
+
-
+
- Create a response object.
+ Constructor.
- Context for the connected client.
- A new .
+ cookie identifier
+ cookie content
+ id or content is null
+ id is empty
-
+
- Gets kind of types accepted by the client.
+ Gets the cookie HTML representation.
+ cookie string
-
+
- Gets or sets body stream.
+ Gets the cookie identifier.
-
+
- Gets whether the body is complete.
+ Cookie value. Set to null to remove cookie.
-
+
- Gets or sets kind of connection used for the session.
+ Priority for log entries
+
-
+
- Gets or sets number of bytes in the body.
+ Very detailed logs to be able to follow the flow of the program.
-
+
- Gets cookies that was sent with the request.
+ Logs to help debug errors in the application
-
+
- Gets form parameters.
+ Information to be able to keep track of state changes etc.
-
+
- Gets headers sent by the client.
+ Something did not go as we expected, but it's no problem.
-
+
- Gets or sets version of HTTP protocol that's used.
+ Something that should not fail failed, but we can still keep
+ on going.
-
- Probably or .
-
-
-
+
- Gets whether the request was made by Ajax (Asynchronous JavaScript)
+ Something failed, and we cannot handle it properly.
-
+
- Gets or sets requested method.
+ Interface used to write to log files.
-
- Will always be in upper case.
-
-
-
+
- Gets parameter from or .
+ Write an entry to the log file.
+ object that is writing to the log
+ importance of the log message
+ the message
-
+
- Gets variables sent in the query string
+ This class writes to the console. It colors the output depending on the logprio and includes a 3-level stacktrace (in debug mode)
+
-
+
- Gets or sets requested URI.
+ The actual instance of this class.
-
+
- Gets URI absolute path divided into parts.
+ Logwriters the specified source.
-
- // URI is: http://gauffin.com/code/tiny/
- Console.WriteLine(request.UriParts[0]); // result: code
- Console.WriteLine(request.UriParts[1]); // result: tiny
-
-
- If you're using controllers than the first part is controller name,
- the second part is method name and the third part is Id property.
-
-
+ object that wrote the logentry.
+ Importance of the log message
+ The message.
-
+
- Gets or sets path and query.
+ Get color for the specified logprio
-
-
- Are only used during request parsing. Cannot be set after "Host" header have been
- added.
-
+ prio for the log entry
+ A for the prio
-
+
- Delegate used to let authentication modules authenticate the user name and password.
+ Default log writer, writes everything to null (nowhere).
- Realm that the user want to authenticate in
- User name specified by client
- Can either be user password or implementation specific token.
- object that will be stored in a session variable called if authentication was successful.
- throw forbidden exception if too many attempts have been made.
-
-
- Use to specify that the token is a HA1 token. (MD5 generated
- string from realm, user name and password); Md5String(userName + ":" + realm + ":" + password);
-
-
+
-
+
- Let's you decide on a system level if authentication is required.
+ The logging instance.
- HTTP request from client
- true if user should be authenticated.
- throw if no more attempts are allowed.
- If no more attempts are allowed
-
+
- Serves files that are stored in embedded resources.
+ Writes everything to null
+ object that wrote the log entry.
+ Importance of the log message
+ The message.
-
+
- A HttpModule can be used to serve Uri's. The module itself
- decides if it should serve a Uri or not. In this way, you can
- get a very flexible http application since you can let multiple modules
- serve almost similar urls.
+ Class that receives Requests from a .
-
- Throw if you are using a and want to prompt for user name/password.
-
-
+
- Method that process the url
+ Client have been disconnected.
- Information sent by the browser about the request
- Information that is being sent back to the client.
- Session used to
- true if this module handled the request.
+ Client that was disconnected.
+ Reason
+
-
+
- Set the log writer to use.
+ Invoked when a client context have received a new HTTP request
- logwriter to use.
+ Client that received the request.
+ Request that was received.
+
-
+
- Log something.
+ Will contain helper functions for javascript.
- importance of log message
- message
-
+
- If true specifies that the module doesn't consume the processing of a request so that subsequent modules
- can continue processing afterwards. Default is false.
+ Requests a url through ajax
+ url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.
+ optional options in format "key, value, key, value", used in JS request object. All keys should end with colon.
+ a link tag
+ onclick attribute is used by this method.
+
+
+ // plain text
+ JSHelper.AjaxRequest("'/user/show/1'");
+
+ // ajax request using this.href
+ string link = "<a href=\"/user/call/1\" onclick=\"" + JSHelper.AjaxRequest("this.href") + "/<call user</a>";
+
+
-
+
- Initializes a new instance of the class.
- Runs to make sure the basic mime types are available, they can be cleared later
- through the use of if desired.
+ Ajax requests that updates an element with
+ the fetched content
+ url to fetch. Url is NOT enclosed in quotes by the implementation. You need to do that yourself.
+ element to update
+ options in format "key, value, key, value". All keys should end with colon.
+ A link tag.
+
+
+ JSHelper.AjaxUpdater("'/user/show/1'", "user", "onsuccess:", "alert('hello');", "asynchronous:", "true");
+
+
-
+
- Initializes a new instance of the class.
- Runs to make sure the basic mime types are available, they can be cleared later
- through the use of if desired.
+ Opens contents in a dialog window.
- The log writer to use when logging events
+ url to contents of dialog
+ link title
+ name, value, name, value, all parameter names should end with colon.
-
+
- Mimtypes that this class can handle per default
+ Close a javascript dialog window/div.
+ javascript for closing a dialog.
+
-
+
- Loads resources from a namespace in the given assembly to an uri
+ Helpers making it easier to work with forms.
- The uri to map the resources to
- The assembly in which the resources reside
- The namespace from which to load the resources
-
- resourceLoader.LoadResources("/user/", typeof(User).Assembly, "MyLib.Models.User.Views");
+
+
+
+
+ Used to let the website use different JavaScript libraries.
+ Default is
+
+
+
+
+ Create a <form> tag.
+
+ name of form
+ action to invoke on submit
+ form should be posted as Ajax
+ HTML code
+
+
+ // without options
+ WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax);
- will make ie the resource MyLib.Models.User.Views.stylesheet.css accessible via /user/stylesheet.css
-
- The amount of loaded files, giving you the possibility of making sure the resources needed gets loaded
+ // with options
+ WebHelper.FormStart("frmLogin", "/user/login", Request.IsAjax, "style", "display:inline", "class", "greenForm");
+
+
+ HTML attributes or JavaScript options.
+ Method will ALWAYS be POST.
+ options must consist of name, value, name, value
-
+
- Returns true if the module can handle the request
+ Creates a select list with the values in a collection.
+ Name of the SELECT-tag
+ collection used to generate options.
+ delegate used to return id and title from objects.
+ value that should be marked as selected.
+ First row should contain an empty value.
+ string containing a SELECT-tag.
+
-
+
- Method that process the url
+ Creates a select list with the values in a collection.
- Information sent by the browser about the request
- Information that is being sent back to the client.
- Session used to
- true if this module handled the request.
+ Name of the SELECT-tag
+ Id of the SELECT-tag
+ collection used to generate options.
+ delegate used to return id and title from objects.
+ value that should be marked as selected.
+ First row should contain an empty value.
+ string containing a SELECT-tag.
+
+
+
+ // Class that is going to be used in a SELECT-tag.
+ public class User
+ {
+ private readonly string _realName;
+ private readonly int _id;
+ public User(int id, string realName)
+ {
+ _id = id;
+ _realName = realName;
+ }
+ public string RealName
+ {
+ get { return _realName; }
+ }
+
+ public int Id
+ {
+ get { return _id; }
+ }
+ }
+
+ // Using an inline delegate to generate the select list
+ public void UserInlineDelegate()
+ {
+ List<User> items = new List<User>();
+ items.Add(new User(1, "adam"));
+ items.Add(new User(2, "bertial"));
+ items.Add(new User(3, "david"));
+ string htmlSelect = Select("users", "users", items, delegate(object o, out object id, out object value)
+ {
+ User user = (User)o;
+ id = user.Id;
+ value = user.RealName;
+ }, 2, true);
+ }
+
+ // Using an method as delegate to generate the select list.
+ public void UseExternalDelegate()
+ {
+ List<User> items = new List<User>();
+ items.Add(new User(1, "adam"));
+ items.Add(new User(2, "bertial"));
+ items.Add(new User(3, "david"));
+ string htmlSelect = Select("users", "users", items, UserOptions, 1, true);
+ }
+
+ // delegate returning id and title
+ public static void UserOptions(object o, out object id, out object title)
+ {
+ User user = (User)o;
+ id = user.Id;
+ value = user.RealName;
+ }
+
+
+ name, id, collection or getIdTitle is null.
-
+
- List with all mime-type that are allowed.
+ Creates a select list with the values in a collection.
- All other mime types will result in a Forbidden http status code.
+ Name of the SELECT-tag
+ Id of the SELECT-tag
+ collection used to generate options.
+ delegate used to return id and title from objects.
+ value that should be marked as selected.
+ First row should contain an empty value.
+ name, value collection of extra HTML attributes.
+ string containing a SELECT-tag.
+
+ name, id, collection or getIdTitle is null.
+ Invalid HTML attribute list.
-
+
- The purpose of this module is to serve files.
+ Generate a list of HTML options
+ collection used to generate options.
+ delegate used to return id and title from objects.
+ value that should be marked as selected.
+ First row should contain an empty value.
+
+ collection or getIdTitle is null.
-
+
+ sb is null.
+
+
- Initializes a new instance of the class.
+ Creates a check box.
- Uri to serve, for instance "/files/"
- Path on hard drive where we should start looking for files
- If true a Last-Modifed header will be sent upon requests urging web browser to cache files
+ element name
+ element value
+ determines if the check box is selected or not. This is done differently depending on the
+ type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if
+ the box is checked or not.
+ a list with additional attributes (name, value, name, value).
+ a generated radio button
-
+
- Initializes a new instance of the class.
+ Creates a check box.
- Uri to serve, for instance "/files/"
- Path on hard drive where we should start looking for files
+ element name
+ element id
+ element value
+ determines if the check box is selected or not. This is done differently depending on the
+ type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if
+ the box is checked or not.
+ a list with additional attributes (name, value, name, value).
+ a generated radio button
+
+ value in your business object. (check box will be selected if it matches the element value)
+
-
+
- Mimtypes that this class can handle per default
+ Creates a check box.
+ element name
+ element id
+ determines if the check box is selected or not. This is done differently depending on the
+ type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if
+ the box is checked or not.
+ a list with additional attributes (name, value, name, value).
+ a generated radio button
+ will set value to "1".
-
+
- Determines if the request should be handled by this module.
- Invoked by the
+ Creates a RadioButton.
-
- true if this module should handle it.
+ element name
+ element value
+ determines if the radio button is selected or not. This is done differently depending on the
+ type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if
+ the box is checked or not.
+ a list with additional attributes (name, value, name, value).
+ a generated radio button
-
- Illegal path
+
+
+ Creates a RadioButton.
+
+ element name
+ element id
+ element value
+ determines if the radio button is selected or not. This is done differently depending on the
+ type of variable. A boolean simply triggers checked or not, all other types are compared with "value" to determine if
+ the box is checked or not.
+ a list with additional attributes (name, value, name, value).
+ a generated radio button
-
+
- check if source contains any of the chars.
+ form close tag
-
-
-
+
- Method that process the Uri.
+ Arguments sent when a is cleared
- Information sent by the browser about the request
- Information that is being sent back to the client.
- Session used to
- Failed to find file extension
- File type is forbidden.
-
+
- return a file extension from an absolute Uri path (or plain filename)
+ Instantiates the arguments for the event
-
-
+ True if the session is cleared due to expiration
-
+
- List with all mime-type that are allowed.
+ Returns true if the session is cleared due to expiration
- All other mime types will result in a Forbidden http status code.
-
+
- characters that may not exist in a path.
+ Delegate for when a IHttpSession is cleared
+
+ this is being cleared.
+ Arguments for the clearing
+
+
+
+ Used to queue incoming requests.
+
+
+
+
+ Initializes a new instance of the class.
+
+ Called when a request should be processed.
+
+
+
+ Used to process queued requests.
+
+
+
+
+ Gets or sets maximum number of allowed simultaneous requests.
+
+
+
+
+ Gets or sets maximum number of requests queuing to be handled.
+
+
+
+
+ Specifies how many requests the HTTP server is currently processing.
+
+
+
+
+ Used two queue incoming requests to avoid
+ thread starvation.
+
+
+
+
+ Method used to process a queued request
+
+ Context that the request was received from.
+ Request to process.
+
+
+
+ Creates request parsers when needed.
+
+
+
+ Creates request parsers when needed.
+
+
+
+
+ Create a new request parser.
+
+ Used when logging should be enabled.
+ A new request parser.
+
+
+
+ Create a new request parser.
+
+ Used when logging should be enabled.
+ A new request parser.
+
+
+
+ Response that is sent back to the web browser / client.
+
+
+
+ A response can be sent if different ways. The easiest one is
+ to just fill the Body stream with content, everything else
+ will then be taken care of by the framework. The default content-type
+ is text/html, you should change it if you send anything else.
+
+ The second and slightly more complex way is to send the response
+ as parts. Start with sending the header using the SendHeaders method and
+ then you can send the body using SendBody method, but do not forget
+ to set and before doing so.
+
+
- fileMod.ForbiddenChars = new string[]{ "\\", "..", ":" };
+
+ // Example using response body.
+ class MyModule : HttpModule
+ {
+ public override bool Process(IHttpRequest request, IHttpResponse response, IHttpSession session)
+ {
+ StreamWriter writer = new StreamWriter(response.Body);
+ writer.WriteLine("Hello dear World!");
+ writer.Flush();
+
+ // return true to tell webserver that we've handled the url
+ return true;
+ }
+ }
+
+ todo: add two examples, using SendHeaders/SendBody and just the Body stream.
-
- Container for posted form data
+
+
+ Response that is sent back to the web browser / client.
+
+ A response can be sent if different ways. The easiest one is
+ to just fill the Body stream with content, everything else
+ will then be taken care of by the framework. The default content-type
+ is text/html, you should change it if you send anything else.
+
+ The second and slighty more complex way is to send the response
+ as parts. Start with sending the header using the SendHeaders method and
+ then you can send the body using SendBody method, but do not forget
+ to set ContentType and ContentLength before doing so.
+
+
+ public void MyHandler(IHttpRequest request, IHttpResponse response)
+ {
+
+ }
+
-
+
- Contains some kind of input from the browser/client.
- can be QueryString, form data or any other request body content.
+ Add another header to the document.
+ Name of the header, case sensitive, use lower cases.
+ Header values can span over multiple lines as long as each line starts with a white space. New line chars should be \r\n
+ If headers already been sent.
+ If value conditions have not been met.
+ Adding any header will override the default ones and those specified by properties.
-
+
- Base class for request data containers
+ Send headers and body to the browser.
+ If content have already been sent.
-
+
- Adds a parameter mapped to the presented name
+ Make sure that you have specified ContentLength and sent the headers first.
- The name to map the parameter to
- The parameter value
+
+ If headers have not been sent.
+
+ offest of first byte to send
+ number of bytes to send.
+
+
+ This method can be used if you want to send body contents without caching them first. This
+ is recommended for larger files to keep the memory usage low.
-
+
- Returns true if the container contains the requested parameter
+ Make sure that you have specified ContentLength and sent the headers first.
- Parameter id
- True if parameter exists
+
+ If headers have not been sent.
+
+
+
+ This method can be used if you want to send body contents without caching them first. This
+ is recommended for larger files to keep the memory usage low.
-
+
- Returns a request parameter
+ Send headers to the client.
- The name associated with the parameter
-
-
-
- Representation of a non-initialized class instance
-
-
- Variable telling the class that it is non-initialized
+ If headers already been sent.
+
+
+
-
+
- Initializes a new instance of the class.
+ Redirect client to somewhere else using the 302 status code.
- form name.
+ Destination of the redirect
+ If headers already been sent.
+ You can not do anything more with the request when a redirect have been done. This should be your last
+ action.
-
+
- Initializes a new instance of the class.
+ redirect to somewhere
- form name.
- if set to true all changes will be ignored.
- this constructor should only be used by Empty
-
-
- Creates a deep copy of the HttpInput class
- The object to copy
- The function makes a deep copy of quite a lot which can be slow
+ where the redirect should go
+
+ No body are allowed when doing redirects.
+
-
+
- Add a new element. Form array elements are parsed
- and added in a correct hierarchy.
+ The body stream is used to cache the body contents
+ before sending everything to the client. It's the simplest
+ way to serve documents.
- Name is converted to lower case.
-
- name is null.
- Cannot add stuff to .
-
+
- Returns true if the class contains a with the corresponding name.
+ Defines the version of the HTTP Response for applications where it's required
+ for this to be forced.
- The field/query string name
- True if the value exists
-
+
- Parses an item and returns it.
- This function is primarily used to parse array items as in user[name].
+ The chunked encoding modifies the body of a message in order to
+ transfer it as a series of chunks, each with its own size indicator,
+ followed by an OPTIONAL trailer containing entity-header fields. This
+ allows dynamically produced content to be transferred along with the
+ information necessary for the recipient to verify that it has
+ received the full message.
-
-
-
-
-
- Outputs the instance representing all its values joined together
-
-
-
- Returns all items as an unescaped query string.
-
-
+
- Extracts one parameter from an array
+ Kind of connection
- Containing the string array
- All but the first value
-
- string test1 = ExtractOne("system[user][extension][id]");
- string test2 = ExtractOne(test1);
- string test3 = ExtractOne(test2);
- // test1 = user[extension][id]
- // test2 = extension[id]
- // test3 = id
-
-
-
- Resets all data contained by class
-
+
- Returns an enumerator that iterates through the collection.
+ Encoding to use when sending stuff to the client.
-
-
- A that can be used to iterate through the collection.
-
- 1
+ Default is UTF8
-
+
- Returns an enumerator that iterates through a collection.
+ Number of seconds to keep connection alive
-
-
- An object that can be used to iterate through the collection.
-
- 2
+ Only used if Connection property is set to ConnectionType.KeepAlive
-
+
- Form name as lower case
+ Status code that is sent to the client.
+ Default is HttpStatusCode.Ok
-
+
- Get a form item.
+ Information about why a specific status code was used.
-
- Returns if item was not found.
-
- Instance to help mark a non-initialized form
-
-
- Initializes a form container with the specified name
-
-
+
- Makes a deep copy of the input
+ Size of the body. MUST be specified before sending the header,
+ unless property Chunked is set to true.
- The input to copy
-
+
- Adds a file to the collection of posted files
+ Kind of content in the body
- The file to add
- If the file is already added
- If file is null
- If the instance is HttpForm.EmptyForm which cannot be modified
+ Default is text/html
-
+
- Checks if the form contains a specified file
+ Headers have been sent to the client-
- Field name of the file parameter
- True if the file exists
- If the instance is HttpForm.EmptyForm which cannot be modified
+ You can not send any additional headers if they have already been sent.
-
+
- Retrieves a file held by by the form
+ The whole response have been sent.
- The identifier of the file
- The requested file or null if the file was not found
- If name is null or empty
- If the instance is HttpForm.EmptyForm which cannot be modified
-
-
- Disposes all held HttpFile's and resets values
-
+
- Retrieves the number of files added to the
+ Cookies that should be created/changed.
- 0 if no files are added
-
+
- Small design by contract implementation.
+ Initializes a new instance of the class.
+ Client that send the .
+ Contains information of what the client want to receive.
+ cannot be empty.
-
+
- Check whether a parameter is empty.
+ Initializes a new instance of the class.
- Parameter value
- Parameter name, or error description.
- value is empty.
+ Client that send the .
+ Version of HTTP protocol that the client uses.
+ Type of HTTP connection used.
-
+
- Checks whether a parameter is null.
+ Add another header to the document.
- Parameter value
- Parameter name, or error description.
- value is null.
+ Name of the header, case sensitive, use lower cases.
+ Header values can span over multiple lines as long as each line starts with a white space. New line chars should be \r\n
+ If headers already been sent.
+ If value conditions have not been met.
+ Adding any header will override the default ones and those specified by properties.
-
+
- Checks whether a parameter is null.
+ Send headers and body to the browser.
-
- Parameter value
- Parameter name, or error description.
- value is null.
+ If content have already been sent.
-
+
- The "basic" authentication scheme is based on the model that the
- client must authenticate itself with a user-ID and a password for
- each realm. The realm value should be considered an opaque string
- which can only be compared for equality with other realms on that
- server. The server will service the request only if it can validate
- the user-ID and password for the protection space of the Request-URI.
- There are no optional authentication parameters.
+ Make sure that you have specified and sent the headers first.
+
+ If headers have not been sent.
+
+ offset of first byte to send
+ number of bytes to send.
+
+
+ This method can be used if you want to send body contents without caching them first. This
+ is recommended for larger files to keep the memory usage low.
-
+
- Initializes a new instance of the class.
+ Make sure that you have specified and sent the headers first.
- Delegate used to provide information used during authentication.
- Delegate used to determine if authentication is required (may be null).
+
+ If headers have not been sent.
+
+
+
+ This method can be used if you want to send body contents without caching them first. This
+ is recommended for larger files to keep the memory usage low.
-
+
- Initializes a new instance of the class.
+ Send headers to the client.
- Delegate used to provide information used during authentication.
+ If headers already been sent.
+
+
+
-
+
- Create a response that can be sent in the WWW-Authenticate header.
+ Redirect client to somewhere else using the 302 status code.
- Realm that the user should authenticate in
- Not used in basic auth
- A correct auth request.
+ Destination of the redirect
+ If headers already been sent.
+ You can not do anything more with the request when a redirect have been done. This should be your last
+ action.
-
+
- An authentication response have been received from the web browser.
- Check if it's correct
+ redirect to somewhere
- Contents from the Authorization header
- Realm that should be authenticated
- GET/POST/PUT/DELETE etc.
- Not used in basic auth
- Authentication object that is stored for the request. A user class or something like that.
- if authenticationHeader is invalid
- If any of the paramters is empty or null.
+ where the redirect should go
+
+ No body are allowed when doing redirects.
+
-
+
- name used in http request.
+ The body stream is used to cache the body contents
+ before sending everything to the client. It's the simplest
+ way to serve documents.
-
+
- Rules are used to perform operations before a request is being handled.
- Rules can be used to create routing etc.
+ The chunked encoding modifies the body of a message in order to
+ transfer it as a series of chunks, each with its own size indicator,
+ followed by an OPTIONAL trailer containing entity-header fields. This
+ allows dynamically produced content to be transferred along with the
+ information necessary for the recipient to verify that it has
+ received the full message.
-
+
- Process the incoming request.
+ Defines the version of the HTTP Response for applications where it's required
+ for this to be forced.
- incoming HTTP request
- outgoing HTTP response
- true if response should be sent to the browser directly (no other rules or modules will be processed).
-
- returning true means that no modules will get the request. Returning true is typically being done
- for redirects.
-
- If request or response is null.
-
+
- Delegate used by to populate select options.
+ Kind of connection
- current object (for instance a User).
- Text that should be displayed in the value part of a <optiongt;-tag.
- Text shown in the select list.
-
- // Class that is going to be used in a SELECT-tag.
- public class User
- {
- private readonly string _realName;
- private readonly int _id;
- public User(int id, string realName)
- {
- _id = id;
- _realName = realName;
- }
- public string RealName
- {
- get { return _realName; }
- }
-
- public int Id
- {
- get { return _id; }
- }
- }
-
- // Using an inline delegate to generate the select list
- public void UserInlineDelegate()
- {
- List<User> items = new List<User>();
- items.Add(new User(1, "adam"));
- items.Add(new User(2, "bertial"));
- items.Add(new User(3, "david"));
- string htmlSelect = Select("users", "users", items, delegate(object o, out object id, out object value)
- {
- User user = (User)o;
- id = user.Id;
- value = user.RealName;
- }, 2, true);
- }
-
- // Using an method as delegate to generate the select list.
- public void UseExternalDelegate()
- {
- List<User> items = new List<User>();
- items.Add(new User(1, "adam"));
- items.Add(new User(2, "bertial"));
- items.Add(new User(3, "david"));
- string htmlSelect = Select("users", "users", items, UserOptions, 1, true);
- }
-
- // delegate returning id and title
- public static void UserOptions(object o, out object id, out object title)
- {
- User user = (User)o;
- id = user.Id;
- value = user.RealName;
- } ///
-
+
- This class is created as a wrapper, since there are two different cookie types in .Net (Cookie and HttpCookie).
- The framework might switch class in the future and we dont want to have to replace all instances
+ Encoding to use when sending stuff to the client.
+ Default is UTF8
-
+
- Let's copy all the cookies.
+ Number of seconds to keep connection alive
- value from cookie header.
+ Only used if Connection property is set to .
-
+
- Adds a cookie in the collection.
+ Status code that is sent to the client.
- cookie to add
- cookie is null
+ Default is
-
+
- Gets a collection enumerator on the cookie list.
+ Information about why a specific status code was used.
- collection enumerator
-
+
- Remove all cookies.
+ Size of the body. MUST be specified before sending the header,
+ unless property Chunked is set to true.
-
+
- Returns an enumerator that iterates through the collection.
+ Kind of content in the body
-
-
- A that can be used to iterate through the collection.
-
- 1
+ Default type is "text/html"
-
+
- Remove a cookie from the collection.
+ Headers have been sent to the client-
- Name of cookie.
+ You can not send any additional headers if they have already been sent.
-
+
- Gets the count of cookies in the collection.
+ The whole response have been sent.
-
+
- Gets the cookie of a given identifier (null if not existing).
+ Cookies that should be created/changed.
-
+
- The request could not be understood by the server due to malformed syntax.
- The client SHOULD NOT repeat the request without modifications.
-
- Text taken from: http://www.submissionchamber.com/help-guides/error-codes.php
+ Used to create and reuse contexts.
-
+
- Create a new bad request exception.
+ Used to create es.
- reason to why the request was bad.
-
+
- Create a new bad request exception.
+ Creates a that handles a connected client.
- reason to why the request was bad.
- inner exception
+ Client socket (accepted by the ).
+ A creates .
-
+
- A session store is used to store and load sessions on a media.
- The default implementation () saves/retrieves sessions from memory.
+ Create a secure .
+ Client socket (accepted by the ).
+ HTTPS certificate to use.
+ Kind of HTTPS protocol. Usually TLS or SSL.
+ A created .
-
+
- Creates a new http session with a generated id.
+ A request have been received from one of the contexts.
- A object
-
+
- Creates a new http session with a specific id
+ Initializes a new instance of the class.
- Id used to identify the new cookie..
- A object.
-
- Id should be generated by the store implementation if it's null or .
-
+ The writer.
+ Amount of bytes to read from the incoming socket stream.
+ Used to create a request parser.
-
+
- Load an existing session.
+ Create a new context.
- Session id (usually retrieved from a client side cookie).
- A session if found; otherwise null.
+ true if socket is running HTTPS.
+ Client that connected
+ Network/SSL stream.
+ A context.
-
+
- Save an updated session to the store.
+ Create a new context.
- Session id (usually retrieved from a client side cookie).
- If Id property have not been specified.
+ true if HTTPS is used.
+ Remote client
+ Network stream, uses .
+ A new context (always).
-
+
- We use the flyweight pattern which reuses small objects
- instead of creating new each time.
+ Create a secure .
- Unused session that should be reused next time Create is called.
+ Client socket (accepted by the ).
+ HTTPS certificate to use.
+ Kind of HTTPS protocol. Usually TLS or SSL.
+
+ A created .
+
-
+
- Remove expired sessions
+ Creates a