src/server/daemon/httprequest.c

branch
aio
changeset 191
391ccd490d97
parent 159
9ba9f8befa80
child 193
aa8393527b1e
equal deleted inserted replaced
190:1f73302461e0 191:391ccd490d97
110 110
111 // fill session structure 111 // fill session structure
112 sn->connection = request->connection; 112 sn->connection = request->connection;
113 sn->netbuf = request->netbuf; 113 sn->netbuf = request->netbuf;
114 sn->sn.pool = pool; 114 sn->sn.pool = pool;
115 //sn->sn.csd = stream_new_from_fd(pool, request->connection->fd); 115 SessionHandler *sh = request->connection->session_handler;
116 //sn->sn.csd = net_stream_from_fd(pool, request->connection->fd); 116 WSBool ssl;
117 IOStream *io; 117 IOStream *io = sh->create_iostream(sh, request->connection, pool, &ssl);
118 if(request->connection->ssl) {
119 io = sslstream_new(pool, request->connection->ssl);
120 sn->sn.ssl = 1;
121 } else {
122 io = sysstream_new(pool, request->connection->fd);
123 }
124 sn->sn.csd = httpstream_new(pool, io); 118 sn->sn.csd = httpstream_new(pool, io);
125 119 sn->sn.ssl = ssl;
126 120
127 sn->sn.client = pblock_create_pool(sn->sn.pool, 8); 121 sn->sn.client = pblock_create_pool(sn->sn.pool, 8);
128 sn->sn.next = NULL; 122 sn->sn.next = NULL;
129 sn->sn.fill = 1; 123 sn->sn.fill = 1;
130 sn->sn.subject = NULL; 124 sn->sn.subject = NULL;

mercurial