Re: [Webware-discuss] Session Issue bug found

2007-08-04 Thread sophana
Christoph Zwerschke a écrit :
 Concerning the sessions, this may have to do with the more secure 
 default cookie path for Webware. It will be probably using '/wk' now, 
 while you had been using '/'. If you still experience problems with the 
 cookies, you can set a fixed cookie path in 0.9.4, setting 
 'SessionCookiePath'. But the default setting should work fine normally.
   
I made some investigation on the session problem, there seems to be a
bug with 0.9.4 and mod rewrite.

As I said earlier, I use mod_rewrite just to map / to /wk/ and nothing else.
This means that I have /wk/Servlets paths public.

Now looking at firefox cookie list, when I go to my server root url, I
get a SID cookie with the path set to //
When I go to another /wk/* url I get another cookie with the path set to
/wk/
This make 2 separate webware sessions!

everytime I come back to /, the webware session is reset...

With my other 0.9.2 webware, I get only one cookie set to /

Using 'SessionCookiePath' to '/' seem to fix the problem...

I think the default cookie path should not depend on the path before
going through mod_rewrite but the destination path : /wk/

I still can't reproduce the AppServer freeze.
But I corrected a memory leak in my code.

Will try to go again in production...

-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue

2007-08-02 Thread Christoph Zwerschke
 I will revert to the previous server, then try to reproduce the problem.
 I hope the session incompatibility will not show up again...

Yes, you should check the new version on the old server and the old 
version on the new server to see whether it is an issue of the server or 
or Webware. I have 0.9.4 in production running on two servers for some 
time now, and haven't met any problems.

Concerning the sessions, this may have to do with the more secure 
default cookie path for Webware. It will be probably using '/wk' now, 
while you had been using '/'. If you still experience problems with the 
cookies, you can set a fixed cookie path in 0.9.4, setting 
'SessionCookiePath'. But the default setting should work fine normally.

If your servers have different Python versions, check that the server 
has write access to create new .pyc files or recompile these.

Please note that I will be offline for 3 weeks and cannot help with 
Webware during that time...

-- Chris




-
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now   http://get.splunk.com/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue

2007-06-13 Thread Jerome Kerdreux


Ho I miss to answer, this email !

/me slaps me !!! 

In fact, I hand patched this stuff like Christoph ask, but I run into 
other issues.. mainly cause I already asked the URLParser before: 

http://www.larsen-b.com/Article/91.html 

I managed to fix the issue, but don't ask me exactly how. After this,
I run into other issues on this website (mainly docutils API changes)
so, I decided to quick fix that and keep it running in the current 
stage. 

I need to find another blog system in fact. This one, works fine, but
as I don't maintain it, I run into this kind of stuff at each apt-get 
update :) 

Thanks a lot webware fellows for the support :)

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue

2007-05-15 Thread Christoph Zwerschke
Jerome Kerdreux wrote:
 Hum .. I guess you found something. The url is 
 http://www.larsen-b.com/Articles/X.html 
 but the cookie path is /wk/  ... Do you have a idea to fix this ? 

I cannot see how this happens with the rewrite rules you posted, but you 
wrote that you are using another URLDispatcher. So I assume,

http://www.larsen-b.com/Articles/X.html

is somehow redirected to something like

http://www.larsen-b.com/wk/blog/Articles?id=X

But because the redirected URI is completly different, Webware cannot 
determine the correct cookie path and sets it to '/wk' instead of '/'.

Can you check the following? In WebKit/Request.py there are the 
following lines (two times):

if i = 0:
 self._servletPath = self._uri[:i]

Can you change both of these cases to:

self._servletPath = i = 0 and self._uri[:i] or '/'

Let me know if this solves the problem.

-- Chris

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue

2007-05-15 Thread Jeremy Kaplan
I'm kinda nervous to expose how I do things, for fear of being told I'm
completely smoking crack, BUT...

We use mod_rewrite to map the /wk/ noise right to the document root in
the httpd.conf file (similarly to what I said early about the various
'web resource' type directories.   This seems to work just fine for us,
and I haven't notice any slowdown using mod_rewrite...but then sometimes
I'm quite oblivious...

jd 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christoph Zwerschke
Sent: Tuesday, May 15, 2007 1:40 AM
To: Discussion of Webware for Python including feedback and proposals.
Subject: Re: [Webware-discuss] Session Issue

Jerome Kerdreux wrote:
 Hum .. I guess you found something. The url is 
 http://www.larsen-b.com/Articles/X.html
 but the cookie path is /wk/  ... Do you have a idea to fix this ? 

I cannot see how this happens with the rewrite rules you posted, but you
wrote that you are using another URLDispatcher. So I assume,

http://www.larsen-b.com/Articles/X.html

is somehow redirected to something like

http://www.larsen-b.com/wk/blog/Articles?id=X

But because the redirected URI is completly different, Webware cannot
determine the correct cookie path and sets it to '/wk' instead of '/'.

Can you check the following? In WebKit/Request.py there are the
following lines (two times):

if i = 0:
 self._servletPath = self._uri[:i]

Can you change both of these cases to:

self._servletPath = i = 0 and self._uri[:i] or '/'

Let me know if this solves the problem.

-- Chris


-
This SF.net email is sponsored by DB2 Express Download DB2 Express C -
the FREE version of DB2 express and take control of your XML. No limits.
Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue

2007-05-15 Thread Jeremy Kaplan
Bah, mis-replied...meant to reply to the 'Static Content' thread.  Sorry
=/

/goes back to smoking crack

jd 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Jeremy Kaplan
Sent: Tuesday, May 15, 2007 7:29 AM
To: Discussion of Webware for Python including feedback and proposals.
Subject: Re: [Webware-discuss] Session Issue

I'm kinda nervous to expose how I do things, for fear of being told I'm
completely smoking crack, BUT...

We use mod_rewrite to map the /wk/ noise right to the document root in
the httpd.conf file (similarly to what I said early about the various
'web resource' type directories.   This seems to work just fine for us,
and I haven't notice any slowdown using mod_rewrite...but then sometimes
I'm quite oblivious...

jd 

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Christoph Zwerschke
Sent: Tuesday, May 15, 2007 1:40 AM
To: Discussion of Webware for Python including feedback and proposals.
Subject: Re: [Webware-discuss] Session Issue

Jerome Kerdreux wrote:
 Hum .. I guess you found something. The url is 
 http://www.larsen-b.com/Articles/X.html
 but the cookie path is /wk/  ... Do you have a idea to fix this ? 

I cannot see how this happens with the rewrite rules you posted, but you
wrote that you are using another URLDispatcher. So I assume,

http://www.larsen-b.com/Articles/X.html

is somehow redirected to something like

http://www.larsen-b.com/wk/blog/Articles?id=X

But because the redirected URI is completly different, Webware cannot
determine the correct cookie path and sets it to '/wk' instead of '/'.

Can you check the following? In WebKit/Request.py there are the
following lines (two times):

if i = 0:
 self._servletPath = self._uri[:i]

Can you change both of these cases to:

self._servletPath = i = 0 and self._uri[:i] or '/'

Let me know if this solves the problem.

-- Chris


-
This SF.net email is sponsored by DB2 Express Download DB2 Express C -
the FREE version of DB2 express and take control of your XML. No limits.
Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss



-
This SF.net email is sponsored by DB2 Express Download DB2 Express C -
the FREE version of DB2 express and take control of your XML. No limits.
Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue

2007-05-14 Thread Jerome Kerdreux
On Mon, 14 May 2007 22:54:58 +0200
Christoph Zwerschke [EMAIL PROTECTED] wrote:

 Jerome Kerdreux schrieb:
  Hum, I missed to say that firefox see the SID cookie, the issue is that 
  my code doesn't have it, so create a new session cookie at each request. 
  
  In awake(), I checked for  trans.request()._environ['HTTP_COOKIE'] this
  give me some cookie but not the SID one .. 
 
 Yes, Firefox sees the SID cookie, but when the cookie has set the wrong 
 path, Firefox does not send it back to your Webware application. You can 
 view the cookie path in Firefox and compare with the URL path of your 
 application. Do they fit together?


Hum .. I guess you found something. The url is 
http://www.larsen-b.com/Articles/X.html 
but the cookie path is /wk/  ... Do you have a idea to fix this ? 

Thank a lot. 

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss


Re: [Webware-discuss] Session Issue

2007-05-10 Thread Christoph Zwerschke
 After some tweaks in the webware context config, all is working 
 quite fine. (migration was easy :) .. but the session doesn't work
 any more. And even worst I try to do some debuging, and find that
 trans.request()._environ['HTTP_COOKIE'], contains some cookies but
 not the SID one, beside this cookie is present on the browser side. 
 
 Hum, just wordering if I missed something ?? 

Probably, since this is working well for me. ;-)
Some things that you can check:

* Did you create a new working dir with MakeAppWorkDir and merged
   your project there or did you take the old one?
* If you create an empty (default) working dir, does it work?
* Have you set
   UseAutomaticPathSessions = False
   UseCookieSessions = True
* Are you using mod_rewrite?

-- Chris


-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Webware-discuss mailing list
Webware-discuss@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/webware-discuss