Re: [Zope-dev] Apache Mod_rewrite question

2004-07-14 Thread Eugene
Hello Ganesha,
Wednesday, July 14, 2004, 1:40:14 AM, you wrote:

I'm using mod_rewrite with zope but without maps.
Can your describe in details your task?


GS Hi,

GS I came across a strange behavior of mod_rewrite while using with zope.
GS Although it is not a zope question, I was wondering if any of you have
GS run into this. We are using mod_rewrite to redirect the users to one of
GS the zope sites of a Zeo cluster.

GS The directive RewriteMap has unexpected behavior when it is used to
GS define more than one map with same map name in diffrent places. Normally
GS all the directives within a tag applies only to that tag. 

GS For example:

GS VirtualHost *
GS ServerName   www.foo.com
GS DocumentRoot /var/www/foo
GS RewriteEngine on
GS RewriteLog/var/log/httpd/foo.log
GS RewriteLogLevel  2
GS RewriteMap map rnd:/etc/httpd/conf/foomap.txt
GS RewriteRule ^/Foo(.*)
GS http://127.0.0.1${map:IP}/VirtualHostBase/http/foo/$1 [L,P]
GS /VirtualHost

GS VirtualHost *
GS ServerName   www.bar.com
GS DocumentRoot /var/www/bar
GS RewriteEngine on
GS RewriteLog/var/log/httpd/bar.log
GS RewriteLogLevel  2
GS RewriteMap map rnd:/etc/httpd/conf/barmap.txt
GS RewriteRule ^/Bar(.*)
GS http://127.0.0.1${map:IP}/VirtualHostBase/http/bar/$1 [L,P]
GS /VirtualHost

GS The above is expected to work. However ModRewrite, does not read the map
GS file foomap.txt or barmap.txt everytime it needs it and it caches the
GS results after the first time it reads for faster operation.  

GS The problem is the cache treats both the file as the same since they
GS have the same name! Hence if you visit foo.com first, the data stored in
GS foomap.txt is returned from the cache next time you visit foo.com or
GS bar.com. This causes apache to redirect into the wrong zope site.

GS Has anyone else experienced similar problems ? 

GS thanks,
GS ganesh

GS Zeomega LLC
GS Open minds' Open Solutions

GS Plano, Texas, USA
GS Bangalore, India
GS phone: 972-731-6750
GS http://www.zeomega.com

