You are viewing a plain text version of this content. The canonical link for it is here.
Posted to websh-dev@tcl.apache.org by Ronnie Brunner <ro...@netcetera.ch> on 2001/11/07 12:19:27 UTC

Re: initcode and tcldecmt.tcl ...

> Of course, the really cool way of doing this would be to compile those
> scripts as byte code, and load that directly.  But my knowledge of Tcl
> internals is such that I don't know how quickly I could do that (or
> portably, either).

That would actually be fun to do I guess, but I suggest low priority
here (btw: if we look at this at all: procomp from the Tclpro package
should be the thing to look at. One could check for procomp; use it
if available and then integrate the necessary part of the tbc runtime
into websh to be able to load the code.)

It could well be that we look at something similar in the near/far
future (we have our own "compiler" that might need a replacment,
because it does not actually compile anything, but rather just hides
code in a shared object...)

Ronnie
------------------------------------------------------------------------
Ronnie Brunner                               ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 79 Fax: +41 1 247 70 75

Re: open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
Ok, I have committed most of the list to the BTS at nagoya.

http://nagoya.apache.org/bugzilla/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&bug_status=RESOLVED&bug_status=VERIFIED&bug_status=CLOSED&email1=&emailtype1=substring&emailassigned_to1=1&email2=&emailtype2=substring&emailreporter2=1&bugidtype=include&bug_id=&changedin=&votes=&chfieldfrom=&chfieldto=Now&chfieldvalue=&product=WebSH&short_desc=&short_desc_type=allwordssubstr&long_desc=&long_desc_type=allwordssubstr&bug_file_loc=&bug_file_loc_type=allwordssubstr&keywords=&keywords_type=anywords&field0-0-0=noop&type0-0-0=noop&value0-0-0=&cmdtype=doit&newqueryname=&order=Reuse+same+sort+as+last+time

Is the URL that it gives me... what a mess.  If you guys want to add
more information, it would be more than welcome.  Even if it's not
relevant to the bug in question, anything that also sheds light on the
philosophy, goals, or real-world use of websh would be useful.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
Ronnie Brunner <ro...@netcetera.ch> writes:

> > I don't want to sound ignorant, but rather, I would like to have a
> > clear idea about these:

> No, no: I'm glad you ask. I'd rather be sure we talk about the same
> thing.

Yes, and I am realizing that websh is quite a complicated system.  I
think I will have better luck hunting down and concentrating on
individual bugs, with your support for the rationale/motivation/usage
of the particular area of code involved.

log & subst:

I entered the additional information in the bug tracking database.

> > > - Modify/Adapt packaging (autoconf etc.)

> ....

Ok, that's perfectly clear.

> > > - tcl_platform alike info for websh/mod_websh

> > I assume you mean add information for websh in that variable?

> Originally I think we planned our own variable, but thinking of it:
> why not just add some additional info in the same hash... Only
> restriction: we should comply to TEA, but I don't know what they say
> about exstension info (we could also add websh_version, and
> websh_patchLevel variables)

> Hope that helps

Yes, it does, and I have some more questions:

WRT to http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4728

Ensure -path option in web::filecontext, or
  make it the first argument (depends on parent class)

1) if I'm understanding correctly, the -path argument must be passed
   to this command?  And one way of doing that might just be to say
   "ok, the first command has to be -path", or maybe by eliminating
   the -path command and just stating that the first argument to
   filecontext is the path?  

2) What exactly does the reference to the 'parent class' mean?  I've
   been reading the code, and understand the idea behind the 'factory'
   somewhat, but the 'parent class'?  Does the factory system create
   subclasses?

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: web::request -reset

Posted by "David N. Welton" <da...@dedasys.com>.
Ronnie Brunner <ro...@netcetera.ch> writes:

> > I'm confused about

> > int resetRequestData(Tcl_Interp * interp, RequestData * requestData)

> > <dt><b>web::request -reset</b>

