You can subscribe to this list here.
2005 |
Jan
|
Feb
(53) |
Mar
(62) |
Apr
(88) |
May
(55) |
Jun
(204) |
Jul
(52) |
Aug
|
Sep
(1) |
Oct
(94) |
Nov
(15) |
Dec
(68) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(130) |
Feb
(105) |
Mar
(34) |
Apr
(61) |
May
(41) |
Jun
(92) |
Jul
(176) |
Aug
(102) |
Sep
(247) |
Oct
(69) |
Nov
(32) |
Dec
(140) |
2007 |
Jan
(58) |
Feb
(51) |
Mar
(11) |
Apr
(20) |
May
(34) |
Jun
(37) |
Jul
(18) |
Aug
(60) |
Sep
(41) |
Oct
(105) |
Nov
(19) |
Dec
(14) |
2008 |
Jan
(3) |
Feb
|
Mar
(7) |
Apr
(5) |
May
(123) |
Jun
(5) |
Jul
(1) |
Aug
(29) |
Sep
(15) |
Oct
(21) |
Nov
(51) |
Dec
(3) |
2009 |
Jan
|
Feb
(36) |
Mar
(29) |
Apr
|
May
|
Jun
(7) |
Jul
(4) |
Aug
|
Sep
(4) |
Oct
|
Nov
(13) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(9) |
Apr
(11) |
May
(16) |
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2011 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2012 |
Jan
(7) |
Feb
(3) |
Mar
|
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
(92) |
Nov
(28) |
Dec
(16) |
2013 |
Jan
(9) |
Feb
(2) |
Mar
|
Apr
(4) |
May
(4) |
Jun
(6) |
Jul
(14) |
Aug
(12) |
Sep
(4) |
Oct
(13) |
Nov
(1) |
Dec
(6) |
2014 |
Jan
(23) |
Feb
(19) |
Mar
(10) |
Apr
(14) |
May
(11) |
Jun
(6) |
Jul
(11) |
Aug
(15) |
Sep
(41) |
Oct
(95) |
Nov
(23) |
Dec
(11) |
2015 |
Jan
(3) |
Feb
(9) |
Mar
(19) |
Apr
(3) |
May
(1) |
Jun
(3) |
Jul
(11) |
Aug
(1) |
Sep
(15) |
Oct
(5) |
Nov
(2) |
Dec
|
2016 |
Jan
(7) |
Feb
(11) |
Mar
(8) |
Apr
(1) |
May
(3) |
Jun
(17) |
Jul
(12) |
Aug
(3) |
Sep
(5) |
Oct
(19) |
Nov
(12) |
Dec
(6) |
2017 |
Jan
(30) |
Feb
(23) |
Mar
(12) |
Apr
(32) |
May
(27) |
Jun
(7) |
Jul
(13) |
Aug
(16) |
Sep
(6) |
Oct
(11) |
Nov
|
Dec
(12) |
2018 |
Jan
(1) |
Feb
(5) |
Mar
(6) |
Apr
(7) |
May
(23) |
Jun
(3) |
Jul
(2) |
Aug
(1) |
Sep
(6) |
Oct
(6) |
Nov
(10) |
Dec
(3) |
2019 |
Jan
(26) |
Feb
(15) |
Mar
(9) |
Apr
|
May
(8) |
Jun
(14) |
Jul
(10) |
Aug
(10) |
Sep
(4) |
Oct
(2) |
Nov
(20) |
Dec
(10) |
2020 |
Jan
(10) |
Feb
(14) |
Mar
(29) |
Apr
(11) |
May
(25) |
Jun
(21) |
Jul
(23) |
Aug
(12) |
Sep
(19) |
Oct
(6) |
Nov
(8) |
Dec
(12) |
2021 |
Jan
(29) |
Feb
(9) |
Mar
(8) |
Apr
(8) |
May
(2) |
Jun
(2) |
Jul
(9) |
Aug
(9) |
Sep
(3) |
Oct
(4) |
Nov
(12) |
Dec
(13) |
2022 |
Jan
(4) |
Feb
|
Mar
(4) |
Apr
(12) |
May
(15) |
Jun
(7) |
Jul
(10) |
Aug
(2) |
Sep
|
Oct
(1) |
Nov
(8) |
Dec
|
2023 |
Jan
(15) |
Feb
|
Mar
(23) |
Apr
(1) |
May
(2) |
Jun
(10) |
Jul
|
Aug
(22) |
Sep
(19) |
Oct
(2) |
Nov
(20) |
Dec
|
2024 |
Jan
(1) |
Feb
|
Mar
(16) |
Apr
(15) |
May
(6) |
Jun
(4) |
Jul
(1) |
Aug
(1) |
Sep
|
Oct
(13) |
Nov
(18) |
Dec
(6) |
2025 |
Jan
(12) |
Feb
|
Mar
(2) |
Apr
(1) |
May
(11) |
Jun
(5) |
Jul
(4) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Jeff R. <dv...@di...> - 2008-10-24 19:27:04
|
Vasiljevic Zoran wrote: > He you socket/driver gurus out there! > > What are my options if I want to have NS listen > to more than one port? > > We have the setup with just one virtual servers > and listen on 0.0.0.0 address (all interfaces). > What we would like to do is to listen on 1 more > port but if possible from the same virtual server. > I would not like to complicate things by introducing > a second virtual server, it at all possible. > > Ideas? Naviserver may have changed enough underneath to be different here, but in aolserver, you can load the nssock module twice under different names and configure them separately. Kind of like how the ssl driver is loaded separately from the plain socket driver. I've used a config like this to accomplish it: [ns/server/s/modules] ns_param nssock nssock.so ns_param nssock2 nssock.so [ns/server/s/module/nssock] ns_param Address bla.example.com ns_param Port 80 [ns/server/s/module/nssock2[ ns_param Address bla.example.com ns_param Port 8822 -J |
From: Vlad S. <vl...@cr...> - 2008-10-24 19:08:07
|
Just load nssock second time with different name ns_section ns/server/modules ns_param nssock nssock.so ns_param nssock2 nssock.so ns_section ns/server/module/nssock ns_param port 90 ns_section ns/server/module/nssock2 ns_param port 81 Vasiljevic Zoran wrote: > He you socket/driver gurus out there! > > What are my options if I want to have NS listen > to more than one port? > > We have the setup with just one virtual servers > and listen on 0.0.0.0 address (all interfaces). > What we would like to do is to listen on 1 more > port but if possible from the same virtual server. > I would not like to complicate things by introducing > a second virtual server, it at all possible. > > Ideas? > > Zoran > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |
From: Vasiljevic Z. <zv...@ar...> - 2008-10-24 19:01:44
|
He you socket/driver gurus out there! What are my options if I want to have NS listen to more than one port? We have the setup with just one virtual servers and listen on 0.0.0.0 address (all interfaces). What we would like to do is to listen on 1 more port but if possible from the same virtual server. I would not like to complicate things by introducing a second virtual server, it at all possible. Ideas? Zoran |
From: Vlad S. <vl...@cr...> - 2008-10-22 22:39:04
|
I will try to take a look at this. With new API i could not figure out about pre-apending request data in Recv callback, so i had to come up with the solution which is almost the same as before. It is just that now i need in my driver to keep track when actual binary data starts and i have to force driver to parse data that nobody need anyway, using more memory. Empty request now is supported, the work is done once and server can server requests without HTTP request at all. Is this so bad? Stephen Deasey wrote: > On Wed, Oct 22, 2008 at 8:36 PM, Vlad Seryakov <vl...@cr...> wrote: >>> static ssize_t >>> Recv(Ns_Sock *sock, struct iovec *bufs, int nbufs, Ns_Time >>> *timeoutPtr, int flags) >>> { >>> static const char request[] = "GET /whateva HTTP/1.0\r\n\r\n"; >>> size_t requestLen = sizeof(request); >>> socklen_t sockLen = sizeof(struct sockaddr_in); >>> >>> memcpy(bufs->iov_base, request, requestLen); >>> >>> return recvfrom(sock->sock, >>> bufs->iov_base + requestLen, >>> bufs->iov_len - requestLen, >>> 0, (struct sockaddr*) &sock->sa, &size); >>> } >>> >>> (checking for buffer lengths skipped here) >>> >>> >>> The advantage of doing it this way is that everything is much simpler >>> from the driver threads point of view. It doesn't need to know >>> anything special about non-standard protocols, and there isn't >>> anything in the driver callback api that isn't also useful to the HTTP >>> server. >> >> Arguable this is not very clear and simple, driver will have to hack >> buffers and every request should pretend to be HTTP just so driver >> thread would think that it serves only HTTP requests. > > > It's clear and simple. It's maybe not very pretty :-) > > >> If we have special codes and already have 3, does another one breaks >> anythings if only one code makes overall process simpler not only in >> driver thread but for drivers itself? > > > It's a trade off. > > Either non-standard drivers prepend their first read with 20 bytes in Recv(). > (~ two lines of code) > > *OR* > > You need to change all parts of the sever that expect an HTTP request > structure to be available. AND you need to account for the fact that > sometimes it gets created in the normal fashion, but other times it > gets created later, or not at all. > > > You've tried to ways to do this: > > > 1) Exposing a new Ns_DriverSetRequest routine. > > Here's what it looked like in nssyslogd: > > http://naviserver.cvs.sourceforge.net/viewvc/naviserver/modules/nssyslogd/nssyslogd.c?revision=1.18&view=markup > > NS_EXPORT int > Ns_ModuleInit(char *server, char *module) > { > ... > Ns_RegisterRequest(server, "SYSLOG", "/", SyslogRequestProc, > NULL, srvPtr, 0); > ... > } > > static NS_DRIVER_ACCEPT_STATUS > Accept(Ns_Sock *sock, SOCKET listensock, struct sockaddr *sockaddrPtr, > int *socklenPtr) > { > sock->sock = listensock; > Ns_DriverSetRequest(sock, "SYSLOG / HTTP/1.0"); > return NS_DRIVER_ACCEPT_DATA; > } > > > How is this functionally different to what I proposed (example in Recv above)? > > > 2) Doing away with the need for a Ns_Request all together. > > Which now looks like this: > > http://naviserver.cvs.sourceforge.net/viewvc/naviserver/modules/nssyslogd/nssyslogd.c?revision=1.19&view=markup > > NS_EXPORT int > Ns_ModuleInit(char *server, char *module) > { > ... > init.requestProc = Request; > ... > init.opts = NS_DRIVER_ASYNC | NS_DRIVER_NOPARSE; > ... > } > > static int > Request(void *arg, Ns_Conn *conn) > { > Ns_DString *dsPtr = Ns_ConnSockContent(conn); > SyslogRequest *req = SyslogRequestCreate(server, sockPtr->sock, > dsPtr->string, dsPtr->length, &sa); > SyslogRequestProcess(req); > ... > } > > > The strategy here seems to be to completely ignore the standard > request structure and do your own thing. There's nothing wrong with > this in the abstract -- you're not actually using any of the HTTP > stuff. However, the rest of the server fully expects the HTTP request > to be present and filled in, and this is why you've had to touch > dozens of files in dozens of places fixing up all code that might trip > over a null request field. (And the public API has changed...) > > > As far as I can see, neither method 1 or 2 achieves anything than > passing "METHOD / HTTP/1.0\r\n\r\n" does, using considerably less > code. > > For example, In the snippet above, you can see the newly added > Ns_ConnSockContent which returns a pointer to the read buffer (which > is otherwise private). Ordinarily the buffer would contain the HTTP > request line, any headers, then any body. You can get at the body with > the existing Ns_ConnContent. So if you just return "SYSLOG / > HTTP/1.0\r\n\r\n" and then your bytes in Recv(), the request would be > constructed and then you could parse the protocol beginning in the > body content. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |
From: Stephen D. <sd...@gm...> - 2008-10-22 22:28:26
|
On Wed, Oct 22, 2008 at 8:36 PM, Vlad Seryakov <vl...@cr...> wrote: >> >> static ssize_t >> Recv(Ns_Sock *sock, struct iovec *bufs, int nbufs, Ns_Time >> *timeoutPtr, int flags) >> { >> static const char request[] = "GET /whateva HTTP/1.0\r\n\r\n"; >> size_t requestLen = sizeof(request); >> socklen_t sockLen = sizeof(struct sockaddr_in); >> >> memcpy(bufs->iov_base, request, requestLen); >> >> return recvfrom(sock->sock, >> bufs->iov_base + requestLen, >> bufs->iov_len - requestLen, >> 0, (struct sockaddr*) &sock->sa, &size); >> } >> >> (checking for buffer lengths skipped here) >> >> >> The advantage of doing it this way is that everything is much simpler >> from the driver threads point of view. It doesn't need to know >> anything special about non-standard protocols, and there isn't >> anything in the driver callback api that isn't also useful to the HTTP >> server. > > > Arguable this is not very clear and simple, driver will have to hack > buffers and every request should pretend to be HTTP just so driver > thread would think that it serves only HTTP requests. It's clear and simple. It's maybe not very pretty :-) > If we have special codes and already have 3, does another one breaks > anythings if only one code makes overall process simpler not only in > driver thread but for drivers itself? It's a trade off. Either non-standard drivers prepend their first read with 20 bytes in Recv(). (~ two lines of code) *OR* You need to change all parts of the sever that expect an HTTP request structure to be available. AND you need to account for the fact that sometimes it gets created in the normal fashion, but other times it gets created later, or not at all. You've tried to ways to do this: 1) Exposing a new Ns_DriverSetRequest routine. Here's what it looked like in nssyslogd: http://naviserver.cvs.sourceforge.net/viewvc/naviserver/modules/nssyslogd/nssyslogd.c?revision=1.18&view=markup NS_EXPORT int Ns_ModuleInit(char *server, char *module) { ... Ns_RegisterRequest(server, "SYSLOG", "/", SyslogRequestProc, NULL, srvPtr, 0); ... } static NS_DRIVER_ACCEPT_STATUS Accept(Ns_Sock *sock, SOCKET listensock, struct sockaddr *sockaddrPtr, int *socklenPtr) { sock->sock = listensock; Ns_DriverSetRequest(sock, "SYSLOG / HTTP/1.0"); return NS_DRIVER_ACCEPT_DATA; } How is this functionally different to what I proposed (example in Recv above)? 2) Doing away with the need for a Ns_Request all together. Which now looks like this: http://naviserver.cvs.sourceforge.net/viewvc/naviserver/modules/nssyslogd/nssyslogd.c?revision=1.19&view=markup NS_EXPORT int Ns_ModuleInit(char *server, char *module) { ... init.requestProc = Request; ... init.opts = NS_DRIVER_ASYNC | NS_DRIVER_NOPARSE; ... } static int Request(void *arg, Ns_Conn *conn) { Ns_DString *dsPtr = Ns_ConnSockContent(conn); SyslogRequest *req = SyslogRequestCreate(server, sockPtr->sock, dsPtr->string, dsPtr->length, &sa); SyslogRequestProcess(req); ... } The strategy here seems to be to completely ignore the standard request structure and do your own thing. There's nothing wrong with this in the abstract -- you're not actually using any of the HTTP stuff. However, the rest of the server fully expects the HTTP request to be present and filled in, and this is why you've had to touch dozens of files in dozens of places fixing up all code that might trip over a null request field. (And the public API has changed...) As far as I can see, neither method 1 or 2 achieves anything than passing "METHOD / HTTP/1.0\r\n\r\n" does, using considerably less code. For example, In the snippet above, you can see the newly added Ns_ConnSockContent which returns a pointer to the read buffer (which is otherwise private). Ordinarily the buffer would contain the HTTP request line, any headers, then any body. You can get at the body with the existing Ns_ConnContent. So if you just return "SYSLOG / HTTP/1.0\r\n\r\n" and then your bytes in Recv(), the request would be constructed and then you could parse the protocol beginning in the body content. |
From: Vlad S. <vl...@cr...> - 2008-10-22 21:02:19
|
The first argument is different, Ns_Sock vs SOCKET Stephen Deasey wrote: > On Wed, Oct 22, 2008 at 9:03 PM, Vlad Seryakov <vl...@cr...> wrote: >> I tried to use Ns_SockSendBufs() but it sends data directly to socket >> where i need to send via driver's send proc. > > > Just pass your Send() proc directly, and delete SendBufs(): > > static ssize_t > SendFile(Ns_Sock *sock, Ns_FileVec *bufs, int nbufs, Ns_Time > *timeoutPtr, int flags) > { > - return Ns_SockSendFileBufsIndirect(sock->sock, bufs, nbufs, > timeoutPtr, flags, SendBufs); > + return Ns_SockSendFileBufsIndirect(sock->sock, bufs, nbufs, > timeoutPtr, flags, Send); > } > > >> Why connPtr->nContentSent is not updated, all send called with conn >> parameters should do this > > > Yes, but Ns_ConnSend() is higher up the stack, so when sending data it > looks something like this: > > return.c: Ns_ConnReturnData > connio.c: Ns_ConnWriteData > connio.c: Ns_ConnWriteVData > connio.c: Ns_ConnSend > driver.c: NsDriverSend > nsssl/nsssl.c: Send > > > By the time your Send() is called we've already passed through > Ns_ConnSend(). nContentSent will be updated as the stack unwinds. > > If you call Ns_ConnSend() from within Send(), that's a loop... > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |
From: Stephen D. <sd...@gm...> - 2008-10-22 20:41:07
|
On Wed, Oct 22, 2008 at 9:03 PM, Vlad Seryakov <vl...@cr...> wrote: > I tried to use Ns_SockSendBufs() but it sends data directly to socket > where i need to send via driver's send proc. Just pass your Send() proc directly, and delete SendBufs(): static ssize_t SendFile(Ns_Sock *sock, Ns_FileVec *bufs, int nbufs, Ns_Time *timeoutPtr, int flags) { - return Ns_SockSendFileBufsIndirect(sock->sock, bufs, nbufs, timeoutPtr, flags, SendBufs); + return Ns_SockSendFileBufsIndirect(sock->sock, bufs, nbufs, timeoutPtr, flags, Send); } > Why connPtr->nContentSent is not updated, all send called with conn > parameters should do this Yes, but Ns_ConnSend() is higher up the stack, so when sending data it looks something like this: return.c: Ns_ConnReturnData connio.c: Ns_ConnWriteData connio.c: Ns_ConnWriteVData connio.c: Ns_ConnSend driver.c: NsDriverSend nsssl/nsssl.c: Send By the time your Send() is called we've already passed through Ns_ConnSend(). nContentSent will be updated as the stack unwinds. If you call Ns_ConnSend() from within Send(), that's a loop... |
From: Vlad S. <vl...@cr...> - 2008-10-22 20:08:21
|
I tried to use Ns_SockSendBufs() but it sends data directly to socket where i need to send via driver's send proc. Why connPtr->nContentSent is not updated, all send called with conn parameters should do this Stephen Deasey wrote: >> Index: nsssl.c >> =================================================================== >> RCS file: /cvsroot/naviserver/modules/nsssl/nsssl.c,v >> retrieving revision 1.6 >> retrieving revision 1.7 >> diff -C2 -d -r1.6 -r1.7 >> *** nsssl.c 22 Oct 2008 02:14:24 -0000 1.6 >> --- nsssl.c 22 Oct 2008 03:23:06 -0000 1.7 >> *************** >> --- 432,447 ---- >> */ >> >> ! static int >> ! SendBufs(SOCKET sock, struct iovec *bufs, int nbufs, Ns_Time *timeoutPtr, int flags) >> { >> ! Ns_Conn *conn = Ns_GetConn(); >> ! >> ! return Ns_ConnSend(conn, bufs, nbufs); >> ! } >> ! > > > This should be Ns_SockSendBufs(), otherwise connPtr->nContentSent will > be double counted and the driver thread may block. > > Although in this case it should actually be Send(), which is your SSL > specific implementation of Ns_SockSendBufs(). The way it is now static > files may be sent in the clear :-/ > > > (Basically, you implement the SendFile() callback by calling > Ns_SockSendFileIndirect(), which is the default library implementation > which scrapes the bytes off disk, and pass it Send(), which is your > implementation of writing to the network. nssock is maybe a little > confusing in that it doesn't actually do anything but call the default > implementations, because it doesn't have to...) > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |
From: Stephen D. <sd...@gm...> - 2008-10-22 20:02:40
|
> Index: nsssl.c > =================================================================== > RCS file: /cvsroot/naviserver/modules/nsssl/nsssl.c,v > retrieving revision 1.6 > retrieving revision 1.7 > diff -C2 -d -r1.6 -r1.7 > *** nsssl.c 22 Oct 2008 02:14:24 -0000 1.6 > --- nsssl.c 22 Oct 2008 03:23:06 -0000 1.7 > *************** > --- 432,447 ---- > */ > > ! static int > ! SendBufs(SOCKET sock, struct iovec *bufs, int nbufs, Ns_Time *timeoutPtr, int flags) > { > ! Ns_Conn *conn = Ns_GetConn(); > ! > ! return Ns_ConnSend(conn, bufs, nbufs); > ! } > ! This should be Ns_SockSendBufs(), otherwise connPtr->nContentSent will be double counted and the driver thread may block. Although in this case it should actually be Send(), which is your SSL specific implementation of Ns_SockSendBufs(). The way it is now static files may be sent in the clear :-/ (Basically, you implement the SendFile() callback by calling Ns_SockSendFileIndirect(), which is the default library implementation which scrapes the bytes off disk, and pass it Send(), which is your implementation of writing to the network. nssock is maybe a little confusing in that it doesn't actually do anything but call the default implementations, because it doesn't have to...) |
From: Vlad S. <vl...@cr...> - 2008-10-22 19:44:47
|
> The check for (sslPtr == NULL) happens after it's already been used. Oh, late night work :-(( |
From: Stephen D. <sd...@gm...> - 2008-10-22 19:42:15
|
On Wed, Oct 22, 2008 at 4:23 AM, Vlad Seryakov <ser...@us...> wrote: > Update of /cvsroot/naviserver/modules/nsssl > In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22913/modules/nsssl > > Modified Files: > nsssl.c > Log Message: > new accept status, SSL driver works now > > > Index: nsssl.c > =================================================================== > *** 286,298 **** > > if (sslPtr == NULL) { > ! sslPtr = SSL_new(drvPtr->ctx); > if (sslPtr == NULL) { > Ns_Log(Error, "%d: SSL session init error for %s: [%s]", sock->sock, ns_inet_ntoa(sock->sa.sin_addr), strerror(errno)); > return NS_DRIVER_ACCEPT_ERROR; > } > sock->arg = sslPtr; > ! SSL_set_fd(sslPtr, sock->sock); > ! SSL_set_accept_state(sslPtr); > ! > } > return NS_DRIVER_ACCEPT_DATA; > --- 293,306 ---- > > if (sslPtr == NULL) { > ! sslPtr = ns_calloc(1, sizeof(SSLContext)); > ! sslPtr->ssl = SSL_new(drvPtr->ctx); > if (sslPtr == NULL) { > Ns_Log(Error, "%d: SSL session init error for %s: [%s]", sock->sock, ns_inet_ntoa(sock->sa.sin_addr), strerror(errno)); > + ns_free(sslPtr); > return NS_DRIVER_ACCEPT_ERROR; > } > sock->arg = sslPtr; > ! SSL_set_fd(sslPtr->ssl, sock->sock); > ! SSL_set_accept_state(sslPtr->ssl); > } > return NS_DRIVER_ACCEPT_DATA; > *************** The check for (sslPtr == NULL) happens after it's already been used. |
From: Vlad S. <vl...@cr...> - 2008-10-22 19:40:09
|
> > static ssize_t > Recv(Ns_Sock *sock, struct iovec *bufs, int nbufs, Ns_Time > *timeoutPtr, int flags) > { > static const char request[] = "GET /whateva HTTP/1.0\r\n\r\n"; > size_t requestLen = sizeof(request); > socklen_t sockLen = sizeof(struct sockaddr_in); > > memcpy(bufs->iov_base, request, requestLen); > > return recvfrom(sock->sock, > bufs->iov_base + requestLen, > bufs->iov_len - requestLen, > 0, (struct sockaddr*) &sock->sa, &size); > } > > (checking for buffer lengths skipped here) > > > The advantage of doing it this way is that everything is much simpler > from the driver threads point of view. It doesn't need to know > anything special about non-standard protocols, and there isn't > anything in the driver callback api that isn't also useful to the HTTP > server. Arguable this is not very clear and simple, driver will have to hack buffers and every request should pretend to be HTTP just so driver thread would think that it serves only HTTP requests. If we have special codes and already have 3, does another one breaks anythings if only one code makes overall process simpler not only in driver thread but for drivers itself? The only reason of new code because SOCK_READY does queue socket immediately but because request structure is not set, NsGetRequest will call SockRead/SockParse. Basically ACCEP_QEUEU code is the same as ACCEPT_DATA but it skips hacking HTTP request buffer and let the conn thread perform processing where ACCEPT_DATA assumes HTTP request and assumes HTTP flow to be performed. > Also, this can't work: > > nsd/driver.c:1515 > > status = DriverAccept(sockPtr); > > if (status == NS_DRIVER_ACCEPT_ERROR) { > status = SOCK_ERROR; > ... > > } else { > status = SOCK_MORE; > ... > > if (status == NS_DRIVER_ACCEPT_DATA) { > ... > } else if (status == NS_DRIVER_ACCEPT_QUEUE) { > ... > } > } Oops, my bad |
From: Stephen D. <sd...@gm...> - 2008-10-22 19:18:30
|
On Wed, Oct 22, 2008 at 4:23 AM, Vlad Seryakov <ser...@us...> wrote: > Update of /cvsroot/naviserver/naviserver/nsd > In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv22913/nsd > > Modified Files: > driver.c > Log Message: > new accept status, SSL driver works now > > > Index: driver.c > =================================================================== > RCS file: /cvsroot/naviserver/naviserver/nsd/driver.c,v > retrieving revision 1.119 > retrieving revision 1.120 > diff -C2 -d -r1.119 -r1.120 > *** driver.c 20 Oct 2008 00:06:54 -0000 1.119 > --- driver.c 22 Oct 2008 03:23:06 -0000 1.120 > *************** > *** 787,791 **** > * Results: > * _ACCEPT: a socket was accepted, poll for data > ! * _ACCEPT_DATA: a socket was accepted, data present > * _ACCEPT_ERROR: no socket was accepted > * > --- 787,793 ---- > * Results: > * _ACCEPT: a socket was accepted, poll for data > ! * _ACCEPT_DATA: a socket was accepted, data present, read immediately > ! * if in async mode, defer reading to connection thread > ! * _ACCEPT_QUEUE: a socket was accepted, queue immediately > * _ACCEPT_ERROR: no socket was accepted > * > *************** > *** 1523,1534 **** > > } else { > drvPtr->queuesize++; > > - /* > - * If there is already data present then read it without > - * polling if we're in async mode. > - */ > - > if (status == NS_DRIVER_ACCEPT_DATA) { > if (drvPtr->opts & NS_DRIVER_ASYNC) { > status = SockRead(sockPtr, 0); > --- 1525,1538 ---- > > } else { > + status = SOCK_MORE; > drvPtr->queuesize++; > > if (status == NS_DRIVER_ACCEPT_DATA) { > + > + /* > + * If there is already data present then read it without > + * polling if we're in async mode. > + */ > + > if (drvPtr->opts & NS_DRIVER_ASYNC) { > status = SockRead(sockPtr, 0); > *************** > *** 1541,1553 **** > > /* > ! * We need to call this to make sure socket has request structure allocated, > ! * otherwise NsGetRequest will call SockRead which is not what this driver wants > */ > > - SockPrepare(sockPtr); > status = SOCK_READY; > } > ! } else { > ! status = SOCK_MORE; > } > } > --- 1545,1564 ---- > > /* > ! * Queue this socket without reading, NsGetRequest in > ! * the connection thread will perform actual reading of the request > */ > > status = SOCK_READY; > } > ! } else > ! if (status == NS_DRIVER_ACCEPT_QUEUE) { > ! > ! /* > ! * We need to call SockPrepare to make sure socket has request structure allocated, > ! * otherwise NsGetRequest will call SockRead which is not what this driver wants > ! */ > ! > ! SockPrepare(sockPtr); > ! status = SOCK_READY; > } > } Why the new accept status: NS_DRIVER_ACCEPT_QUEUE ? The idea we talked about with the driver callbacks was that a non-standard driver could fake-up a request in it's read callback. So, whereas at the mo you have something like this: modules/nsudp/nsudp.c: static NS_DRIVER_ACCEPT_STATUS Accept(Ns_Sock *sock, SOCKET listensock, struct sockaddr *sockaddrPtr, int *socklenPtr) { sock->sock = listensock; return NS_DRIVER_ACCEPT_DATA; } static ssize_t Recv(Ns_Sock *sock, struct iovec *bufs, int nbufs, Ns_Time *timeoutPtr, int flags) { socklen_t size = sizeof(struct sockaddr_in); return recvfrom(sock->sock, bufs->iov_base, bufs->iov_len, 0, (struct sockaddr*)&sock->sa, &size); } You would instead do something like this: static ssize_t Recv(Ns_Sock *sock, struct iovec *bufs, int nbufs, Ns_Time *timeoutPtr, int flags) { static const char request[] = "GET /whateva HTTP/1.0\r\n\r\n"; size_t requestLen = sizeof(request); socklen_t sockLen = sizeof(struct sockaddr_in); memcpy(bufs->iov_base, request, requestLen); return recvfrom(sock->sock, bufs->iov_base + requestLen, bufs->iov_len - requestLen, 0, (struct sockaddr*) &sock->sa, &size); } (checking for buffer lengths skipped here) The advantage of doing it this way is that everything is much simpler from the driver threads point of view. It doesn't need to know anything special about non-standard protocols, and there isn't anything in the driver callback api that isn't also useful to the HTTP server. Also, this can't work: nsd/driver.c:1515 status = DriverAccept(sockPtr); if (status == NS_DRIVER_ACCEPT_ERROR) { status = SOCK_ERROR; ... } else { status = SOCK_MORE; ... if (status == NS_DRIVER_ACCEPT_DATA) { ... } else if (status == NS_DRIVER_ACCEPT_QUEUE) { ... } } |
From: Vlad S. <vl...@cr...> - 2008-10-22 18:54:31
|
Right Stephen Deasey wrote: > On Wed, Oct 22, 2008 at 3:14 AM, Vlad Seryakov > <ser...@us...> wrote: >> Update of /cvsroot/naviserver/naviserver >> In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17830 >> >> Modified Files: >> ChangeLog >> Log Message: >> nsssl module ported, sock context and driver context exposed >> >> >> Index: ChangeLog >> =================================================================== >> RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v >> retrieving revision 1.820 >> retrieving revision 1.821 >> diff -C2 -d -r1.820 -r1.821 >> *** ChangeLog 21 Oct 2008 21:46:36 -0000 1.820 >> --- ChangeLog 22 Oct 2008 02:14:23 -0000 1.821 >> *************** >> *** 13,16 **** >> --- 13,24 ---- >> modules/nstftpd: ported to new driver API >> >> + modules/nsssl: Ported to new API >> + >> + nsd/conn.c: Added new Ns_ConnSockContext function which returns sock->arg, >> + socket-wide context >> + >> + Ns_ConnDriverContext will now return connPtr->drvPtr->arg, this is driver-wide >> + context. >> + > > > These structure members are already public, so Ns_ConnSockContext() > and Ns_ConnDriverContext() are not needed: > > include/ns.h: > > typedef struct Ns_Sock { > Ns_Driver *driver; > SOCKET sock; /* Connection socket */ > struct sockaddr_in sa; /* Actual peer address */ > void *arg; /* Driver context. */ > } Ns_Sock; > > typedef struct Ns_Driver { > void *arg; /* Driver callback data. */ > ... > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |
From: Stephen D. <sd...@gm...> - 2008-10-22 18:40:23
|
On Wed, Oct 22, 2008 at 3:14 AM, Vlad Seryakov <ser...@us...> wrote: > Update of /cvsroot/naviserver/naviserver > In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17830 > > Modified Files: > ChangeLog > Log Message: > nsssl module ported, sock context and driver context exposed > > > Index: ChangeLog > =================================================================== > RCS file: /cvsroot/naviserver/naviserver/ChangeLog,v > retrieving revision 1.820 > retrieving revision 1.821 > diff -C2 -d -r1.820 -r1.821 > *** ChangeLog 21 Oct 2008 21:46:36 -0000 1.820 > --- ChangeLog 22 Oct 2008 02:14:23 -0000 1.821 > *************** > *** 13,16 **** > --- 13,24 ---- > modules/nstftpd: ported to new driver API > > + modules/nsssl: Ported to new API > + > + nsd/conn.c: Added new Ns_ConnSockContext function which returns sock->arg, > + socket-wide context > + > + Ns_ConnDriverContext will now return connPtr->drvPtr->arg, this is driver-wide > + context. > + These structure members are already public, so Ns_ConnSockContext() and Ns_ConnDriverContext() are not needed: include/ns.h: typedef struct Ns_Sock { Ns_Driver *driver; SOCKET sock; /* Connection socket */ struct sockaddr_in sa; /* Actual peer address */ void *arg; /* Driver context. */ } Ns_Sock; typedef struct Ns_Driver { void *arg; /* Driver callback data. */ ... |
From: Stephen D. <sd...@gm...> - 2008-10-05 18:18:44
|
I think we can just remove the O_LARGEFILE usage from log.c (only place it's used). _FILE_OFFSET_BITS handles this now. On Sun, Oct 5, 2008 at 6:03 PM, Vlad Seryakov <ser...@us...> wrote: > Update of /cvsroot/naviserver/naviserver/include > In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv21771/include > > Modified Files: > nsthread.h > Log Message: > OS X does not have O_LARGEFILE > > > Index: nsthread.h > =================================================================== > RCS file: /cvsroot/naviserver/naviserver/include/nsthread.h,v > retrieving revision 1.42 > retrieving revision 1.43 > diff -C2 -d -r1.42 -r1.43 > *** nsthread.h 2 Oct 2008 01:36:18 -0000 1.42 > --- nsthread.h 5 Oct 2008 17:03:49 -0000 1.43 > *************** > *** 246,249 **** > --- 246,253 ---- > #endif > > + #ifdef __APPLE__ > + #define O_LARGEFILE 0 > + #endif > + > #define O_TEXT 0 > #define O_BINARY 0 > > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > naviserver-commits mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-commits > |
From: Vlad S. <vl...@cr...> - 2008-09-14 20:56:34
|
You can go ahead and patch CVS directly, i agree with the approach and all other modules i will port one by one. Not all i use now, mostly UDP and Syslog, so it is not a big deal. I though as well about reading in acceptProc and queue, it just needs public Queue function and the rest can be done inside each module. Stephen Deasey wrote: > On Fri, Sep 12, 2008 at 3:08 AM, Vlad Seryakov <vl...@cr...> wrote: >> I agree about making modules take care as much as possible. >> >> But here are the questions i need to resolve: >> >> - init, socket needs to be created, UDP or TCP or Unix, so driver needs >> initProc >> >> - for module like UDP, driver needs to know not to accept or we need >> another proc called acceptProc, default will be using accept and treat >> socket as TCP but drier can ovwerwrite with its own >> >> - queuing, at some point, after accept or later driver need to queue >> socket. The reason behind QUEUE_ON_ACCEPT to take care basic stuff >> without writing same code for creating separate thread for slitening and >> accepting sockets. SMTP is a good example in nssmtp. >> QUEUE_ONREAD is usefull in case of UDP sockets, after reading UDP packet >> call registered proc >> >> So, i need to resolve these issues and i would like to move as much as >> possible into drivers. >> >> Any suggestions? > > > Yeah, create listen and accept callbacks. > > I think TCP drivers should work fine -- I did that ages ago with the > example pop3 driver. > > The UDP though... Maybe they should just read the packet in the > accept callback, stash it, fake-up the HTTP request line in the Read > callback, and the conn thread can then access the stashed packet > directly. > > I'll have another go at it later, but here's some cleaned and split > patches anyway, if you get a chance. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Stephen D. <sd...@gm...> - 2008-09-14 20:46:06
|
On Fri, Sep 12, 2008 at 3:08 AM, Vlad Seryakov <vl...@cr...> wrote: > I agree about making modules take care as much as possible. > > But here are the questions i need to resolve: > > - init, socket needs to be created, UDP or TCP or Unix, so driver needs > initProc > > - for module like UDP, driver needs to know not to accept or we need > another proc called acceptProc, default will be using accept and treat > socket as TCP but drier can ovwerwrite with its own > > - queuing, at some point, after accept or later driver need to queue > socket. The reason behind QUEUE_ON_ACCEPT to take care basic stuff > without writing same code for creating separate thread for slitening and > accepting sockets. SMTP is a good example in nssmtp. > QUEUE_ONREAD is usefull in case of UDP sockets, after reading UDP packet > call registered proc > > So, i need to resolve these issues and i would like to move as much as > possible into drivers. > > Any suggestions? Yeah, create listen and accept callbacks. I think TCP drivers should work fine -- I did that ages ago with the example pop3 driver. The UDP though... Maybe they should just read the packet in the accept callback, stash it, fake-up the HTTP request line in the Read callback, and the conn thread can then access the stashed packet directly. I'll have another go at it later, but here's some cleaned and split patches anyway, if you get a chance. |
From: Vlad S. <vl...@cr...> - 2008-09-12 02:07:53
|
I agree about making modules take care as much as possible. But here are the questions i need to resolve: - init, socket needs to be created, UDP or TCP or Unix, so driver needs initProc - for module like UDP, driver needs to know not to accept or we need another proc called acceptProc, default will be using accept and treat socket as TCP but drier can ovwerwrite with its own - queuing, at some point, after accept or later driver need to queue socket. The reason behind QUEUE_ON_ACCEPT to take care basic stuff without writing same code for creating separate thread for slitening and accepting sockets. SMTP is a good example in nssmtp. QUEUE_ONREAD is usefull in case of UDP sockets, after reading UDP packet call registered proc So, i need to resolve these issues and i would like to move as much as possible into drivers. Any suggestions? Stephen Deasey wrote: > On Fri, Aug 29, 2008 at 2:12 AM, Vlad Seryakov <vl...@cr...> wrote: >> And sent email without finishing the thought :-)) >> >> Maybe parsing for range should done early enough and saved in the >> request, so whoever then will be sending data will use it. >> >> Just a thought from east coast :-)) >> > > > Here's a couple of patches as a follow on to recent checkins to cvs: > > registerdriver.diff > setlength.diff > range-sendfile.diff > > The first changes the prototype of the Driver callback. Actually it > removes it and adds a callback for each function: send, receive, keep, > close, and adds a new one: sendfile. > > The second is just a clarification on the handling of length headers, > but it's needed for the third. > > The third changes the range code to use the new sendfile support. I > changed it round so that instead of saying SendRange you say > ParseRange. You pass it an array of Ns_FileVec's, it looks at the > headers and it fills it in for you. I haven't tried, but this should > allow you to allocate an array of Ns_FileVec's and associate it with > the socket for the writer thread. We might have to also fixup the > timeout handling in the Ns_Sock* stuff -- It seems to always want to > do a poll timeout the way it's currently written. > > > I didn't want to check any of this in because the API change will > break half a dozen of your driver modules. So whenever you get a > chance (no rush) try out the registerdriver.diff patch and see if you > can get your modules working with it. > > I did notice a couple of odd things. NsDriverClose() get called twice > for each socket. Not sure why, but I don't think it should. I've > changed the semantics: it used to be "Notify the driver that we are > going to close", now we delegate the close to the driver, which for > nssock is simply ns_sockclose(). The advantage is that for other > modules, like your nsudp, you should be able to handle whatever needs > to be handled. For example nsudp wants to keep the socket open. > Previously this was handled with special logic in the driver thread > checking for if UDP, else !UDP. I think this complication is where > the DriverClose x2 bug crept in. > > I haven't thoroughly checked it, but I'm 95% confident that you could > handle all the special cases for the current alternative drivers more > cleanly by delegating to the driver callbacks and removing all the > special logic to do with NS_DRIVER_* (UDP, UNIX, QUEUE_ONACCEPT, > QUEUE_ONREAD). Have another look and see what you think. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel -- Vlad Seryakov vl...@cr... http://www.crystalballinc.com/vlad/ |
From: Stephen D. <sd...@gm...> - 2008-09-11 22:06:31
|
On Thu, Sep 11, 2008 at 10:53 PM, Vlad Seryakov <vl...@cr...> wrote: > will do, it may take a while > no problem |
From: Vlad S. <vl...@cr...> - 2008-09-11 21:57:23
|
will do, it may take a while Stephen Deasey wrote: > On Fri, Aug 29, 2008 at 2:12 AM, Vlad Seryakov <vl...@cr...> wrote: >> And sent email without finishing the thought :-)) >> >> Maybe parsing for range should done early enough and saved in the >> request, so whoever then will be sending data will use it. >> >> Just a thought from east coast :-)) >> > > > Here's a couple of patches as a follow on to recent checkins to cvs: > > registerdriver.diff > setlength.diff > range-sendfile.diff > > The first changes the prototype of the Driver callback. Actually it > removes it and adds a callback for each function: send, receive, keep, > close, and adds a new one: sendfile. > > The second is just a clarification on the handling of length headers, > but it's needed for the third. > > The third changes the range code to use the new sendfile support. I > changed it round so that instead of saying SendRange you say > ParseRange. You pass it an array of Ns_FileVec's, it looks at the > headers and it fills it in for you. I haven't tried, but this should > allow you to allocate an array of Ns_FileVec's and associate it with > the socket for the writer thread. We might have to also fixup the > timeout handling in the Ns_Sock* stuff -- It seems to always want to > do a poll timeout the way it's currently written. > > > I didn't want to check any of this in because the API change will > break half a dozen of your driver modules. So whenever you get a > chance (no rush) try out the registerdriver.diff patch and see if you > can get your modules working with it. > > I did notice a couple of odd things. NsDriverClose() get called twice > for each socket. Not sure why, but I don't think it should. I've > changed the semantics: it used to be "Notify the driver that we are > going to close", now we delegate the close to the driver, which for > nssock is simply ns_sockclose(). The advantage is that for other > modules, like your nsudp, you should be able to handle whatever needs > to be handled. For example nsudp wants to keep the socket open. > Previously this was handled with special logic in the driver thread > checking for if UDP, else !UDP. I think this complication is where > the DriverClose x2 bug crept in. > > I haven't thoroughly checked it, but I'm 95% confident that you could > handle all the special cases for the current alternative drivers more > cleanly by delegating to the driver callbacks and removing all the > special logic to do with NS_DRIVER_* (UDP, UNIX, QUEUE_ONACCEPT, > QUEUE_ONREAD). Have another look and see what you think. > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > > > ------------------------------------------------------------------------ > > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel |
From: Stephen D. <sd...@gm...> - 2008-09-11 21:52:35
|
On Fri, Aug 29, 2008 at 2:12 AM, Vlad Seryakov <vl...@cr...> wrote: > And sent email without finishing the thought :-)) > > Maybe parsing for range should done early enough and saved in the > request, so whoever then will be sending data will use it. > > Just a thought from east coast :-)) > Here's a couple of patches as a follow on to recent checkins to cvs: registerdriver.diff setlength.diff range-sendfile.diff The first changes the prototype of the Driver callback. Actually it removes it and adds a callback for each function: send, receive, keep, close, and adds a new one: sendfile. The second is just a clarification on the handling of length headers, but it's needed for the third. The third changes the range code to use the new sendfile support. I changed it round so that instead of saying SendRange you say ParseRange. You pass it an array of Ns_FileVec's, it looks at the headers and it fills it in for you. I haven't tried, but this should allow you to allocate an array of Ns_FileVec's and associate it with the socket for the writer thread. We might have to also fixup the timeout handling in the Ns_Sock* stuff -- It seems to always want to do a poll timeout the way it's currently written. I didn't want to check any of this in because the API change will break half a dozen of your driver modules. So whenever you get a chance (no rush) try out the registerdriver.diff patch and see if you can get your modules working with it. I did notice a couple of odd things. NsDriverClose() get called twice for each socket. Not sure why, but I don't think it should. I've changed the semantics: it used to be "Notify the driver that we are going to close", now we delegate the close to the driver, which for nssock is simply ns_sockclose(). The advantage is that for other modules, like your nsudp, you should be able to handle whatever needs to be handled. For example nsudp wants to keep the socket open. Previously this was handled with special logic in the driver thread checking for if UDP, else !UDP. I think this complication is where the DriverClose x2 bug crept in. I haven't thoroughly checked it, but I'm 95% confident that you could handle all the special cases for the current alternative drivers more cleanly by delegating to the driver callbacks and removing all the special logic to do with NS_DRIVER_* (UDP, UNIX, QUEUE_ONACCEPT, QUEUE_ONREAD). Have another look and see what you think. |
From: Vasiljevic Z. <zv...@ar...> - 2008-09-10 15:42:20
|
On 10.09.2008, at 17:22, Vlad Seryakov wrote: > As usual, to start is the hardest thing Effectively, mod_fcgi can be used as start but (my gut feeling) thanks to our cleaner and more advanced C-API, it could be much less work. |
From: Vasiljevic Z. <zv...@ar...> - 2008-09-10 15:38:44
|
On 10.09.2008, at 17:22, Vlad Seryakov wrote: > As usual, to start is the hardest thing Indeed! |
From: Vlad S. <vl...@cr...> - 2008-09-10 15:33:33
|
I would help in co-developing and testing it but right now my head is too busy with other project so it is hard to start this new module. As usual, to start is the hardest thing Bernd Eidenschink wrote: >> Yes, that's why i thought about developing fcgi module for ns, just to >> make an option for Rails and other frameworks to run on naviserver. It >> could work like for nginx, but could not, still an option is an option. > > True. These frameworks offer so much so nicely out of the box one would never > want to re-invent in ADP/Tcl. > > And on the other hand they need a real webserver doing all the return huge > files, return lots of cached small files etc. stuff. > > Bernd. > > ------------------------------------------------------------------------- > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > _______________________________________________ > naviserver-devel mailing list > nav...@li... > https://lists.sourceforge.net/lists/listinfo/naviserver-devel > |