Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>
intrude import libevent
-redef class Connection
+# Connection rebuilding HTTP requests
+#
+# Subclass should refine `read_full_request` and avoid `read_callback`.
+class HTTPConnection
+ super Connection
private var in_request = false
private var in_header = false
# A server handling a single connection
class HttpServer
- super Connection
+ super HTTPConnection
# The associated `HttpFactory`
var factory: HttpFactory
- # Init the server using `HttpFactory`.
- init(buf_ev: NativeBufferEvent, factory: HttpFactory) is old_style_init do
- self.factory = factory
- end
-
private var parser = new HttpRequestParser is lazy
redef fun read_callback(str)