tcl-websh-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ronnie Brunner <>
Subject Re: Regarding Google Analytics issue
Date Tue, 29 Sep 2009 11:55:21 GMT
Hi Manu

> I just got stuck in the same issue as you with the google analytics.
> The cookie it generates have the value that consists of '=' sign,
> which is not parsed properly, and because of the same, our secured
> subdomain site doesn't work, and as soon as I delete the cookie, it
> starts working.

Are you talking about Websh? If so, please update to the latest
version (3.6.0b5), where this issue is solved.

If that is not possible for some reason, you can overwrite the
_getCookie proc of a cookiecontext (where yourContext is changed to
the name of your context) as follows:

web::cookiecontext yourContext
proc yourContext::_getCookie {id} {
    ::set cookie [web::request HTTP_COOKIE]
    foreach v [split $cookie ";"] {
        # get key and value: note: some cookies (e.g.. Google analytics)
        # also use = in the value, so a simple split with =; does 
        # not always work...
        set key [string trim [lindex [split $v =] 0]]
        set value [string trim [join [lrange [split $v =] 1 end] =]]
        lappend kvlist $key $value
    # search for $datatag
    foreach {key value} $kvlist {
        if {[string compare $key $id] == 0} {
            return $value
    error "no matching cookie found"

> Could you kindly tell me what did you do to solve this issue.

And if you don't talk about Websh: make sure whatever pareses your
cookies properly splits at "," characters and then just takes the
everything before the first "=" as cookie name, the rest as value,
even if it contains "0" aswell...

Ronnie Brunner |
phone +41-44-247 79 79 | fax +41-44-247 70 75
Netcetera AG | 8040 Z├╝rich | Switzerland |

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message