Please contribute

Feb 10, 2010 at 9:40 AM

I would be glad if someone could help me create headers and header parsers.

All headers can be found in the HTML specification:


Start with creating a class (all header classes should have Header as suffix: 'ContentTypeHeader') in the HttpServer.Headers namespace. It should derive IHeader and have a constant called NAME (capitalized header name).

The description from the HTML specification should be copied into the header.


Next thing to do is to create the parser. Create a class ('ContentTypeParser') in the HttpServer.Headers.Parser namespace and let it implement IHeaderParser. Add the ParserFor attribute, it will make the library automatically add the parser into the header factory.



public class ContentTypeParser : IHeaderParser
	public IHeader Parse(string name, ITextReader reader)
		string contentType = reader.ReadToEnd(';');

		// got parameters
		if (reader.Current == ';')
			HeaderParameterCollection parameters = HeaderParameterCollection.Parse(reader);
			return new ContentTypeHeader(contentType, parameters);

		return new ContentTypeHeader(contentType);



Feb 26, 2010 at 10:39 AM


Do you still need the Coordinator?

Feb 26, 2010 at 10:54 AM

Contributions are still welcome.

Feb 26, 2010 at 11:07 AM
Hi jgauffin,
That sounds good. I would use my free time to help with you. Could you show me what I could do now?
Best wishes,
Peica Chen
Mar 2, 2010 at 9:56 AM

You can create more headers (check first message in this thread)