Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclcache.c,1.2,1.3 tclcmds.c,1.34,1.35

2006-04-16 Thread Vlad Seryakov
There's no point checking for existence unless you're also going to do something with it -- that's a separate operation and that's a race condition. If the cache is used to keep some flag about somehting, other thread can just check if flag is set then do something. A read only cache doesn'

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclcache.c,1.2,1.3 tclcmds.c,1.34,1.35

2006-04-16 Thread Stephen Deasey
On 4/16/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: > No, ns_cache_exists should be kept, it is useful sometimes to check if > the entry there, for read-only caches for example. There's no point checking for existence unless you're also going to do something with it -- that's a separate operation

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclcache.c,1.2,1.3 tclcmds.c,1.34,1.35

2006-04-15 Thread Vlad Seryakov
No, ns_cache_exists should be kept, it is useful sometimes to check if the entry there, for read-only caches for example. It's hard to tell exactly the real problem, once your application is over 100K lines of Tcl code which implements the whole company's OSS/backoffice, there are a lot of spe

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclcache.c,1.2,1.3 tclcmds.c,1.34,1.35

2006-04-15 Thread Stephen Deasey
On 4/5/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: > Yes, i use cache and in my case i do need to use get and set in > different situations, for example i need to set cache entry regardless > of what is there, eval will return me existing value, so i need to flush > it first which gets to the same

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclcache.c,1.2,1.3 tclcmds.c,1.34,1.35

2006-04-05 Thread Vlad Seryakov
Yes, i use cache and in my case i do need to use get and set in different situations, for example i need to set cache entry regardless of what is there, eval will return me existing value, so i need to flush it first which gets to the same race condition issue. Same with get, i just need to get

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/tests http.test,1.6,1.7

2006-03-09 Thread Vlad Seryakov
Yes, this is temporary, testing is not going very fast because i am busy at work but i keep trying to resolve this issue. Of course all your help is appreciated, eventually test will do overflow and weird size. Stephen Deasey wrote: On 3/7/06, Vlad Seryakov <[EMAIL PROTECTED]> wrote: Update o

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd conn.c,1.23,1.24

2006-01-06 Thread Zoran Vasiljevic
Am 06.01.2006 um 08:25 schrieb Stephen Deasey: Don't forget to run make test before you commit... ns_conn-1.2 basic syntax: wrong argument FAILED Ah... Zoran

Re: [naviserver-devel] Re: Naviserver

2005-12-05 Thread Vlad Seryakov
ChangeLog in the distiribution will give you pretty clear picture what've been changed and added, top level overview of chnaged also in NEWS file. Zoran Vasiljevic wrote: On 05.12.2005, at 09:54, Nima Mazloumi wrote: Hello, is the naviserver then aolserver + extensions? And what are the m

Re: [naviserver-devel] Re: Naviserver

2005-12-04 Thread Bernd Eidenschink
> Recently i do not receive anything from the list. vlad, you can verify / sync online: http://sourceforge.net/mailarchive/forum.php?forum=naviserver-devel

Re: [naviserver-devel] Re: Naviserver

2005-12-04 Thread Zoran Vasiljevic
On 04.12.2005, at 21:23, Vlad Seryakov wrote: Strange i've never seen this post on the mailing list. Recently i do not receive anything from the list. It was not on the list. It was sent to me directly. Zoran

Re: [naviserver-devel] Re: Naviserver

2005-12-04 Thread Vlad Seryakov
Strange i've never seen this post on the mailing list. Recently i do not receive anything from the list. Zoran Vasiljevic wrote: On 03.12.2005, at 17:32, Nima Mazloumi wrote: Hello, I found this server at sourceforge and was wondering why the features were not committed to the aolserver i

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/include ns.h,1.27,1.28