> > deletes all parameters from the web::request data (like
> > 'web::request -unset'), removes all static parameters (like
> > 'web::cmdurlcfg -unset'), all form variables (like 'web::formvar
> > -unset'), all query string parameters (like 'web::param -unset'),
> > and all temporary files created by HTTP form upload

> > but it also seems to reset stuff that is set in ::config, which
> > seems like a more 'global' command (and should therefore take
> > precedence?).

> I agree: imho these things should be application specific, not
> request specific. Normally this should be done in the
> web::initializer -> if reset between requests the application will
> fail. Browsing through the options in web::config, I don't see any
> option that is request specific in that sense. E.g. the
> requestData->cmdTag and requestData->timeTag should not be reset.

Ok, now for me this brings up something of a worrying situation, as it
starts to become more of a behavior change rather than a simple bugfix
or simple feature addition.

I will open a new bug for this problem - but what are your feelings
regarding a fix?

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: web::request -reset

Posted by Ronnie Brunner <ro...@netcetera.ch>.
> I'm confused about
> 
> int resetRequestData(Tcl_Interp * interp, RequestData * requestData)
> 
> <dt><b>web::request -reset</b>
> 
> deletes all parameters from the web::request data (like 'web::request
> -unset'), removes all static parameters (like 'web::cmdurlcfg
> -unset'), all form variables (like 'web::formvar -unset'), all query
> string parameters (like 'web::param -unset'), and all temporary files
> created by HTTP form upload
> 
> but it also seems to reset stuff that is set in ::config, which seems
> like a more 'global' command (and should therefore take precedence?).

I agree: imho these things should be application specific, not request
specific. Normally this should be done in the web::initializer -> if
reset between requests the application will fail. Browsing through the
options in web::config, I don't see any option that is request
specific in that sense. E.g. the requestData->cmdTag and
requestData->timeTag should not be reset.

Ronnie
------------------------------------------------------------------------
Ronnie Brunner                               ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 79 Fax: +41 1 247 70 75

Re: open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
Ok, so here is my patch:

A couple of things to look at - I Incr the boolean variable, whereas
websh doesn't for the fileupload size, for instance.

I inserted another test in there by squeezing it in between another
two.  It looks kind of ugly - better places to put it/number it?

web::config cmdurltimestamp 0

seems to act globally (as would be expected) - it messed up
request.test, so I 'fixed' it by doing:

--- src/tests/request.test	2001/10/25 11:04:29	1.2
+++ src/tests/request.test	2001/11/09 21:12:25
@@ -27,6 +27,7 @@
     web::cmdurlcfg -unset
     web::formvar -unset
     web::param -unset
+    web::request -reset
 }

Cleaner ideas?

I'll hold off on committing this patch to see if there is any discussion.

Index: src/generic/cfg.c
===================================================================
RCS file: /home/cvs/tcl-websh/src/generic/cfg.c,v
retrieving revision 1.3
diff -u -r1.3 cfg.c
--- src/generic/cfg.c	2001/10/25 17:50:13	1.3
+++ src/generic/cfg.c	2001/11/09 21:12:23
@@ -124,20 +124,22 @@
 	NULL
     };
 
-    static char *subCmd1[] = { "uploadfilesize",
-	"encryptchain",
-	"decryptchain",
-	"cmdparam",
-	"timeparam",
-	"putxmarkup",
-	"logsubst",
-	"version",
-	"copyright",
-	NULL
+    static char *subCmd1[] = { "uploadfilesize",			       
+			       "encryptchain",
+			       "decryptchain",
+			       "cmdparam",
+			       "timeparam",
+			       "putxmarkup",
+			       "logsubst",
+			       "version",
+			       "copyright",
+			       "cmdurltimestamp",
+			       NULL
     };
 
     enum subCmd1
-    { UPLOADFILESIZE,
+    { 
+	UPLOADFILESIZE,
 	ENCRYPTCHAIN,
 	DECRYPTCHAIN,
 	CMDTAG,
@@ -145,7 +147,8 @@
 	PUTXMARKUP,
 	LOGSUBST,
 	WEBSHVERSION,
-	WEBSHCOPYRIGHT
+	WEBSHCOPYRIGHT,
+	CMDURLTIMESTAMP
     };
 
 
@@ -403,6 +406,42 @@
 			     NULL);
 	    return TCL_OK;
 	}
