You can subscribe to this list here.
2005 |
Jan
|
Feb
(61) |
Mar
(153) |
Apr
(39) |
May
(10) |
Jun
(15) |
Jul
(15) |
Aug
(2) |
Sep
|
Oct
(17) |
Nov
(2) |
Dec
(13) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2006 |
Jan
(18) |
Feb
(9) |
Mar
|
Apr
|
May
|
Jun
|
Jul
(7) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(1) |
Dec
|
2007 |
Jan
(8) |
Feb
(3) |
Mar
|
Apr
|
May
(2) |
Jun
|
Jul
(2) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: SourceForge.net <no...@so...> - 2005-04-04 02:19:43
|
Feature Requests item #1175561, was opened at 2005-04-02 23:34 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 Category: C-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: nsmain without getopt Initial Comment: attached is nsmain command parsing without getopt, it is really very simple so getopt can be avoided. ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-04-04 02:19 Message: Logged In: YES user_id=184124 I had some doubts about this but according to the usage help, there is no any uprocessed arguments left, i do not know why optind has been used at all, it was always equalt to the last argument. ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-04 00:46 Message: Logged In: YES user_id=87254 'make test' no longer works. Looks like the following is too strict: if (argv[i][0] != '-') { UsageError("invalid option: %s", argv[i]); exit(1); } Also, this isn't equivalent: ! NsConfigEval(config, argc, argv, optind); --- 537,541 ---- ! NsConfigEval(config, argc, argv, argc); The config script should end up with unprocessed args in the interp's $::argv, right? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-03 15:29 Message: Logged In: YES user_id=184124 Yes, i run my server with all parameters, no difference. ---------------------------------------------------------------------- Comment By: Zoran Vasiljevic (vasiljevic) Date: 2005-04-03 11:42 Message: Logged In: YES user_id=95086 If you have verified the correct operation, you can submit this. The "poll" implementation is still open, right? I will be unavailable for couple of days... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-04 01:00:57
|
Feature Requests item #1171843, was opened at 2005-03-28 06:43 Message generated for change (Comment added) made by sdeasey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 >Category: C-API Group: None >Status: Closed >Resolution: Fixed Priority: 5 Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: nsd -c: start a REPL Initial Comment: Here's a patch which adds a new startup mode to the nsd binary: -c command mode. When selected, after the server has started rather than eternaly wait for signals it runs a Tcl shell and waits for commands. The nice thing about this is that all the server commands are available, which is not the case if you simply load libnsd.so. The main goal is testing. I've done some cleanup and you can now type 'make test' in the top level directory. 'make runtest' will drop you into an interactive shell. It could do with some improvements: 'exit' should probably trigger an orderly shutdown, and signals aren't handled. Unfortunately ns_geturl is spectacularly useless, simply fetching the bytes of a file directly from the file system. Is this useful? I would have expected it to pass through registered procs etc. I'm thinking maybe the way to go is an nstest module which adds some extra commands to dummy up a connection and run the registered proc. It would be possible I guess to also create nstestdb to create a dummy db driver, and so on... Feedback appreciated. ---------------------------------------------------------------------- >Comment By: Stephen Deasey (sdeasey) Date: 2005-04-03 19:00 Message: Logged In: YES user_id=87254 I've commited this to HEAD. The following are now available: make test run the test suite make runtest start a server shell for interactive testing make gdb run test suite under gdb, pausing at gdb prompt so break points can be added ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 22:03 Message: Logged In: YES user_id=184124 that could work with non multithreaded programs, with threads, you never know which thread caused the segv ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 19:14 Message: Logged In: YES user_id=87254 Is this a core file size thing? Maybe if you up the ulimit you'll get the whole memory dump? I have seen some setups where when the program crashes it automatically calls gdb. There's this in my postfix config file: debugger_command = PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont; echo where) | gdb $daemon_directory/$process_name $process_id 2>&1 >$config_directory/$process_name.$process_id.log & sleep 5 Maybe you could trigger something like this from a segv, save some typing? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 15:28 Message: Logged In: YES user_id=184124 Also, i have a trick i've been using for a long time: In debug mode i install SEGV handler and sleep foreever, so i can attach to the process with gdb and check why it crashed. The good thing about this, server it is still running and all memory is avalable, in core dumps sometimes access is limited. It could be special comman line switch for this handler. static void Segv(int sig) { Ns_Log(Error,"ns: SIGSEGV received %d",getpid()); while(1) sleep(1); } ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 07:07 Message: Logged In: YES user_id=184124 This patch ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-31 21:22 Message: Logged In: YES user_id=87254 What's ok, this patch or using socat? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-31 20:29 Message: Logged In: YES user_id=184124 For tests it is okay ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-31 20:10 Message: Logged In: YES user_id=87254 It runs the full server, scheduled proc threads, conn threads, the lot! The -c option basically tells the server not to fork into the background and to start reading commands on stdin. socat look neat, but it's not a standard program. I think it's very important that 'make test' Just Works. If it's at all difficult test won't be written or run. I'm open to other options though. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 09:38 Message: Logged In: YES user_id=184124 I usually use nscp & socat combination to test the server, in this mode it runs as it should and all commands are tested using the same environment as it will be in the production. In your mode, server is used like shared library, to test commands interactively only, you still need to run the server to test background procs/callbacks. Is it possible to run server in foreground (-f) and spawn Tcl shell at the same time. In this case, you have the server and nscp-like shell at the same time. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-04 00:56:02
|
Feature Requests item #1159471, was opened at 2005-03-08 17:40 Message generated for change (Comment added) made by sdeasey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1159471&group_id=130646 Category: C-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: Virtual Hosting Initial Comment: Okay, i did some digging and testing, looks working and much simpler. I tried to simplify default AS 4.x virtual hosting and added pageroot virtual hosting, simple way to use different pagetroots on the same server. The change vor default virtual hosting is: no defaultserver anymore, the server who registered virtual hosts is default server, so nssock is loaded in the default server, other than that virtual servers are defined the same way. One thing i left is to chamge ns_info pageroot to use Ns_GetConn() and then if exists use connPtr->pageroot, but this is simple change if you approve current virtual hosting patch. Here is the nsd.tcl config example: ns_section "ns/server/${server}/module/nssock/servers" ns_param test vlad.seryakov.com ns_param test vlad.seryakov.com:80 ns_section "ns/server/${server}/module/nssock/pageroots" ns_param ${home}/html/test vlad.seryakov.com ns_param ${home}/html/test vlad.seryakov.com:80 ---------------------------------------------------------------------- >Comment By: Stephen Deasey (sdeasey) Date: 2005-04-03 18:56 Message: Logged In: YES user_id=87254 I found some errors in the previous patch, so here's another one. I wouldn't be so conservative, except an error here would be a big security hole. I've written some tests. I;d appreciate it if you'd take a look and see if this looks alright? If you're happy that this looks reasonable, I'll commit it. I've fixed the hostprefix config that you noted. I also changed Ns_ConnLocationAppend() and Ns_ServerPath()/Ns_PagePath() to always return a valid result. The driver's staticaly configured location is used if a callback fails. I felt it was just too ugly to have to check the return every time. I'm thinking maybe there needs to be some kind of common Ns_HostIsValid() routine... ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 07:12 Message: Logged In: YES user_id=184124 Can we commit this patch, i need to replace one of my virtual hosting servers and i would give it a try with new patch. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-27 18:59 Message: Logged In: YES user_id=184124 One notice, hostpreix bt default is vhost, not empty, would be better to have it empty. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-27 18:55 Message: Logged In: YES user_id=184124 Yes, this worked for me, if Zoran does not mind, you can commit it. ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-27 07:25 Message: Logged In: YES user_id=87254 The new serverdir is for storing files associated with a server (or virtual host) which are not made public via the pagedir. So, things like uploads, auto-generated data, caches etc. This will contain only the pages directory by default, because the server doesn't do anything interesting by default. I've attached a new patch which makes the serverdir and pagedir fully customisable. Here are the possible config settings: ns_section "ns/server/${servername}/fastpath" ns_param serverdir /srv # default: $home/servers/$servername ns_param pagedir pages #ns_param pageroot pages # depreciated ns_section "ns/server/${servername}/vhost" ns_param enabled false ns_param hostprefix vhosts #default "" ns_param hosthashlevel 3 ns_param stripport true ns_param stripwww true I've added path hashing, which hashes the hostname so that they are spread accross multiple directories. e.g. foo.com -> ./f/o/o/pages a.com -> ./a/_/_/pages I've also added a -host switch to the ns_serverpath and ns_pagepath commands so that tool can be written which setup the necessary directories. Does this look ok? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-17 21:26 Message: Logged In: YES user_id=184124 On the other hand if it will be possible to configure/rename "servers/" and "pages/" parts or omit them completely i would be happy with this patch. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-14 07:48 Message: Logged In: YES user_id=184124 The problem i see with this patch, it will break all my AS installations, because it assumes that every servers is under servers/ direcotory and pageroot is awlays named pages/. I my on-server installs i do not have this complex directory structure, i have html/ under ns_info home and pageroot is set in the nsd.tcl. Also, what is the point of ServerRoot dir, we have PageRoot already, if it is set into absolute path other apps use ns_info pageroot? As i understand, under ServerRoot there is only pages difrectory? Why not to use pageroot directly? ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-14 07:05 Message: Logged In: YES user_id=87254 Oh, forgot to mention. It depends on the Tcl Callbacks patch. ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-14 07:03 Message: Logged In: YES user_id=87254 I've added the patch naviserver-4.0.10-server-root-vhost.patch. It adds the following new routines: Ns_ServerPath() Ns_PagePath() Ns_SetServerRootProc() Ns_ConnLocationAppend() Ns_SetConnLocationProc() NsServerRoot() NsPageRoot() ns_serverpath ?pathSegment ...? ns_pagepath ?pathSegment ...? ns_serverrootproc script ?arg? ns_locationproc script ?arg? And the following new configuration options: ns_section "ns/server/${servername}/vhost" ns_param enabled false ns_param prefix "" ns_param pagedir pages # overides fastpath/pageroot ns_param stripwww true ns_parma stripport true This version of host header based virtual hosting which depends on the existance of the pages directory is a superset of the functionality provided by a static configuration. Applications which call Ns_ConnLocation() will need to be modified to call Ns_ConnLocationAppend() or they will not be vhost aware. I've reinstated the depreciated proc Ns_SetConnLocationProc() and changed it's signature. It dissapeared from ns.h almost 5 years ago, then reappreared ~2.5 years ago. I don't think this will be a problem. In turn, I've depreciated the Ns_SetLocationProc(). It compiles and the server runs. I haven't had time to test it. Does this look acceptable? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-12 17:41 Message: Logged In: YES user_id=184124 Just to consider the possibility, instead of mallocing pageroot/location, by default it can use sockPtr->pageroot/sockPtr->location, then when ns_conn pageroot newpageroot called, it will set connPtr->pageroot with malloced string and ns_conn pageroot will check and return it instead of sockPtr->pageroot. This way, no overhead at conn queue and still new pageroot/location can be set in Tcl ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-12 17:02 Message: Logged In: YES user_id=184124 That is the probem with nssock, it is actually an extender of the driver but still somehow kept independent. nssock itself is useless without driver and only used to bind to more than one address for different servers. it could be moved in the core but the problem will be how to define more than once instance. malloc are overhead indeed, but once copied they can be used independently and canbe set in Tcl by using ns_conn location newLocation or ns_conn pageroot newPageroot. In this case they should be a copies. Just do not make mass virtual hosting the only virtual hosting way, being able to change pageroot in the Tcl/C give developer more flexibility if required. For simple cases, mass virtual hosting is okay. ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-12 16:48 Message: Logged In: YES user_id=87254 I'm not keen at all on adding virtual hosting to the nssock driver. There's nothing HTTP specific about the nssock dirver and I'd like to keep it that way. There are a couple of problems with the other proposed solution. The paired functions Ns_SetLocationProc()/Ns_ConnSetLocationProc() etc. seems excessive, and the enforced malloc()ing at runtime of the location and pageroot strings is an unwelcome overhead. Using Tls storage is clever but pretty ugly. I think dstrings are the way to go here. I'm not sure Tls is safe in this implementation. The same dstring is used for location and pageroot strings, so it depends what the caller decides to do with the result and in what order, whether or not one overwrites the other. I would like to explore adding mas virtual hosting into the core. Let me work up a patch, I think I can get to this this weekend... ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-12 14:57 Message: Logged In: YES user_id=184124 Attached is nssock with virtual hosting patch ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-12 13:39 Message: Logged In: YES user_id=184124 Actually, vhost can be combined with nssock, if options given it will enable virtual hosting, if not works as regular sock driver. This way it is always with the core and at the same time independent. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-10 14:38 Message: Logged In: YES user_id=184124 If loaded, vhost module works as Stephan suggested, strips port/host and usesd pageroot if other root is not specified. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-10 14:37 Message: Logged In: YES user_id=184124 There is new patch with Stephans corrections/additions. I think we can provide core module for virtual hosting, i called it nsvhost and we can extend this module to do all sorts of hosting. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-10 11:53 Message: Logged In: YES user_id=184124 And keeping port and www. is sometimes necessary, you can do virtual hosting by port only, IDT does that for example, and many sites work without www. prefix, just stripping them by default may not be appropriate. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-10 11:24 Message: Logged In: YES user_id=184124 >Looks good. However, isn't ns_conn pageroot >unneccessary? For templating engines ns_info pageroot is the only way to figure out the root, UrlToFile works for fastpath only. >Would it be better to have the servers and pageroot config >in one section, to avoid duplication? They are mutually exclusive, that's why i put them in different sections, if full virtual server is set, pageroots are ignored, this is for AOL like virtual hosting with different servers(rare situation though). So in most cases pageroots will be used only, thus only one simple syntax. As for PageRoot and ServerRoot, i think this is a little cofusing. Currently, pageroot returns full path and whoever calls pageroot assumes that it will return full path. Virtual hosting using directories as hostnames is what i am currently using with vhost module and i think it can be included as a standard feature for easy virtualhosting solutions. I do not think this should be the ONLY virtual hosting solution, everybody can write their own modules using SetLocation/SetPageRoot procs or register filter which will set pageroot for each connection. Let me prepare another patch-set with your suggestions included . ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-10 01:00 Message: Logged In: YES user_id=87254 Looks good. However, isn't ns_conn pageroot unneccessary? Would it be better to have the servers and pageroot config in one section, to avoid duplication? ns_section "ns/server/${server}/module/nssock/servers" ns_param example.com exampleserver ns_param foo.example.com "exampleserver ${home}/whatever" Here, the first entry maps the example.com host to the exampleserver and uses it's default pageroot. The second entry supplies a new pageroot. How about mass virtual hosting, i.e. where you don't have to explicitly configure each host header to pageroot mapping, but construct the pageroot from the host heafer at runtime? I've attached the file nsmassvhost.c which implements the above. It uses the hooks Ns_PageRootProc and Ns_LocationProc which would be unneccessary if the functionality was included as standard. It trims the port and any leading 'www.' from the host header. It would be nice to have this for the static mapping also, as at the moment to be robust you often need 4 mappings for each virtual host. It also uses the function Ns_ServerPath(). The idea here is to introduce the concept of the virtual server root as a distinct location in the file system, where the pageroot is a location below that. I want to change this so that the serverroot is dynamic and based on the host header (when configured), and the pageroot is simply the serverroot with "/pages" (or whatever is configured) appended. It would look something like this: /srv/server1/pages /srv/server1/example.com/pages /srv/server1/example.com/cache The first path is the default or non-virtual hosted case. server1 is a server defind in the config file and has it's own private tcl library. The second path is the pageroot of a virtual host. The third is an example of some data which is specific to the example.com virtual host. So, without virtual hosts: Ns_ServerRoot() -> /srv/server1 Ns_PageRoot() -> /srv/server1/pages With virtual hosts (and called in the context of a conn thread): Ns_ServerRoot() -> /srv/server1/example.com Ns_PageRoot() -> /srv/server1/example.com/pages The advantage of this system is that you don't have to restart your server every time you add or remove a virtual host. There is also a convenient location to store data associated with both virtual servers and virtual hosts. Easy to backup, remove, etc. I haven't had time to look at how this would be integrated into what you've got here, maybe at the weekend. Feel free to take a shot at though :-) Does the scheme outlined above make sense to you? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1159471&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-04 00:46:43
|
Feature Requests item #1175561, was opened at 2005-04-02 16:34 Message generated for change (Comment added) made by sdeasey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 Category: C-API Group: None >Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: nsmain without getopt Initial Comment: attached is nsmain command parsing without getopt, it is really very simple so getopt can be avoided. ---------------------------------------------------------------------- >Comment By: Stephen Deasey (sdeasey) Date: 2005-04-03 18:46 Message: Logged In: YES user_id=87254 'make test' no longer works. Looks like the following is too strict: if (argv[i][0] != '-') { UsageError("invalid option: %s", argv[i]); exit(1); } Also, this isn't equivalent: ! NsConfigEval(config, argc, argv, optind); --- 537,541 ---- ! NsConfigEval(config, argc, argv, argc); The config script should end up with unprocessed args in the interp's $::argv, right? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-03 09:29 Message: Logged In: YES user_id=184124 Yes, i run my server with all parameters, no difference. ---------------------------------------------------------------------- Comment By: Zoran Vasiljevic (vasiljevic) Date: 2005-04-03 05:42 Message: Logged In: YES user_id=95086 If you have verified the correct operation, you can submit this. The "poll" implementation is still open, right? I will be unavailable for couple of days... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-04 00:05:41
|
Feature Requests item #1174311, was opened at 2005-03-31 18:15 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1174311&group_id=130646 Category: Tcl-API Group: None >Status: Pending Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: NaviServer ToolKit Initial Comment: This is light version of templating system, in syntax very similar to OpenACS's templating. Just one small file and several demo pages. For a start this can be enough, but it could be extended to support DB api and other usefull things instead of old modules/tcl/*.tcl files in the standard distribution. ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-04-04 00:05 Message: Logged In: YES user_id=184124 I will think about it, i am supporintg my OSSWEB toolkit and forking another one very similar to the primary is just big overhead i cannot commit yet. Having light templating is good but i i see it it will grow eventually to the system i have now. If not one simple file in the core then i will postpone this. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 14:13 Message: Logged In: YES user_id=184124 Ok, i will build separate module and put it into modules directory, i will maintain it ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 02:56 Message: Logged In: YES user_id=87254 This would be great as a standalone module. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1174311&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-03 23:44:08
|
Feature Requests item #1175561, was opened at 2005-04-02 23:34 Message generated for change (Settings changed) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 Category: C-API Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: nsmain without getopt Initial Comment: attached is nsmain command parsing without getopt, it is really very simple so getopt can be avoided. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-03 15:29 Message: Logged In: YES user_id=184124 Yes, i run my server with all parameters, no difference. ---------------------------------------------------------------------- Comment By: Zoran Vasiljevic (vasiljevic) Date: 2005-04-03 11:42 Message: Logged In: YES user_id=95086 If you have verified the correct operation, you can submit this. The "poll" implementation is still open, right? I will be unavailable for couple of days... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-03 15:29:54
|
Feature Requests item #1175561, was opened at 2005-04-02 23:34 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 Category: C-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: nsmain without getopt Initial Comment: attached is nsmain command parsing without getopt, it is really very simple so getopt can be avoided. ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-04-03 15:29 Message: Logged In: YES user_id=184124 Yes, i run my server with all parameters, no difference. ---------------------------------------------------------------------- Comment By: Zoran Vasiljevic (vasiljevic) Date: 2005-04-03 11:42 Message: Logged In: YES user_id=95086 If you have verified the correct operation, you can submit this. The "poll" implementation is still open, right? I will be unavailable for couple of days... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-03 11:42:03
|
Feature Requests item #1175561, was opened at 2005-04-03 01:34 Message generated for change (Comment added) made by vasiljevic You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 Category: C-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: nsmain without getopt Initial Comment: attached is nsmain command parsing without getopt, it is really very simple so getopt can be avoided. ---------------------------------------------------------------------- >Comment By: Zoran Vasiljevic (vasiljevic) Date: 2005-04-03 13:42 Message: Logged In: YES user_id=95086 If you have verified the correct operation, you can submit this. The "poll" implementation is still open, right? I will be unavailable for couple of days... ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-02 23:34:22
|
Feature Requests item #1175561, was opened at 2005-04-02 23:34 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 Category: C-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: nsmain without getopt Initial Comment: attached is nsmain command parsing without getopt, it is really very simple so getopt can be avoided. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175561&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-02 20:33:49
|
Feature Requests item #1175025, was opened at 2005-04-01 20:14 Message generated for change (Settings changed) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175025&group_id=130646 Category: Tcl-API Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: uuencode/ base64 changes Initial Comment: I modified ns_uuencode/decode to support string any size instead of 48 bytes as it is now. Also, when encoding big string, it will do wrapping as other base64 encoders. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-02 02:37 Message: Logged In: YES user_id=184124 Strangely enough, those htuuencode/decode functions do base64 actually, we can rename them but for now at least they work for buffers any size. So, it is okay to commit? ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-02 02:01 Message: Logged In: YES user_id=87254 Adding a base64 codec is a good idea. The htuucodec is something completely different though, and is specific to the encoding of passwords in HTTP basic authentication IIRC. I think there's an old bug report in the AOLserver tracker. Can you add newly named commands/C functions? It would be less confusing, as MIME base64 is what people really want. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175025&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-02 05:03:23
|
Feature Requests item #1171843, was opened at 2005-03-28 13:43 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: nsd -c: start a REPL Initial Comment: Here's a patch which adds a new startup mode to the nsd binary: -c command mode. When selected, after the server has started rather than eternaly wait for signals it runs a Tcl shell and waits for commands. The nice thing about this is that all the server commands are available, which is not the case if you simply load libnsd.so. The main goal is testing. I've done some cleanup and you can now type 'make test' in the top level directory. 'make runtest' will drop you into an interactive shell. It could do with some improvements: 'exit' should probably trigger an orderly shutdown, and signals aren't handled. Unfortunately ns_geturl is spectacularly useless, simply fetching the bytes of a file directly from the file system. Is this useful? I would have expected it to pass through registered procs etc. I'm thinking maybe the way to go is an nstest module which adds some extra commands to dummy up a connection and run the registered proc. It would be possible I guess to also create nstestdb to create a dummy db driver, and so on... Feedback appreciated. ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-04-02 05:03 Message: Logged In: YES user_id=184124 that could work with non multithreaded programs, with threads, you never know which thread caused the segv ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-02 02:14 Message: Logged In: YES user_id=87254 Is this a core file size thing? Maybe if you up the ulimit you'll get the whole memory dump? I have seen some setups where when the program crashes it automatically calls gdb. There's this in my postfix config file: debugger_command = PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont; echo where) | gdb $daemon_directory/$process_name $process_id 2>&1 >$config_directory/$process_name.$process_id.log & sleep 5 Maybe you could trigger something like this from a segv, save some typing? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 22:28 Message: Logged In: YES user_id=184124 Also, i have a trick i've been using for a long time: In debug mode i install SEGV handler and sleep foreever, so i can attach to the process with gdb and check why it crashed. The good thing about this, server it is still running and all memory is avalable, in core dumps sometimes access is limited. It could be special comman line switch for this handler. static void Segv(int sig) { Ns_Log(Error,"ns: SIGSEGV received %d",getpid()); while(1) sleep(1); } ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 14:07 Message: Logged In: YES user_id=184124 This patch ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 04:22 Message: Logged In: YES user_id=87254 What's ok, this patch or using socat? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 03:29 Message: Logged In: YES user_id=184124 For tests it is okay ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 03:10 Message: Logged In: YES user_id=87254 It runs the full server, scheduled proc threads, conn threads, the lot! The -c option basically tells the server not to fork into the background and to start reading commands on stdin. socat look neat, but it's not a standard program. I think it's very important that 'make test' Just Works. If it's at all difficult test won't be written or run. I'm open to other options though. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 16:38 Message: Logged In: YES user_id=184124 I usually use nscp & socat combination to test the server, in this mode it runs as it should and all commands are tested using the same environment as it will be in the production. In your mode, server is used like shared library, to test commands interactively only, you still need to run the server to test background procs/callbacks. Is it possible to run server in foreground (-f) and spawn Tcl shell at the same time. In this case, you have the server and nscp-like shell at the same time. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-02 02:37:26
|
Feature Requests item #1175025, was opened at 2005-04-01 20:14 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175025&group_id=130646 Category: Tcl-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: uuencode/ base64 changes Initial Comment: I modified ns_uuencode/decode to support string any size instead of 48 bytes as it is now. Also, when encoding big string, it will do wrapping as other base64 encoders. ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-04-02 02:37 Message: Logged In: YES user_id=184124 Strangely enough, those htuuencode/decode functions do base64 actually, we can rename them but for now at least they work for buffers any size. So, it is okay to commit? ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-02 02:01 Message: Logged In: YES user_id=87254 Adding a base64 codec is a good idea. The htuucodec is something completely different though, and is specific to the encoding of passwords in HTTP basic authentication IIRC. I think there's an old bug report in the AOLserver tracker. Can you add newly named commands/C functions? It would be less confusing, as MIME base64 is what people really want. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175025&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-02 02:14:08
|
Feature Requests item #1171843, was opened at 2005-03-28 06:43 Message generated for change (Comment added) made by sdeasey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: nsd -c: start a REPL Initial Comment: Here's a patch which adds a new startup mode to the nsd binary: -c command mode. When selected, after the server has started rather than eternaly wait for signals it runs a Tcl shell and waits for commands. The nice thing about this is that all the server commands are available, which is not the case if you simply load libnsd.so. The main goal is testing. I've done some cleanup and you can now type 'make test' in the top level directory. 'make runtest' will drop you into an interactive shell. It could do with some improvements: 'exit' should probably trigger an orderly shutdown, and signals aren't handled. Unfortunately ns_geturl is spectacularly useless, simply fetching the bytes of a file directly from the file system. Is this useful? I would have expected it to pass through registered procs etc. I'm thinking maybe the way to go is an nstest module which adds some extra commands to dummy up a connection and run the registered proc. It would be possible I guess to also create nstestdb to create a dummy db driver, and so on... Feedback appreciated. ---------------------------------------------------------------------- >Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 19:14 Message: Logged In: YES user_id=87254 Is this a core file size thing? Maybe if you up the ulimit you'll get the whole memory dump? I have seen some setups where when the program crashes it automatically calls gdb. There's this in my postfix config file: debugger_command = PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont; echo where) | gdb $daemon_directory/$process_name $process_id 2>&1 >$config_directory/$process_name.$process_id.log & sleep 5 Maybe you could trigger something like this from a segv, save some typing? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 15:28 Message: Logged In: YES user_id=184124 Also, i have a trick i've been using for a long time: In debug mode i install SEGV handler and sleep foreever, so i can attach to the process with gdb and check why it crashed. The good thing about this, server it is still running and all memory is avalable, in core dumps sometimes access is limited. It could be special comman line switch for this handler. static void Segv(int sig) { Ns_Log(Error,"ns: SIGSEGV received %d",getpid()); while(1) sleep(1); } ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 07:07 Message: Logged In: YES user_id=184124 This patch ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-31 21:22 Message: Logged In: YES user_id=87254 What's ok, this patch or using socat? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-31 20:29 Message: Logged In: YES user_id=184124 For tests it is okay ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-31 20:10 Message: Logged In: YES user_id=87254 It runs the full server, scheduled proc threads, conn threads, the lot! The -c option basically tells the server not to fork into the background and to start reading commands on stdin. socat look neat, but it's not a standard program. I think it's very important that 'make test' Just Works. If it's at all difficult test won't be written or run. I'm open to other options though. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 09:38 Message: Logged In: YES user_id=184124 I usually use nscp & socat combination to test the server, in this mode it runs as it should and all commands are tested using the same environment as it will be in the production. In your mode, server is used like shared library, to test commands interactively only, you still need to run the server to test background procs/callbacks. Is it possible to run server in foreground (-f) and spawn Tcl shell at the same time. In this case, you have the server and nscp-like shell at the same time. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-02 02:01:27
|
Feature Requests item #1175025, was opened at 2005-04-01 13:14 Message generated for change (Comment added) made by sdeasey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175025&group_id=130646 Category: Tcl-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: uuencode/ base64 changes Initial Comment: I modified ns_uuencode/decode to support string any size instead of 48 bytes as it is now. Also, when encoding big string, it will do wrapping as other base64 encoders. ---------------------------------------------------------------------- >Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 19:01 Message: Logged In: YES user_id=87254 Adding a base64 codec is a good idea. The htuucodec is something completely different though, and is specific to the encoding of passwords in HTTP basic authentication IIRC. I think there's an old bug report in the AOLserver tracker. Can you add newly named commands/C functions? It would be less confusing, as MIME base64 is what people really want. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175025&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-01 22:28:13
|
Feature Requests item #1171843, was opened at 2005-03-28 13:43 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: nsd -c: start a REPL Initial Comment: Here's a patch which adds a new startup mode to the nsd binary: -c command mode. When selected, after the server has started rather than eternaly wait for signals it runs a Tcl shell and waits for commands. The nice thing about this is that all the server commands are available, which is not the case if you simply load libnsd.so. The main goal is testing. I've done some cleanup and you can now type 'make test' in the top level directory. 'make runtest' will drop you into an interactive shell. It could do with some improvements: 'exit' should probably trigger an orderly shutdown, and signals aren't handled. Unfortunately ns_geturl is spectacularly useless, simply fetching the bytes of a file directly from the file system. Is this useful? I would have expected it to pass through registered procs etc. I'm thinking maybe the way to go is an nstest module which adds some extra commands to dummy up a connection and run the registered proc. It would be possible I guess to also create nstestdb to create a dummy db driver, and so on... Feedback appreciated. ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 22:28 Message: Logged In: YES user_id=184124 Also, i have a trick i've been using for a long time: In debug mode i install SEGV handler and sleep foreever, so i can attach to the process with gdb and check why it crashed. The good thing about this, server it is still running and all memory is avalable, in core dumps sometimes access is limited. It could be special comman line switch for this handler. static void Segv(int sig) { Ns_Log(Error,"ns: SIGSEGV received %d",getpid()); while(1) sleep(1); } ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 14:07 Message: Logged In: YES user_id=184124 This patch ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 04:22 Message: Logged In: YES user_id=87254 What's ok, this patch or using socat? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 03:29 Message: Logged In: YES user_id=184124 For tests it is okay ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 03:10 Message: Logged In: YES user_id=87254 It runs the full server, scheduled proc threads, conn threads, the lot! The -c option basically tells the server not to fork into the background and to start reading commands on stdin. socat look neat, but it's not a standard program. I think it's very important that 'make test' Just Works. If it's at all difficult test won't be written or run. I'm open to other options though. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 16:38 Message: Logged In: YES user_id=184124 I usually use nscp & socat combination to test the server, in this mode it runs as it should and all commands are tested using the same environment as it will be in the production. In your mode, server is used like shared library, to test commands interactively only, you still need to run the server to test background procs/callbacks. Is it possible to run server in foreground (-f) and spawn Tcl shell at the same time. In this case, you have the server and nscp-like shell at the same time. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-01 20:14:55
|
Feature Requests item #1175025, was opened at 2005-04-01 20:14 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175025&group_id=130646 Category: Tcl-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: uuencode/ base64 changes Initial Comment: I modified ns_uuencode/decode to support string any size instead of 48 bytes as it is now. Also, when encoding big string, it will do wrapping as other base64 encoders. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1175025&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-01 14:13:38
|
Feature Requests item #1174311, was opened at 2005-03-31 18:15 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1174311&group_id=130646 Category: Tcl-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: NaviServer ToolKit Initial Comment: This is light version of templating system, in syntax very similar to OpenACS's templating. Just one small file and several demo pages. For a start this can be enough, but it could be extended to support DB api and other usefull things instead of old modules/tcl/*.tcl files in the standard distribution. ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 14:13 Message: Logged In: YES user_id=184124 Ok, i will build separate module and put it into modules directory, i will maintain it ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 02:56 Message: Logged In: YES user_id=87254 This would be great as a standalone module. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1174311&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-01 14:12:57
|
Feature Requests item #1159471, was opened at 2005-03-09 00:40 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1159471&group_id=130646 Category: C-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: Virtual Hosting Initial Comment: Okay, i did some digging and testing, looks working and much simpler. I tried to simplify default AS 4.x virtual hosting and added pageroot virtual hosting, simple way to use different pagetroots on the same server. The change vor default virtual hosting is: no defaultserver anymore, the server who registered virtual hosts is default server, so nssock is loaded in the default server, other than that virtual servers are defined the same way. One thing i left is to chamge ns_info pageroot to use Ns_GetConn() and then if exists use connPtr->pageroot, but this is simple change if you approve current virtual hosting patch. Here is the nsd.tcl config example: ns_section "ns/server/${server}/module/nssock/servers" ns_param test vlad.seryakov.com ns_param test vlad.seryakov.com:80 ns_section "ns/server/${server}/module/nssock/pageroots" ns_param ${home}/html/test vlad.seryakov.com ns_param ${home}/html/test vlad.seryakov.com:80 ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 14:12 Message: Logged In: YES user_id=184124 Can we commit this patch, i need to replace one of my virtual hosting servers and i would give it a try with new patch. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 01:59 Message: Logged In: YES user_id=184124 One notice, hostpreix bt default is vhost, not empty, would be better to have it empty. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 01:55 Message: Logged In: YES user_id=184124 Yes, this worked for me, if Zoran does not mind, you can commit it. ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-27 14:25 Message: Logged In: YES user_id=87254 The new serverdir is for storing files associated with a server (or virtual host) which are not made public via the pagedir. So, things like uploads, auto-generated data, caches etc. This will contain only the pages directory by default, because the server doesn't do anything interesting by default. I've attached a new patch which makes the serverdir and pagedir fully customisable. Here are the possible config settings: ns_section "ns/server/${servername}/fastpath" ns_param serverdir /srv # default: $home/servers/$servername ns_param pagedir pages #ns_param pageroot pages # depreciated ns_section "ns/server/${servername}/vhost" ns_param enabled false ns_param hostprefix vhosts #default "" ns_param hosthashlevel 3 ns_param stripport true ns_param stripwww true I've added path hashing, which hashes the hostname so that they are spread accross multiple directories. e.g. foo.com -> ./f/o/o/pages a.com -> ./a/_/_/pages I've also added a -host switch to the ns_serverpath and ns_pagepath commands so that tool can be written which setup the necessary directories. Does this look ok? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-18 04:26 Message: Logged In: YES user_id=184124 On the other hand if it will be possible to configure/rename "servers/" and "pages/" parts or omit them completely i would be happy with this patch. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-14 14:48 Message: Logged In: YES user_id=184124 The problem i see with this patch, it will break all my AS installations, because it assumes that every servers is under servers/ direcotory and pageroot is awlays named pages/. I my on-server installs i do not have this complex directory structure, i have html/ under ns_info home and pageroot is set in the nsd.tcl. Also, what is the point of ServerRoot dir, we have PageRoot already, if it is set into absolute path other apps use ns_info pageroot? As i understand, under ServerRoot there is only pages difrectory? Why not to use pageroot directly? ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-14 14:05 Message: Logged In: YES user_id=87254 Oh, forgot to mention. It depends on the Tcl Callbacks patch. ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-14 14:03 Message: Logged In: YES user_id=87254 I've added the patch naviserver-4.0.10-server-root-vhost.patch. It adds the following new routines: Ns_ServerPath() Ns_PagePath() Ns_SetServerRootProc() Ns_ConnLocationAppend() Ns_SetConnLocationProc() NsServerRoot() NsPageRoot() ns_serverpath ?pathSegment ...? ns_pagepath ?pathSegment ...? ns_serverrootproc script ?arg? ns_locationproc script ?arg? And the following new configuration options: ns_section "ns/server/${servername}/vhost" ns_param enabled false ns_param prefix "" ns_param pagedir pages # overides fastpath/pageroot ns_param stripwww true ns_parma stripport true This version of host header based virtual hosting which depends on the existance of the pages directory is a superset of the functionality provided by a static configuration. Applications which call Ns_ConnLocation() will need to be modified to call Ns_ConnLocationAppend() or they will not be vhost aware. I've reinstated the depreciated proc Ns_SetConnLocationProc() and changed it's signature. It dissapeared from ns.h almost 5 years ago, then reappreared ~2.5 years ago. I don't think this will be a problem. In turn, I've depreciated the Ns_SetLocationProc(). It compiles and the server runs. I haven't had time to test it. Does this look acceptable? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-13 00:41 Message: Logged In: YES user_id=184124 Just to consider the possibility, instead of mallocing pageroot/location, by default it can use sockPtr->pageroot/sockPtr->location, then when ns_conn pageroot newpageroot called, it will set connPtr->pageroot with malloced string and ns_conn pageroot will check and return it instead of sockPtr->pageroot. This way, no overhead at conn queue and still new pageroot/location can be set in Tcl ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-13 00:02 Message: Logged In: YES user_id=184124 That is the probem with nssock, it is actually an extender of the driver but still somehow kept independent. nssock itself is useless without driver and only used to bind to more than one address for different servers. it could be moved in the core but the problem will be how to define more than once instance. malloc are overhead indeed, but once copied they can be used independently and canbe set in Tcl by using ns_conn location newLocation or ns_conn pageroot newPageroot. In this case they should be a copies. Just do not make mass virtual hosting the only virtual hosting way, being able to change pageroot in the Tcl/C give developer more flexibility if required. For simple cases, mass virtual hosting is okay. ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-12 23:48 Message: Logged In: YES user_id=87254 I'm not keen at all on adding virtual hosting to the nssock driver. There's nothing HTTP specific about the nssock dirver and I'd like to keep it that way. There are a couple of problems with the other proposed solution. The paired functions Ns_SetLocationProc()/Ns_ConnSetLocationProc() etc. seems excessive, and the enforced malloc()ing at runtime of the location and pageroot strings is an unwelcome overhead. Using Tls storage is clever but pretty ugly. I think dstrings are the way to go here. I'm not sure Tls is safe in this implementation. The same dstring is used for location and pageroot strings, so it depends what the caller decides to do with the result and in what order, whether or not one overwrites the other. I would like to explore adding mas virtual hosting into the core. Let me work up a patch, I think I can get to this this weekend... ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-12 21:57 Message: Logged In: YES user_id=184124 Attached is nssock with virtual hosting patch ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-12 20:39 Message: Logged In: YES user_id=184124 Actually, vhost can be combined with nssock, if options given it will enable virtual hosting, if not works as regular sock driver. This way it is always with the core and at the same time independent. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-10 21:38 Message: Logged In: YES user_id=184124 If loaded, vhost module works as Stephan suggested, strips port/host and usesd pageroot if other root is not specified. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-10 21:37 Message: Logged In: YES user_id=184124 There is new patch with Stephans corrections/additions. I think we can provide core module for virtual hosting, i called it nsvhost and we can extend this module to do all sorts of hosting. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-10 18:53 Message: Logged In: YES user_id=184124 And keeping port and www. is sometimes necessary, you can do virtual hosting by port only, IDT does that for example, and many sites work without www. prefix, just stripping them by default may not be appropriate. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-10 18:24 Message: Logged In: YES user_id=184124 >Looks good. However, isn't ns_conn pageroot >unneccessary? For templating engines ns_info pageroot is the only way to figure out the root, UrlToFile works for fastpath only. >Would it be better to have the servers and pageroot config >in one section, to avoid duplication? They are mutually exclusive, that's why i put them in different sections, if full virtual server is set, pageroots are ignored, this is for AOL like virtual hosting with different servers(rare situation though). So in most cases pageroots will be used only, thus only one simple syntax. As for PageRoot and ServerRoot, i think this is a little cofusing. Currently, pageroot returns full path and whoever calls pageroot assumes that it will return full path. Virtual hosting using directories as hostnames is what i am currently using with vhost module and i think it can be included as a standard feature for easy virtualhosting solutions. I do not think this should be the ONLY virtual hosting solution, everybody can write their own modules using SetLocation/SetPageRoot procs or register filter which will set pageroot for each connection. Let me prepare another patch-set with your suggestions included . ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-10 08:00 Message: Logged In: YES user_id=87254 Looks good. However, isn't ns_conn pageroot unneccessary? Would it be better to have the servers and pageroot config in one section, to avoid duplication? ns_section "ns/server/${server}/module/nssock/servers" ns_param example.com exampleserver ns_param foo.example.com "exampleserver ${home}/whatever" Here, the first entry maps the example.com host to the exampleserver and uses it's default pageroot. The second entry supplies a new pageroot. How about mass virtual hosting, i.e. where you don't have to explicitly configure each host header to pageroot mapping, but construct the pageroot from the host heafer at runtime? I've attached the file nsmassvhost.c which implements the above. It uses the hooks Ns_PageRootProc and Ns_LocationProc which would be unneccessary if the functionality was included as standard. It trims the port and any leading 'www.' from the host header. It would be nice to have this for the static mapping also, as at the moment to be robust you often need 4 mappings for each virtual host. It also uses the function Ns_ServerPath(). The idea here is to introduce the concept of the virtual server root as a distinct location in the file system, where the pageroot is a location below that. I want to change this so that the serverroot is dynamic and based on the host header (when configured), and the pageroot is simply the serverroot with "/pages" (or whatever is configured) appended. It would look something like this: /srv/server1/pages /srv/server1/example.com/pages /srv/server1/example.com/cache The first path is the default or non-virtual hosted case. server1 is a server defind in the config file and has it's own private tcl library. The second path is the pageroot of a virtual host. The third is an example of some data which is specific to the example.com virtual host. So, without virtual hosts: Ns_ServerRoot() -> /srv/server1 Ns_PageRoot() -> /srv/server1/pages With virtual hosts (and called in the context of a conn thread): Ns_ServerRoot() -> /srv/server1/example.com Ns_PageRoot() -> /srv/server1/example.com/pages The advantage of this system is that you don't have to restart your server every time you add or remove a virtual host. There is also a convenient location to store data associated with both virtual servers and virtual hosts. Easy to backup, remove, etc. I haven't had time to look at how this would be integrated into what you've got here, maybe at the weekend. Feel free to take a shot at though :-) Does the scheme outlined above make sense to you? ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1159471&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-01 14:07:20
|
Feature Requests item #1171843, was opened at 2005-03-28 13:43 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: nsd -c: start a REPL Initial Comment: Here's a patch which adds a new startup mode to the nsd binary: -c command mode. When selected, after the server has started rather than eternaly wait for signals it runs a Tcl shell and waits for commands. The nice thing about this is that all the server commands are available, which is not the case if you simply load libnsd.so. The main goal is testing. I've done some cleanup and you can now type 'make test' in the top level directory. 'make runtest' will drop you into an interactive shell. It could do with some improvements: 'exit' should probably trigger an orderly shutdown, and signals aren't handled. Unfortunately ns_geturl is spectacularly useless, simply fetching the bytes of a file directly from the file system. Is this useful? I would have expected it to pass through registered procs etc. I'm thinking maybe the way to go is an nstest module which adds some extra commands to dummy up a connection and run the registered proc. It would be possible I guess to also create nstestdb to create a dummy db driver, and so on... Feedback appreciated. ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 14:07 Message: Logged In: YES user_id=184124 This patch ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 04:22 Message: Logged In: YES user_id=87254 What's ok, this patch or using socat? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 03:29 Message: Logged In: YES user_id=184124 For tests it is okay ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 03:10 Message: Logged In: YES user_id=87254 It runs the full server, scheduled proc threads, conn threads, the lot! The -c option basically tells the server not to fork into the background and to start reading commands on stdin. socat look neat, but it's not a standard program. I think it's very important that 'make test' Just Works. If it's at all difficult test won't be written or run. I'm open to other options though. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 16:38 Message: Logged In: YES user_id=184124 I usually use nscp & socat combination to test the server, in this mode it runs as it should and all commands are tested using the same environment as it will be in the production. In your mode, server is used like shared library, to test commands interactively only, you still need to run the server to test background procs/callbacks. Is it possible to run server in foreground (-f) and spawn Tcl shell at the same time. In this case, you have the server and nscp-like shell at the same time. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-01 04:22:47
|
Feature Requests item #1171843, was opened at 2005-03-28 06:43 Message generated for change (Comment added) made by sdeasey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: nsd -c: start a REPL Initial Comment: Here's a patch which adds a new startup mode to the nsd binary: -c command mode. When selected, after the server has started rather than eternaly wait for signals it runs a Tcl shell and waits for commands. The nice thing about this is that all the server commands are available, which is not the case if you simply load libnsd.so. The main goal is testing. I've done some cleanup and you can now type 'make test' in the top level directory. 'make runtest' will drop you into an interactive shell. It could do with some improvements: 'exit' should probably trigger an orderly shutdown, and signals aren't handled. Unfortunately ns_geturl is spectacularly useless, simply fetching the bytes of a file directly from the file system. Is this useful? I would have expected it to pass through registered procs etc. I'm thinking maybe the way to go is an nstest module which adds some extra commands to dummy up a connection and run the registered proc. It would be possible I guess to also create nstestdb to create a dummy db driver, and so on... Feedback appreciated. ---------------------------------------------------------------------- >Comment By: Stephen Deasey (sdeasey) Date: 2005-03-31 21:22 Message: Logged In: YES user_id=87254 What's ok, this patch or using socat? ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-31 20:29 Message: Logged In: YES user_id=184124 For tests it is okay ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-31 20:10 Message: Logged In: YES user_id=87254 It runs the full server, scheduled proc threads, conn threads, the lot! The -c option basically tells the server not to fork into the background and to start reading commands on stdin. socat look neat, but it's not a standard program. I think it's very important that 'make test' Just Works. If it's at all difficult test won't be written or run. I'm open to other options though. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 09:38 Message: Logged In: YES user_id=184124 I usually use nscp & socat combination to test the server, in this mode it runs as it should and all commands are tested using the same environment as it will be in the production. In your mode, server is used like shared library, to test commands interactively only, you still need to run the server to test background procs/callbacks. Is it possible to run server in foreground (-f) and spawn Tcl shell at the same time. In this case, you have the server and nscp-like shell at the same time. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-01 03:29:47
|
Feature Requests item #1171843, was opened at 2005-03-28 13:43 Message generated for change (Comment added) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: nsd -c: start a REPL Initial Comment: Here's a patch which adds a new startup mode to the nsd binary: -c command mode. When selected, after the server has started rather than eternaly wait for signals it runs a Tcl shell and waits for commands. The nice thing about this is that all the server commands are available, which is not the case if you simply load libnsd.so. The main goal is testing. I've done some cleanup and you can now type 'make test' in the top level directory. 'make runtest' will drop you into an interactive shell. It could do with some improvements: 'exit' should probably trigger an orderly shutdown, and signals aren't handled. Unfortunately ns_geturl is spectacularly useless, simply fetching the bytes of a file directly from the file system. Is this useful? I would have expected it to pass through registered procs etc. I'm thinking maybe the way to go is an nstest module which adds some extra commands to dummy up a connection and run the registered proc. It would be possible I guess to also create nstestdb to create a dummy db driver, and so on... Feedback appreciated. ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-04-01 03:29 Message: Logged In: YES user_id=184124 For tests it is okay ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-04-01 03:10 Message: Logged In: YES user_id=87254 It runs the full server, scheduled proc threads, conn threads, the lot! The -c option basically tells the server not to fork into the background and to start reading commands on stdin. socat look neat, but it's not a standard program. I think it's very important that 'make test' Just Works. If it's at all difficult test won't be written or run. I'm open to other options though. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 16:38 Message: Logged In: YES user_id=184124 I usually use nscp & socat combination to test the server, in this mode it runs as it should and all commands are tested using the same environment as it will be in the production. In your mode, server is used like shared library, to test commands interactively only, you still need to run the server to test background procs/callbacks. Is it possible to run server in foreground (-f) and spawn Tcl shell at the same time. In this case, you have the server and nscp-like shell at the same time. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-01 03:10:36
|
Feature Requests item #1171843, was opened at 2005-03-28 06:43 Message generated for change (Comment added) made by sdeasey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 Category: None Group: None Status: Open Resolution: None Priority: 5 Submitted By: Stephen Deasey (sdeasey) Assigned to: Stephen Deasey (sdeasey) Summary: nsd -c: start a REPL Initial Comment: Here's a patch which adds a new startup mode to the nsd binary: -c command mode. When selected, after the server has started rather than eternaly wait for signals it runs a Tcl shell and waits for commands. The nice thing about this is that all the server commands are available, which is not the case if you simply load libnsd.so. The main goal is testing. I've done some cleanup and you can now type 'make test' in the top level directory. 'make runtest' will drop you into an interactive shell. It could do with some improvements: 'exit' should probably trigger an orderly shutdown, and signals aren't handled. Unfortunately ns_geturl is spectacularly useless, simply fetching the bytes of a file directly from the file system. Is this useful? I would have expected it to pass through registered procs etc. I'm thinking maybe the way to go is an nstest module which adds some extra commands to dummy up a connection and run the registered proc. It would be possible I guess to also create nstestdb to create a dummy db driver, and so on... Feedback appreciated. ---------------------------------------------------------------------- >Comment By: Stephen Deasey (sdeasey) Date: 2005-03-31 20:10 Message: Logged In: YES user_id=87254 It runs the full server, scheduled proc threads, conn threads, the lot! The -c option basically tells the server not to fork into the background and to start reading commands on stdin. socat look neat, but it's not a standard program. I think it's very important that 'make test' Just Works. If it's at all difficult test won't be written or run. I'm open to other options though. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 09:38 Message: Logged In: YES user_id=184124 I usually use nscp & socat combination to test the server, in this mode it runs as it should and all commands are tested using the same environment as it will be in the production. In your mode, server is used like shared library, to test commands interactively only, you still need to run the server to test background procs/callbacks. Is it possible to run server in foreground (-f) and spawn Tcl shell at the same time. In this case, you have the server and nscp-like shell at the same time. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1171843&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-04-01 02:56:59
|
Feature Requests item #1174311, was opened at 2005-03-31 11:15 Message generated for change (Comment added) made by sdeasey You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1174311&group_id=130646 Category: Tcl-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: NaviServer ToolKit Initial Comment: This is light version of templating system, in syntax very similar to OpenACS's templating. Just one small file and several demo pages. For a start this can be enough, but it could be extended to support DB api and other usefull things instead of old modules/tcl/*.tcl files in the standard distribution. ---------------------------------------------------------------------- >Comment By: Stephen Deasey (sdeasey) Date: 2005-03-31 19:56 Message: Logged In: YES user_id=87254 This would be great as a standalone module. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1174311&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-03-31 18:15:20
|
Feature Requests item #1174311, was opened at 2005-03-31 18:15 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1174311&group_id=130646 Category: Tcl-API Group: None Status: Open Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: NaviServer ToolKit Initial Comment: This is light version of templating system, in syntax very similar to OpenACS's templating. Just one small file and several demo pages. For a start this can be enough, but it could be extended to support DB api and other usefull things instead of old modules/tcl/*.tcl files in the standard distribution. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1174311&group_id=130646 |
From: SourceForge.net <no...@so...> - 2005-03-28 17:02:42
|
Feature Requests item #1161597, was opened at 2005-03-11 19:30 Message generated for change (Settings changed) made by seryakov You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1161597&group_id=130646 Category: C-API Group: None >Status: Closed Resolution: None Priority: 5 Submitted By: Vlad Seryakov (seryakov) Assigned to: Vlad Seryakov (seryakov) Summary: Extend ns_info with info about traces/filters/procs Initial Comment: Attached is patch that extends ns_info with 3 commands: ns_info traces ns_info filters ns_info requestprocs They work the same way as ns_info callbacks, no functionality changed or added, just information commands ---------------------------------------------------------------------- >Comment By: Vlad Seryakov (seryakov) Date: 2005-03-28 17:02 Message: Logged In: YES user_id=184124 Closed, using new Tcl callback API. ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-27 14:40 Message: Logged In: YES user_id=87254 Hmm, I think the arg proc stuff is just for the callback and arg registered at some point in the data structure. The function which navigates the data structure obviously has to know the details, so it doesn't need a callback. So, the only functions which need this treatment would be NsFastGet and NsAdpProc. The arg passed to these is really dull, just a pointer to the server which you'll already know from walking the url trie, so really all that needs added to proc.c is something like: {(void *) NsAdpProc, "ns:adp", NULL}, {(void *) NsFastGet, "ns:fastget", NULL}, i.e. name the proc, but don't bother providing a callback to describe the arg. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-17 14:22 Message: Logged In: YES user_id=184124 Yes, this is what i did with UrlSpecific walk function, it will call Ns_ArpProc for every node which will append what-ever info to DString. We can live with that for the beginning, anyway, that info will be used in Tcl and should be converted into strings. So, i guess i can add info proc for UrlSpecific trie? ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-17 11:06 Message: Logged In: YES user_id=87254 To get info on the binary callbacks we're just going to have to register proc info for all the default filters, request procs etc. If we cover everything there should be a reasonable number of examples for module writers to follow. ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-13 01:47 Message: Logged In: YES user_id=184124 Also, somein docs would be usefull to put info how to get info about some binary callbacks: Welcome to ossweb running at /usr/local/ns/bin/nsd (pid 5524) ossweb:nscp 1> ns_info traces p:0xb7187be0 a:0x80817d8 # gdb (gdb) attach 12345 (gdb) info symbol 0xb7187be0 LogTrace in section .text ---------------------------------------------------------------------- Comment By: Vlad Seryakov (seryakov) Date: 2005-03-13 01:44 Message: Logged In: YES user_id=184124 I started with minimal changes, #defines and &syntax can be chnages of course. now that you started TclCallbacks, this thing depends when you commit your changes, it requires Ns_ArgProc and ns_info stuff. Once we have unified API for callbask i will change it to be server-specific as well, it took a while to figure out how it works :-)) ---------------------------------------------------------------------- Comment By: Stephen Deasey (sdeasey) Date: 2005-03-13 01:37 Message: Logged In: YES user_id=87254 This is a nice addition. ns_info filters/traces is server specific, but ns_info requestprocs returns info for all servers. Can you make this per-server also, to be consistent? The URL walking procs look a little tricky, I tnink they would benefit from having their own more detailed comments. The comment currently says it calls a function for each node, and the effect depends on the function. But the function signature is Ns_ArgProc so there's really only one thing it can do. Why does it fix the stack size at 512? Can these magic numbers be #define'd. Using a while loop rather than an empty for loop would be a little easier to read. There's a lot of this kind of thing: (&(triePtr->branches))->n Could this be simplified to: triePtr->branches.n ? Otherwise, looks pretty good. I like it. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=719009&aid=1161597&group_id=130646 |