2005-06-28 Thread Zoran Vasiljevic
Am 29.06.2005 um 04:04 schrieb Stephen Deasey: The 'V' in Ns_ConnVSetHeaders() suggests it takes a va_list, as in Ns_DStringVPrintf() used in the implementation. Unfortunately, Ns_ConnPrintfHeader() already exists. It prints directly to the output stream which looks pretty silly. The function

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/include ns.h,1.27,1.28

2005-06-28 Thread Vlad Seryakov
yes, i was confued with that function as well. if it is not used we better rename/drop it, i agree about using V but that was the best i was able to come up with:-))) Stephen Deasey wrote: On 6/28/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote: Update of /cvsroot/naviserver/naviserver/include I

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd return.c,1.5,1.6

2005-06-27 Thread Zoran Vasiljevic
Am 24.06.2005 um 22:41 schrieb Stephen Deasey: Finally, is this function necessary? Ns_ConnReturnFile already exists in fastpath.c. Absolutely. I'm removing this from the code. Zoran

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd nsmain.c,1.13,1.14

2005-06-27 Thread Zoran Vasiljevic
Am 27.06.2005 um 05:48 schrieb Stephen Deasey: What does 'tcp' stand for? How about 'cwd': tcp is rubbish. I have fixed this now. Zoran

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd nswin32.c,1.6,1.7