+    case CMDURLTIMESTAMP: {
+	int tmpbool = 1;
+	WebAssertData(interp, cfgData->requestData,
+		      "web::config cmdurltimestamp", TCL_ERROR);
+	
+	WebAssertData(interp, cfgData->requestData->cmdUrlTimestamp,
+			  "web::config cmdurltimestamp", TCL_ERROR);
+	Tcl_SetObjResult(interp,
+			 Tcl_DuplicateObj(cfgData->requestData->cmdUrlTimestamp));
+	switch (objc) {
+	case 2:
+	    return TCL_OK;
+	    break;
+	case 3:
+	    if (Tcl_GetBooleanFromObj(interp, objv[2], &tmpbool) ==
+		TCL_ERROR) {
+		LOG_MSG(interp, WRITE_LOG | SET_RESULT, __FILE__,
+			__LINE__, "web::config cmdurltimestamp",
+			WEBLOG_ERROR,
+			"web::config cmdurltimestamp only accepts boolean but ",
+			"got \"", Tcl_GetString(objv[2]), "\"", NULL);
+		return TCL_ERROR;
+	    }
+	    WebDecrOldIncrNew(cfgData->requestData->cmdUrlTimestamp,
+			      Tcl_DuplicateObj(objv[2]));
+	    return TCL_OK;
+	    break;
+	default:
+	    LOG_MSG(interp, WRITE_LOG | SET_RESULT,
+		    __FILE__, __LINE__,
+		    "web::config cmdurltimestamp", WEBLOG_INFO,
+		    "usage: web::config cmdurltimestamp ?boolean?", NULL);
+	    return TCL_ERROR;
+	}
+	return TCL_OK;
+    }
     default:
 	break;
     }
Index: src/generic/request.c
===================================================================
RCS file: /home/cvs/tcl-websh/src/generic/request.c,v
retrieving revision 1.3
diff -u -r1.3 request.c
--- src/generic/request.c	2001/10/25 17:50:13	1.3
+++ src/generic/request.c	2001/11/09 21:12:23
@@ -116,6 +116,8 @@
 
 	WebNewStringObjFromStringIncr(requestData->cmdTag, "cmd");
 	WebNewStringObjFromStringIncr(requestData->timeTag, "t");
+	requestData->cmdUrlTimestamp = Tcl_NewBooleanObj(1);
+	Tcl_IncrRefCount(requestData->cmdUrlTimestamp);
 
 	HashUtlAllocInit(requestData->request, TCL_STRING_KEYS);
 
@@ -175,6 +177,10 @@
     WebDecrRefCountIfNotNullAndSetNull(requestData->cmdTag);
     WebNewStringObjFromStringIncr(requestData->cmdTag, "cmd");
 
+    WebDecrRefCountIfNotNullAndSetNull(requestData->cmdUrlTimestamp);
+    requestData->cmdUrlTimestamp = Tcl_NewBooleanObj(1);
+    Tcl_IncrRefCount(requestData->cmdUrlTimestamp);
+
     requestData->requestIsInitialized = 0;
     return TCL_OK;
 }
@@ -232,7 +238,7 @@
 
 	WebDecrRefCountIfNotNull(requestData->cmdTag);
 	WebDecrRefCountIfNotNull(requestData->timeTag);
-
+	WebDecrRefCountIfNotNull(requestData->cmdUrlTimestamp);
 	destroyParamList(requestData->request);
 
 	WebDecrRefCountIfNotNull(requestData->upLoadFileSize);
Index: src/generic/request.h
===================================================================
RCS file: /home/cvs/tcl-websh/src/generic/request.h,v
retrieving revision 1.3
diff -u -r1.3 request.h
--- src/generic/request.h	2001/10/25 17:50:13	1.3
+++ src/generic/request.h	2001/11/09 21:12:23
@@ -81,6 +81,8 @@
     /* default: cmd */
     Tcl_Obj *timeTag;		/* key to be used for param in URL (web::cmdurl) */
     /* default: t */