GS ___
GS Zope-Dev maillist  -  [EMAIL PROTECTED]
GS http://mail.zope.org/mailman/listinfo/zope-dev
GS **  No cross posts or HTML encoding!  **
GS (Related lists - 
GS  http://mail.zope.org/mailman/listinfo/zope-announce
GS  http://mail.zope.org/mailman/listinfo/zope )



-- 
Best regards,
 Eugenemailto:[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


Re: [Zope-dev] Streaming large files

2004-07-09 Thread Eugene
Hello Thilo,
Thursday, July 8, 2004, 9:07:18 PM, you wrote:

I don't know how it relates to Zope.
There's FFServer (http://ffmpeg.sf.net) - powerful streaming solution.
Or you may be interested in www.MMManager.org - Multimedia manager for
Zope.


TS hi!
TS I have to stream large mpeg-files over http with range support. this
TS works quite nice until the client seeks in the (media)player and the
TS files aren't to large, because zope caches the whole file...
TS ...so each seek means streaming the whole file from the requested 
TS position till end *g*
- my RESPONSE object doesn't even know, that the player has seeked e.g.
TS back to the beginning...
TS is there a way to bypass the zope caching? and how do I know if the
TS player has disconnected, so I can stop streaming?


TS thanks in advance
TS thilo
TS ___
TS Zope-Dev maillist  -  [EMAIL PROTECTED]
TS http://mail.zope.org/mailman/listinfo/zope-dev
TS **  No cross posts or HTML encoding!  **
TS (Related lists - 
TS  http://mail.zope.org/mailman/listinfo/zope-announce
TS  http://mail.zope.org/mailman/listinfo/zope )



-- 
Best regards,
 Eugenemailto:[EMAIL PROTECTED]

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] Zope 2.7 from cvs and internationalization issues

2003-07-23 Thread Eugene Morozov
Hello!
I've found today that it is simply impossible to use cyrillic
characters in ZMI in the latest zope from cvs. If I don't have
management_page_charset set on root folder and try to enter cyrillic
title for some folder, I get following error:

Error Type: UnicodeError
Error Value: Latin-1 encoding error: ordinal not in range(256)

If I set management_page_charset=koi8-r for the root folder and then
try to set cyrillic title for some folder, I get the following error:

Error Type: UnicodeError
Error Value: UTF-8 decoding error: invalid data

If I set management_page_charset=utf-8 for the root folder and then
try to set cyrillic title for some folder, I get the following error:

Error Type: UnicodeError
Error Value: Latin-1 encoding error: ordinal not in range(256)

Folders with Russian titles that were created in previous version of
Zope show correct title in the ZMI, but it is impossible to change it
because form for changing properties is inaccessible (it also gives
UnicodeError because it tries to encode unicode string, which by the
way contains cyrillic characters encoded in koi8-r, not unicode, in
koi8-r). I was able to investigate last issue because entry in error
log appears and I was able to insert debugging print statments in Zope
code and see that it somehow manages to store koi8-r characters in
unicode object and then tries to assume that it is really unicode
object and apply conversion from unicode to koi8-r. Please, help me, I
don't want to install older version of Zope now. Sorry if my English
is not good enough to correctly describe the problem, but every
non-english speaking subscriber may install zope 2.7 from cvs and see
that it doesn't handle languages with encodings other than latin-1.

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] /usr/local/bin/python in Zope 2.7

2003-07-10 Thread Eugene Morozov
Hello!
Several scripts in Zope 2.7 from cvs has #! /usr/local/bin/python
string at the beginning. When building zope rpm package, rpm thinks
that resulting binary package should depend on
/usr/local/bin/python. So I've made a simple patch which fixes this:
diff -ruN Zope.orig/lib/python/Products/ZGadflyDA/gadfly/gfinstall.py 
Zope/lib/python/Products/ZGadflyDA/gadfly/gfinstall.py
--- Zope.orig/lib/python/Products/ZGadflyDA/gadfly/gfinstall.py 1999-07-28 
20:36:08.0 +0400
+++ Zope/lib/python/Products/ZGadflyDA/gadfly/gfinstall.py  2003-07-10 
16:46:23.0 +0400
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python
+#!/usr/bin/env python
 
 Gadfly installation script.
 
diff -ruN Zope.orig/lib/python/Products/ZGadflyDA/gadfly/kjpylint.py 
Zope/lib/python/Products/ZGadflyDA/gadfly/kjpylint.py
--- Zope.orig/lib/python/Products/ZGadflyDA/gadfly/kjpylint.py  1999-07-28 
20:36:12.0 +0400
+++ Zope/lib/python/Products/ZGadflyDA/gadfly/kjpylint.py   2003-07-10 
16:46:43.0 +0400
@@ -1,4 +1,4 @@
-#!/usr/local/bin/python
+#!/usr/bin/env python
 python lint using kwParsing
 
 The goal of this module/filter is to help find
diff -ruN Zope.orig/lib/python/ZConfig/scripts/zconfig 
Zope/lib/python/ZConfig/scripts/zconfig
--- Zope.orig/lib/python/ZConfig/scripts/zconfig2003-04-30 22:05:08.0 
+0400
+++ Zope/lib/python/ZConfig/scripts/zconfig 2003-07-10 16:47:15.0 +0400
@@ -1,4 +1,4 @@
-#! /usr/local/bin/python
+#! /usr/bin/env python
 ##
 #
 # Copyright (c) 2003 Zope Corporation and Contributors.
diff -ruN Zope.orig/lib/python/ZServer/medusa/http_server.py 
Zope/lib/python/ZServer/medusa/http_server.py
--- Zope.orig/lib/python/ZServer/medusa/http_server.py  2003-03-19 00:15:17.0 
+0300
+++ Zope/lib/python/ZServer/medusa/http_server.py   2003-07-10 16:47:38.0 
+0400
@@ -1,4 +1,4 @@
-#! /usr/local/bin/python
+#! /usr/bin/env python
 # -*- Mode: Python; tab-width: 4 -*-
 #
 #  Author: Sam Rushing [EMAIL PROTECTED]
diff -ruN Zope.orig/lib/python/ZServer/medusa/test/asyn_http_bench.py 
Zope/lib/python/ZServer/medusa/test/asyn_http_bench.py
--- Zope.orig/lib/python/ZServer/medusa/test/asyn_http_bench.py 2003-03-19 
00:16:49.0 +0300
+++ Zope/lib/python/ZServer/medusa/test/asyn_http_bench.py  2003-07-10 
16:48:13.0 +0400
@@ -1,4 +1,4 @@
-#! /usr/local/bin/python1.4
+#! /usr/bin/env python
 # -*- Mode: Python; tab-width: 4 -*-
 
 import asyncore

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )


[Zope-dev] setup.py bug

2003-07-03 Thread Eugene Morozov
Hello!
I've decided to try Zope 2.7 from CVS. I prefer to package everything
installed on my system, so I've built Zope RPM package but it didn't
work with ZEO because setup.py doesn't install ZEO.auth package. 
Here's a fix:
--- Zope/setup.py   2003-06-25 23:30:25.0 +0400
+++ Zope.patched/setup.py   2003-07-03 13:44:33.0 +0400
@@ -655,7 +655,7 @@
 name='ZEO',
 author=AUTHOR,
 
-packages=['ZEO', 'ZEO.tests', 'ZEO.zrpc'],
+packages=['ZEO', 'ZEO.tests', 'ZEO.zrpc', 'ZEO.auth'],
 data_files=[['ZEO', ['ZEO/*.txt', 'ZEO/*.xml']]],
 )
 

___
Zope-Dev maillist  -  [EMAIL PROTECTED]
http://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope )