public void parseRequest()
{
String request = streamReadLine( inputStream );
string[] tokens = request.Split( ' ' );
if (tokens.Length != 3)
{
throw new Exception( "invalid http request line" );
}
http_method = tokens[0].ToUpper();
http_url = tokens[1];
http_protocol_versionstring = tokens[2];
string[] parts = http_url.Split( '?' );
contextPath = parts[0];
if (parts.Length > 1)
{
string[] props = parts[1].Split( '&' );
foreach (String propPair in props)
{
string[] pair = propPair.Split( '=' );
String key = pair[0];
String value = null;
if (pair.Length > 1)
value = pair[1];
properties.Add( key, value );
}
}
Console.WriteLine( "starting: " + request );
}