insert loop into RequestHandler that waits for interrupt() by server thread
wait on input stream for client request, then parse a whole request deliver response, then wait for next request unless the connection was closed due to any reasen (4xx, 5xx, Exception, Request-Header, Protocol version, ...)
Welche HTTP-Protokollversion soll verwendet werden, wenn der Parser bereits die Request Line nicht parsen kann und somit auch keine Protokollversion vorliegt? Default HTTP-Version?
HTTP/0.9 response currently do send response headers along the entity body but rfc1945 clearly state that a server must not send any headers along simple responses.
The system shall support name based virtual hosts.
Virtual hosts are read in by configuration files
One vh is the default vh (configured)
Virtual host is selected based on request header (Host: xxx)
If requested vh is not found, the default vh is used.
It could make sense to implement a static method ServerContexManager::getContext(String vhostName); which returns the ServerContext object that matches the vhostName or the default host if none is found.
Wie wird mit white space bei header field values umgegangen?
Darf man ein trim() auf dem value ausführen, oder gehört white space vor und nach etwaigen values dazu?
Ist "" ein gültiger value?
Wie sieht das white space handling bei extended header fields aus?