+    Tcl_Obj *cmdUrlTimestamp;   /* send timestamp with url's */
+    /* default: true */
     /* ............ */
     Tcl_HashTable *request;	/* everything from the request obj */
     /* e.g. server_port, server_name and so on */
Index: src/generic/url.c
===================================================================
RCS file: /home/cvs/tcl-websh/src/generic/url.c,v
retrieving revision 1.3
diff -u -r1.3 url.c
--- src/generic/url.c	2001/10/25 17:50:13	1.3
+++ src/generic/url.c	2001/11/09 21:12:25
@@ -489,6 +489,7 @@
     int plistLen = 0;
     int i = 0;
     int flag = 0;
+    int bool = 1;
     int urlformat = 0;
     Tcl_Obj *urlFmt = NULL;
     Tcl_Obj *res = NULL;
@@ -535,6 +536,10 @@
     }
 
     if (argIndexOfKey(objc, objv, params[NOTIMESTAMP]) > 0)
+	flag = (flag | WEB_URL_NOTIMESTAMP);
+
+    Tcl_GetBooleanFromObj(interp, urlData->requestData->cmdUrlTimestamp, &bool);
+    if (bool == 0)
 	flag = (flag | WEB_URL_NOTIMESTAMP);
 
     /* --------------------------------------------------------------------------
Index: src/tests/cfg.test
===================================================================
RCS file: /home/cvs/tcl-websh/src/tests/cfg.test,v
retrieving revision 1.2
diff -u -r1.2 cfg.test
--- src/tests/cfg.test	2001/10/25 11:04:29	1.2
+++ src/tests/cfg.test	2001/11/09 21:12:25
@@ -26,7 +26,7 @@
 test cfg-1.1 {wrong subcommand} {
     catch {web::config foo bar} msg
     set msg
-} {bad subcommand "foo": must be uploadfilesize, encryptchain, decryptchain, cmdparam, timeparam, putxmarkup, logsubst, version, or copyright}
+} {bad subcommand "foo": must be uploadfilesize, encryptchain, decryptchain, cmdparam, timeparam, putxmarkup, logsubst, version, copyright, or cmdurltimestamp}
 
 
 test cfg-1.2 {invalid value} {
Index: src/tests/cmdurl.test
===================================================================
RCS file: /home/cvs/tcl-websh/src/tests/cmdurl.test,v
retrieving revision 1.2
diff -u -r1.2 cmdurl.test
--- src/tests/cmdurl.test	2001/10/25 11:04:29	1.2
+++ src/tests/cmdurl.test	2001/11/09 21:12:25
@@ -378,6 +378,25 @@
     set res
 } "v319 {} {}"
 
+test cmdurl-3.191 {no time and no cmd tag} {
+
+    cleanParam    
+
+    web::config cmdurltimestamp 0
+    web::config timeparam "t"
+    web::config cmdparam "cmd"
+
+    set url [web::cmdurl "" k3191 v3191]
+    set tmp [web::querystring::getfromurl $url]
+    web::dispatch -cmd "" -postdata "" -querystring $tmp
+    set res [web::param k3191]
+    lappend res [web::param t]
+    lappend res [web::param cmd]
+    unset url
+    unset tmp
+    set res
+} "v3191 {} {}"
+
 
 test cmdurl-3.20 {full web::param syntax for web::cmdurlcfg, all-in-one} {
 
Index: src/tests/request.test
===================================================================
RCS file: /home/cvs/tcl-websh/src/tests/request.test,v
retrieving revision 1.2
diff -u -r1.2 request.test
--- src/tests/request.test	2001/10/25 11:04:29	1.2
+++ src/tests/request.test	2001/11/09 21:12:25
@@ -27,6 +27,7 @@
     web::cmdurlcfg -unset
     web::formvar -unset
     web::param -unset
+    web::request -reset
 }
 
 # -----------------------------------------------------------------------------
Index: src/unix/configure.in
===================================================================
RCS file: /home/cvs/tcl-websh/src/unix/configure.in,v
retrieving revision 1.1
diff -u -r1.1 configure.in
--- src/unix/configure.in	2001/11/05 11:42:02	1.1
+++ src/unix/configure.in	2001/11/09 21:12:26
@@ -29,9 +29,9 @@
 
 PACKAGE=web
 
-MAJOR_VERSION=%%MAJOR_VERSION%%
-MINOR_VERSION=%%MINOR_VERSION%%
-PATCHLEVEL=%%PATCHLEVEL%%
+MAJOR_VERSION=3
+MINOR_VERSION=1
+PATCHLEVEL=0
 
 VERSION=${MAJOR_VERSION}.${MINOR_VERSION}${PATCHLEVEL}
 NODOT_VERSION=${MAJOR_VERSION}${MINOR_VERSION}


Have a good weekend,
-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
davidw@dedasys.com (David N. Welton) writes:

> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4725

Also, I'm confused about

int resetRequestData(Tcl_Interp * interp, RequestData * requestData)

<dt><b>web::request -reset</b>

deletes all parameters from the web::request data (like 'web::request
-unset'), removes all static parameters (like 'web::cmdurlcfg
-unset'), all form variables (like 'web::formvar -unset'), all query
string parameters (like 'web::param -unset'), and all temporary files
created by HTTP form upload

but it also seems to reset stuff that is set in ::config, which seems
like a more 'global' command (and should therefore take precedence?).

Or maybe I've just been staring at code too many hours:-)
-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

IncrRefCount in request.c (was: Re: open bug list / website)

Posted by Simon Hefti <he...@netcetera.ch>.
David,

> requestData->upLoadFileSize = Tcl_NewLongObj(0);
> which isn't followed by an IncrRefCount.  Is there a reason for that?

No.

Throughout the code, you will find Tcl_Obj whose refcounts are 0
(never incremented) - these are the ones I was sure I would only use
internally and never give away.

Simon.

------------------------------------------------------------------------
Simon Hefti                                     simon.hefti@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 47  fax +41 1 247 70 75



Re: open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
I have begun working on:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4725

        web::cmdurl -notimestamp: make configurable in web:::config or
        web::cmdurlcfg

because the logic behind it is quite clear, and it doesn't look too
hard.

One thing that makes me curious, is this, in createRequestData(request.c):

requestData->upLoadFileSize = Tcl_NewLongObj(0);

which isn't followed by an IncrRefCount.  Is there a reason for that?

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

putxfile

Posted by "David N. Welton" <da...@dedasys.com>.
davidw@dedasys.com (David N. Welton) writes:

> Regarding:

> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4724

>         web::putxfile: eval all file even in case of an error in one
>         block

> To see if I understand it correctly, you would basically like to do
> the equivalent of a 'catch' around all the {} blocks.

> I would like to hear a bit of the background on this one, as well.

> It would certainly be 'convenient', from one point of view, but
> another way of seeing it might suggest that if there is an error,
> it's best to not pretend there isn't.  Either that, or write the
> code itself to include catch in any blocks of {} code that could be
> problematic?  I guess you must have discussed this already, and am
> curious to know the thinking behind it.

Any thoughts on this one?  Ronnie, Simon?

Don't mean to pester... maybe just a few code examples?

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
Regarding:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=4724

        web::putxfile: eval all file even in case of an error in one
        block

To see if I understand it correctly, you would basically like to do
the equivalent of a 'catch' around all the {} blocks.

I would like to hear a bit of the background on this one, as well.

It would certainly be 'convenient', from one point of view, but
another way of seeing it might suggest that if there is an error, it's
best to not pretend there isn't.  Either that, or write the code
itself to include catch in any blocks of {} code that could be
problematic?  I guess you must have discussed this already, and am
curious to know the thinking behind it.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: make_mod_websh.so (was: Re: open bug list / website)

Posted by "David N. Welton" <da...@dedasys.com>.
Simon Hefti <he...@netcetera.ch> writes:

> "../generic/script.h", line 2: newline in string literal
 
> gcc-2.95.2 has no problem with that. Then again, the configure script
> does not figure out the compile/link settings properly, and linking
> fails, again on Solaris-2.6.

Tcl itself does this:

static char initScript[] = "if {[info proc tclInit]==\"\"} {\n\
  proc tclInit {} {\n\
    global tcl_libPath tcl_library errorInfo\n\
    global env tclDefaultLibrary\n\
    rename tclInit {}\n\
    set errors {}\n\
    set dirs {}\n\
...

I'll see about changing that in ours.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

make_mod_websh.so (was: Re: open bug list / website)

Posted by Simon Hefti <he...@netcetera.ch>.
David,

> Currently,
>
> make mod_websh.so
>
> seems to work ok, although the resulting shared lib segfaults
> Apache...

I am trying to look into that. While doing so, I stumbled over a
compile problem with our old Solaris cc (did not find the version
string real quick, but it is dated 1996):

cc -DVERSION=\"%%MAJOR_VERSION%%.%%MINOR_VERSION%%%%PATCHLEVEL%%\"
-DSYSV=1 -DUSE_TCL_STUBS=1  -DHAVE_UNISTD_H=1 -DHAVE_LIMITS_H=1
-DHAVE_GETCWD=1 -DHAVE_OPENDIR=1 -DHAVE_STRSTR=1 -DHAVE_STRTOL=1
-DHAVE_TMPNAM=1 -DHAVE_WAITPID=1 -DHAVE_UNISTD_H=1
-DHAVE_SYS_PARAM_H=1 -DUSE_TERMIOS=1 -DHAVE_SYS_TIME_H=1
-DTIME_WITH_SYS_TIME=1 -DHAVE_TZNAME=1 -DHAVE_GMTIME_R=1
-DHAVE_LOCALTIME_R=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_ST_BLKSIZE=1
-DSTDC_HEADERS=1 -DNO_UNION_WAIT=1 -DNEED_MATHERR=1
-DHAVE_SIGNED_CHAR=1 -D_REENTRANT=1 -DHAVE_SYS_IOCTL_H=1
-DHAVE_SYS_FILIO_H=1
-I"/usr/local/tcl8.3.4/include/"
-I"/home/hefti/myprojects//installed/apache-1.3/include/"    -O  -KPIC
-c ../generic/script.c
"../generic/script.h", line 2: newline in string literal

gcc-2.95.2 has no problem with that. Then again, the configure script
does not figure out the compile/link settings properly, and linking
fails, again on Solaris-2.6.

Simon.

------------------------------------------------------------------------
Simon Hefti                                     simon.hefti@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 47  fax +41 1 247 70 75



Re: open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
Ronnie Brunner <ro...@netcetera.ch> writes:

> > > - Modify/Adapt packaging (autoconf etc.)
> > 
> > With what goal in mind?
 
> The current setup with a separate Makefile for mod_websh is no
> good. In stead of "Modify/Adapt" one could write "Cleanup": make
> sure the rules work, change the all rule to include mod_websh and so
> on.

Currently, 

make mod_websh.so

seems to work ok, although the resulting shared lib segfaults
Apache...

So what else needs to happen?

I also added debugging flags in configure.in.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: open bug list / website

Posted by Ronnie Brunner <ro...@netcetera.ch>.
> I don't want to sound ignorant, but rather, I would like to have a
> clear idea about these:

No, no: I'm glad you ask. I'd rather be sure we talk about the same
thing.

> > - Change default behaviour of web::log with respect to subst
> 
> In what way?  What does it do now with subst, and how should it
> behave?

right now, web::log takes the log string and runs a subst on it. The
idea is:

     web::log debug {gimme the stats: [stats]} 

this does not call stats unless the log level is debug, which can be
quite a performance boost.

Now the problem is that up to websh2 web::log (wpp_log at the time)
did NOT do this. -> It oftens more than just regularely that people
here use

     web::log debug "gimme the stats: [stats]"

in websh3. This not only corrupts the performance, but is also quite
dangerous, because [stats] might return something like "I could call
[exec \rm -rf]" because sometimes user input is logged.

My proposal here is: instead of providing a flag to disable
substitution in logging, I would provide a flag to enable substitution 
and let the default be not to [subst]. -> Change the default in
[web::config logsubst ?boolean?]. -> Turn subst on is a explicit
thing, so it's clear that the programmer knows what he/she does.


> > - Modify/Adapt packaging (autoconf etc.)
> 
> With what goal in mind?

The current setup with a separate Makefile for mod_websh is no good. In
stead of "Modify/Adapt" one could write "Cleanup": make sure the rules
work, change the all rule to include mod_websh and so on.

> > - Adapt directroy structure for apache 1.3/apache 2.0
>
> What is the problem?

I think this was solved before I sent yuo the tar ball. see below.

> > - Incorporate changes for Apache 2 into source Make the changes so
> > that modwebsh can be compiled against Apache 2 and Apache 1.3, as
> > well as changes in the autoconf so that the 'normal' Makefile can be
> > used.
> 
> This is done in the tarball I have.  How comfortable with it do you feel?

Yeah, that's what I just did before I sent you the tar. I did this in
a hurry and I'm not really happy with it, because the bunches of
#ifdefs do not realy make the code mre readable. But for the moment:
as long as it works I'm fine. As soon as we have to fix stuff for
mod_websh it certainly makes sense to look at the specific places in
the code and at least try to optimize for readablility.

> > - tcl_platform alike info for websh/mod_websh
> 
> I assume you mean add information for websh in that variable?

Originally I think we planned our own variable, but thinking of it:
why not just add some additional info in the same hash... Only
restriction: we should comply to TEA, but I don't know what they say
about exstension info (we could also add websh_version,
and websh_patchLevel variables)

> 

Hope that helps

Ronnie
------------------------------------------------------------------------
Ronnie Brunner                               ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 79 Fax: +41 1 247 70 75

Re: open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
Ronnie Brunner <ro...@netcetera.ch> writes:

I don't want to sound ignorant, but rather, I would like to have a
clear idea about these:

> - Change default behaviour of web::log with respect to subst

In what way?  What does it do now with subst, and how should it
behave?
 
> - Modify/Adapt packaging (autoconf etc.)

With what goal in mind?

> - Adapt directroy structure for apache 1.3/apache 2.0

What is the problem?

> - Incorporate changes for Apache 2 into source Make the changes so
> that modwebsh can be compiled against Apache 2 and Apache 1.3, as
> well as changes in the autoconf so that the 'normal' Makefile can be
> used.

This is done in the tarball I have.  How comfortable with it do you feel?
 
> - tcl_platform alike info for websh/mod_websh

I assume you mean add information for websh in that variable?

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
Ronnie Brunner <ro...@netcetera.ch> writes:

> - Change semantic of web::putx

>   Idea: every HTML-Block is actualy inserted as a web::put <block>
>   into the code to eval, other (script-code) is just appended to
>   that block and then in the end evaluated.

Ala mod_dtcl?

This one sounds like a change that could have other consequences.  Can
you guys comment more on this?

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
Ronnie Brunner <ro...@netcetera.ch> writes:

> > I requested a list of open bugs a week or so ago, and don't believe
> > I've seen it, unless I've misplaced it somewhere.
> 
> I thought this was what I sent you in one of the first mails:

Ah, I do indeed have that.  I was wondering if there were any more
'complete' (descriptive) format.

BTW, I received the contract and NDA yesterday and sent them off
today.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

Re: open bug list / website

Posted by Ronnie Brunner <ro...@netcetera.ch>.
David,

> I requested a list of open bugs a week or so ago, and don't believe
> I've seen it, unless I've misplaced it somewhere.

I thought this was what I sent you in one of the first mails:

ToDo-List Websh
---------------

The following current issues are from Netcetera's internal issue handler
tool (ISIS). These issues should be transferred to thenew place by week 44.

- Change default behaviour of web::log with respect to subst

- Modify/Adapt packaging (autoconf etc.)
  
- Adapt directroy structure for apache 1.3/apache 2.0

- 3.0.0 winNT build on website
      
- Make 3.0.0 RPMs (Linux + BSD) + website

- Exclusion of log filters
  e.g. log all but level info, log all but facility foo
  
- Make examples/doc on websh.com 3.00 ready
  many examples are still pre 3.00 API

- web::response -select default should set the default output channel
  depending on mode (websh or mod_websh), web::response -select default
  should set the channel to the default channel (currently stdout and
  apache respectively)

- Error in web::dispatch -postdata not propagated
  An error in parsing postdata in web::dispatch is not propagated, so
  e.g. problems parsing the content-length parameter in
  "web::dispatch -postdata" is not reported.
  Fix should be:
  dispatch.c: return value of calls to parsePostData() might be TCL_ERROR
  and should terminate the current procedure and propagate TCL_ERROR.

- Wrong default scheme in cmdurl ??
  default is always http. Should depend on server scheme. check if
  env(HTTPS) has value "on" (or is there a better way?)

- web::response set headers in image example on websh.com

- Incorporate changes for Apache 2 into source
  Make the changes so that modwebsh can be compiled against Apache 2 and
  Apache 1.3, as well as changes in the autoconf so that the 'normal'
  Makefile can be used.

- Change semantic of web::putx
  Idea: every HTML-Block is actualy inserted as a web::put <block> into the
  code to eval, other (script-code) is just appended to that block and
  then in the end evaluated.

- web::putxfile: eval all file even in case of an error in one block

- web::cmdurl -notimestamp: make configurable in web:::config or
  web::cmdurlcfg

- Keep list of web::contexts, and delete at end of request
  Security measure: prevent web::context data to be
  moved from one request to the next in mod_websh
  RB: I don't like this. General configuration should be persistent
  across requests -> this is the developers responsibility!

- web::context invalidation
  Add invalidate command to web::context (amounts to namespace forget)

- web::filecontext: -path is mandatory
  Ensure -path option in web::filecontex, or
  make it the first argument (depends on parent class)

- Check .so in modwebsh

- Catch in web::dispatch disrupts error message
  Situation: want a global catch across all web::command procs
    # global error catcher
    if {[catch {web::dispatch -hook {logHttpRequest;
    normalizeHttpRequest}} errMsg]} {
        # we signal every error to the client
        web::log pisa.error ""Exception: $errMsg""
        sendHttpErrorResponse ""Exception: $errMsg""
    }
  Problem: web::dispatch catches possible errors and modifies
  errorMessage
  -> the original errorMessage is not available anymore
  Suggestion: remove catch from web::dispatch or do not modify
  original error message

- tcl_platform alike info for websh/mod_websh

> 
> Also, any thoughts about the web site plans?
> 

Coming soon. Sorry for the delay ;-)

Ronnie
------------------------------------------------------------------------
Ronnie Brunner                               ronnie.brunner@netcetera.ch
Netcetera AG, 8040 Zuerich    phone +41 1 247 79 79 Fax: +41 1 247 70 75

Re: initcode and tcldecmt.tcl ...

Posted by "David N. Welton" <da...@dedasys.com>.
Ronnie Brunner <ro...@netcetera.ch> writes:

> That would actually be fun to do I guess, but I suggest low priority
> here.

Agreed - I had a quick look to get a few ideas about it, but I think
there are more important things.

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/

open bug list / website

Posted by "David N. Welton" <da...@dedasys.com>.
I requested a list of open bugs a week or so ago, and don't believe
I've seen it, unless I've misplaced it somewhere.

Also, any thoughts about the web site plans?

-- 
David N. Welton
   Consulting: http://www.dedasys.com/
Free Software: http://people.debian.org/~davidw/
   Apache Tcl: http://tcl.apache.org/
     Personal: http://www.efn.org/~davidw/