tcl-websh-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <ronnie.brun...@netcetera.ch>
Subject Re: cookiecontext
Date Sun, 22 May 2005 20:55:27 GMT
Hi Ulrich

> > What version of Tcl are you working with?
> 8.4.6

I can't reproduce your problem. I tried with several Tcl Versions
(from 8.4.0 upto 8.5a2) cgi and mod_websh ..., but only on Solaris
What OS are you working on?

Can you reproduce your results when running the script as cgi? (just
put the finalizer at the end of the script and run it as follows:
websh3.5.1a1 test.ws3)

And what does your log file look like? Mine looks always like:

05/22/05 22:48:59 [20399] websh.info: web::dispatch: Handling command "default"
05/22/05 22:48:59 [20399] ws3.debug: Starting command default
05/22/05 22:48:59 [20399] ws3.debug: Updating cookie
05/22/05 22:48:59 [20399] ws3.debug: Before commit
05/22/05 22:48:59 [20399] ws3.debug: After commit
05/22/05 22:48:59 [20399] ws3.debug: Generate a page
05/22/05 22:48:59 [20399] ws3.debug: Page containing 'clock format' done
05/22/05 22:48:59 [20399] ws3.debug: Sending page
05/22/05 22:48:59 [20399] ws3.debug: done
05/22/05 22:48:59 [20399] finalizer.info: shutting down interp

Regards
Ronnie

> > First we should track down the actual problem. If it's really a Tcl
> > problem, let them fix it (maybe with our help). If not, than we have a
> > problem in Websh and I hope we find a way to fix the cause, not just
> > the symptoms ;-)
> Curing the symptoms is pretty easy. I'm interested in the cause, too.
> 
> >
> > A stripped down version of the relevant code would also help.
> See below. When I tried this stripped down version, I noticed, that
> it works correctly on the first request (of an interpreter). The symptom
> shows up from the second request onwards.(?)
>  
> > I know, I know ... I wanted to make sure the Windows build is fixed
> > before we release an update, and I would prefer a more stable
> > autoconf / configure setup. But it might be that it's better to at
> > least have the bugs fixed.
> Definitely! And don't forget the "Fehlende-Dateien" ;-)
> 
> Regards
> 
> Ulrich
> 
> Now for the code (test.ws3), remember my environment,
> LANG=de_DE@euro
> LC_TIME not set:
> 
> web::cookiecontext mycookie -path / -expires "2 week"
> 
> web::initializer {
>   # perReqCleanup drops logging configuration after every request
>   # we don't want that
>   proc web::ap::perReqCleanup {} {}
>   # init logging
>   web::logdest add *.-debug file -unbuffered /yourpath/ws3.log
>   web::logfilter add *.-debug
> }
> 
> web::finalizer {
>   web::log finalizer.info "shutting down interp"
>   }
> 
> web::command default {
>   web::log ws3.debug "Starting command default"
>   mycookie::init dummy
>   web::log ws3.debug "Updating cookie"
>   set visits [mycookie::cget nvisits 0]
>   incr visits
>   mycookie::cset nvisits $visits
>   mycookie::cset lvisit [clock seconds]
>   web::log ws3.debug "Before commit"
>   mycookie::commit
>   web::log ws3.debug "After commit"
>   # redirect response to a variable
>   set chan [web::response -select #out]
>   web::response -sendheader 0
>   # generate a page
>   web::log ws3.debug "Generate a page"
>   web::put "This is a test page [clock format [clock seconds]]"
>   web::log ws3.debug "Page containing 'clock format' done"
>   # send the response
>   web::response -select $chan
>   web::log ws3.debug "Sending page"
>   web::put $out
>   web::log ws3.debug "done"
> }
> 
> web::dispatch
> mycookie::delete
> 
> 
> To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
> For additional commands, e-mail: websh-dev-help@tcl.apache.org
> 

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

---------------------------------------------------------------------
To unsubscribe, e-mail: websh-dev-unsubscribe@tcl.apache.org
For additional commands, e-mail: websh-dev-help@tcl.apache.org


Mime
View raw message