src/server/daemon/httprequest.c

changeset 110
43a746e905f6
parent 106
b122f34ddc80
child 114
c3a0f1275d71
--- a/src/server/daemon/httprequest.c	Sat Oct 31 20:10:21 2015 +0100
+++ b/src/server/daemon/httprequest.c	Tue Nov 10 21:11:06 2015 +0100
@@ -109,11 +109,13 @@
     sn->sn.pool = pool;
     //sn->sn.csd = stream_new_from_fd(pool, request->connection->fd);
     //sn->sn.csd = net_stream_from_fd(pool, request->connection->fd);
+    IOStream *io;
     if(request->connection->ssl) {
-        sn->sn.csd = net_ssl_stream(pool, request->connection->ssl);
+        io = sslstream_new(pool, request->connection->ssl);
     } else {
-        sn->sn.csd = net_stream_from_fd(pool, request->connection->fd);
+        io = sysstream_new(pool, request->connection->fd);
     }
+     sn->sn.csd = httpstream_new(pool, io);
     
     
     sn->sn.client = pblock_create_pool(sn->sn.pool, 8);
@@ -295,9 +297,7 @@
         netbuf *nb = request->netbuf;
 
         // create new netbuf
-        NetIOStream *net_io = (NetIOStream*)net_stream_from_fd(
-                pool,
-                request->connection->fd);
+        HttpStream *net_io = (HttpStream*)httpstream_new(pool, io);
         net_io->max_read = ctlen;
         
         sn->sn.inbuf = pool_malloc(pool, sizeof(netbuf));

mercurial