2005-06-27 Thread Zoran Vasiljevic
Am 27.06.2005 um 07:06 schrieb Stephen Deasey: This Windows only command asks for a restart, right? This should be hooked up to the -restart switch of the ns_shutdown command, which is essentially the same thing. Otherwise, Tcl programmers will have to test the current platform to portably res

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Vlad Seryakov
All that encoding also depends on how your server configured, does it use non-standard encoding or everything in UTF. Eastern websites usually support many languages and there all encoding/translation goes, so being able to explicitly handle binary data is important. Zoran Vasiljevic wrote:

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Zoran Vasiljevic
Am 10.06.2005 um 18:55 schrieb Stephen Deasey: You've just passed arbitrary bytes to an API which expects UTF8. Expect your server to crash... Hm set chan [open /the/file.img] fconfigure $chan -translation binary set datain [read $chan] close $file nsv_set Images file.img $datain # set

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Vlad Seryakov
This is i missed, never thought it is available Stephen Deasey wrote: Tcl_ObjType byteArrayType = Tcl_GetObjType("bytearray"); On 6/10/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote: The problem is, there is no Public API to check object for ByteArray type. You have to include tclInt.h for this

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Stephen Deasey
On 6/10/05, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote: > > Am 10.06.2005 um 17:42 schrieb Stephen Deasey: > > > That being the > > case, you should be able to check the type of the object given to > > ns_return, and act accordingly > > > > And what if it shimmers away? > > You read-in the fil

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Stephen Deasey
Tcl_ObjType byteArrayType = Tcl_GetObjType("bytearray"); On 6/10/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote: > The problem is, there is no Public API to check object for ByteArray > type. You have to include tclInt.h for this which is not public. > > Stephen Deasey wrote: > > On 6/10/05, Vlad S

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Stephen Deasey
On 6/10/05, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote: > > Am 10.06.2005 um 17:50 schrieb Vlad Seryakov: > > > Second try :-))) > > You'd get (probably) a sigsegv if somebody says: > >ns_return -binary 200 > > Yes, this arg parsing can be a PITA. Therefore I like > Stephens tclobjv code :

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Stephen Deasey
For future reference, you can hande this by using the Ns_ObjvObj option/arg type which just gives you back the underlying Tcl object. You can then handle it however you like. On 6/10/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote: > yes, parsing should check for nulls an dlimits, just to see if ide

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Vlad Seryakov
yes, parsing should check for nulls an dlimits, just to see if idea is coorrect. obkv parsing will not work here because i will need change on the fly TclObjvString and TclObjvByteArray. if (objc > param && !strcmp(Tcl_GetString(objv[param]),"-binary")) { binary = 1; param++

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Zoran Vasiljevic
Am 10.06.2005 um 17:50 schrieb Vlad Seryakov: Second try :-))) You'd get (probably) a sigsegv if somebody says: ns_return -binary 200 Yes, this arg parsing can be a PITA. Therefore I like Stephens tclobjv code :-) Unfortunately, it won't do the boolean flags, but we've discussed that alrea

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Vlad Seryakov
The problem is, there is no Public API to check object for ByteArray type. You have to include tclInt.h for this which is not public. Stephen Deasey wrote: On 6/10/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote: I thought about ns_return -binary as well. first -binary flag is optional so it will

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Zoran Vasiljevic
Am 10.06.2005 um 17:42 schrieb Stephen Deasey: That being the case, you should be able to check the type of the object given to ns_return, and act accordingly And what if it shimmers away? You read-in the file with "-translation binary" put the resulting data in the nsv_array, and get it ba

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Vlad Seryakov
Second try :-))) int NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Ns_Conn *conn; unsigned char *data = 0, *type = 0; int result, param = 1, status = 0, len = 0, binary = 0; if (!strcmp(Tcl_GetString(objv[param]),"-binary")) {

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Stephen Deasey
On 6/10/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote: > I thought about ns_return -binary as well. first -binary flag is > optional so it will be compatible with the old API. Let me try this. > > Zoran Vasiljevic wrote: > > > > Am 10.06.2005 um 15:41 schrieb Vlad Seryakov: > > > >> * Tcl_GetByteArr

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Zoran Vasiljevic
Am 10.06.2005 um 17:23 schrieb Vlad Seryakov: How about this, i tested it : int NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) Hm... I would say, if somebody wanted to do: ns_return 200 text/plain -binary you'd have a problem, right? Zoran

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Vlad Seryakov
How about this, i tested it : int NsTclReturnObjCmd(ClientData arg, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]) { Ns_Conn *conn; unsigned char *data = 0, *type = 0; int i, result, status = 0, len = 0, binary = 0; for (i = 1;i < objc;i++) { if (!strcmp(Tcl_GetStri

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Vlad Seryakov
I thought about ns_return -binary as well. first -binary flag is optional so it will be compatible with the old API. Let me try this. Zoran Vasiljevic wrote: Am 10.06.2005 um 15:41 schrieb Vlad Seryakov: * Tcl_GetByteArrayFromObj -- * * Attempt to get the array of bytes from the Tcl obj

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Zoran Vasiljevic
Am 10.06.2005 um 15:41 schrieb Vlad Seryakov: * Tcl_GetByteArrayFromObj -- * * Attempt to get the array of bytes from the Tcl object. If the * object is not already a ByteArray object, an attempt will be * made to convert it to one. So, if i call ns_return from Tcl and pass data

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Vlad Seryakov
Yes, i see. fixed Stephen Deasey wrote: On 6/9/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote: I have no failed tests Tests running in interp: /home/vlad/src/naviserver/nsd/nsd Tests located in: /home/vlad/src/naviserver/tests Tests running in: /home/vlad/src/naviserver/tests Temporary files

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-10 Thread Vlad Seryakov
* Tcl_GetByteArrayFromObj -- * * Attempt to get the array of bytes from the Tcl object. If the * object is not already a ByteArray object, an attempt will be * made to convert it to one. So, if i call ns_return from Tcl and pass data parameter, it will be always type of String. B

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-09 Thread Stephen Deasey
I think it's fine to also alow ns_return to handle binary data, I'm just wondering if it should be with the extra command ns_returnbinary? It looks like you can simple check the type of the Tcl object passed to ns_return for "bytearray". That's the only case it makes sense to write the bytes dire

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-09 Thread Stephen Deasey
On 6/9/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote: > I have no failed tests > > Tests running in interp: /home/vlad/src/naviserver/nsd/nsd > Tests located in: /home/vlad/src/naviserver/tests > Tests running in: /home/vlad/src/naviserver/tests > Temporary files stored in /home/vlad/src/naviserv

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-09 Thread Vlad Seryakov
ns_respond now supports binary so ns_returnbinary is redundant, but i think Tcl_GetByteArray works with string and byte array, just Tcl_GetByteArray does not do eny encoding/converting to/From utf. Stephen Deasey wrote: Before you cvs commit, you must make test. Two tests are broken... We're

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd tclobjv.c,1.7,1.8 tclresp.c,1.4,1.5

2005-06-09 Thread Vlad Seryakov
I have no failed tests Tests running in interp: /home/vlad/src/naviserver/nsd/nsd Tests located in: /home/vlad/src/naviserver/tests Tests running in: /home/vlad/src/naviserver/tests Temporary files stored in /home/vlad/src/naviserver/tests Test files sourced into current interpreter Running te

Re: [naviserver-devel] Re: [naviserver-commits] modules/nsfreetds nsfreetds.c,1.5,1.6

2005-06-09 Thread Vlad Seryakov
yes, my bad, my modules subdir under naviserver and commit took it with main comit. Stephen Deasey wrote: Before you cvs commit, you must cvs diff. This commit message does not go with this change. It doesn't even go with this module. On 6/9/05, Vlad Seryakov <[EMAIL PROTECTED]> wrote: U

Re: [naviserver-devel] Re: [naviserver-commits] naviserver NEWS,1.2,1.3

2005-06-08 Thread Vlad Seryakov
Okay, i thought it is global for the whole project. I am maintaning modules i imported but they need some work for adding all those files. Stephen Deasey wrote: The NEWS file is just like the ChangeLog in the sense that it only refers to changes in the package it's contained in. Each of the m

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd conn.c,1.7,1.8

2005-04-17 Thread Zoran Vasiljevic
Am 17.04.2005 um 00:37 schrieb Stephen Deasey: Hmm, I think this should return the old status, right? Huh... again the same trap!!! It seems pretty unlogical hence we have gotten there twice. Sorry... It was a long day yesterday. I will fix this right away. Zoran

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd dns.c,1.1.1.1,1.2

2005-04-12 Thread Stephen Deasey
On 4/11/05, Zoran Vasiljevic <[EMAIL PROTECTED]> wrote: > > Am 11.04.2005 um 05:05 schrieb Stephen Deasey: > > > I guess this is an OSX problem? While looking at the configure tests, > > I noticed that gethostbyname_r etc. are not used on Linux, even though > > they're available. The standard c

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nsd dns.c,1.1.1.1,1.2

2005-04-10 Thread Zoran Vasiljevic
Am 11.04.2005 um 05:05 schrieb Stephen Deasey: I guess this is an OSX problem? While looking at the configure tests, I noticed that gethostbyname_r etc. are not used on Linux, even though they're available. The standard call is thread safe, but only because glibc puts a lock around everything.

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nslog nslog.c,1.1.1.1,1.2

2005-03-07 Thread Stephen Deasey
http://cvs.sourceforge.net/viewcvs.py/naviserver/naviserver/nslog/nslog.c?rev=1.3&view=log The cvs commit message for nslog/nslog.c now reads: "Add Ns_ConnSetResponseStatus command to be able to se response status without touching headers. Also ns_conn status has been extended with ability to se

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nslog nslog.c,1.1.1.1,1.2

2005-03-03 Thread Zoran Vasiljevic
On Thursday 03 March 2005 09:43, Stephen Deasey wrote: > I've noticed some problems with this recent change. > > > The log message doesn't say what has changed, just that something has > changed, although the ChangeLog entry is better. The X-Forwarded-For > change is a bug fix and is not mention

Re: [naviserver-devel] Re: [naviserver-commits] naviserver/nslog nslog.c,1.1.1.1,1.2

2005-03-03 Thread Vlad Seryakov
I've been using that new module for so long time that i did not realized that the code is so different than current style, i am sorry. The log message doesn't say what has changed, just that something has changed, although the ChangeLog entry is better. The X-Forwarded-For change is a bug fix