[Zope] Confused about ZSyncer setup

alan milligan alan_milligan@hotmail.com
Thu, 07 Mar 2002 01:24:27


John/Andy,

Thanks for your comments.

>
>I *think* I recall having problems with ZSyncer and https when I first
>installed it.  From ZSyncer.py (line 377)
>
>def _check_http(self, v):
>        # so people can get away with leaving http:// off :)
>        if v[:7] != 'http://' and v[:8] != 'https://':
>            v = 'http://%s' % v
>        return v
>
>I think I added the and v[:8] != 'https://' part.  Check if you have it.
>

I am using Apache ProxyPass/ProxyPassReverse directives to translate https 
requests into http requests to my firewalled zope server, so don't have any 
issue with this (although I tested it anyway ...).  However, I would have 
thought it sensible to check for the presence of the HTTPS environment 
variable to determine if you were dealing with a http or https request and 
return the appropriately designated URL.  Perhaps that code stub should look 
something like:

def _check_http(self, v):
	server_protocol = 'http'
	if os.environ.has_key('HTTPS'): server_protocol = server_protocol + 's'
	if v[:len(server_protocol) + 1] != server_protocol + ':': v = 
server_protocol + ':' + v
	return v

I do get to my manage screen on my production box with this setup (ie using 
URL https://www.mydomain.com/site/ZSyncer/manage).  However, I ppp dialin 
with a dynamically assigned address from my development machine which makes 
a 'pull from production' infeasible.  I wish to 'push from development', 
much as I run my CVS mirror.

My development Zope has a ZSyncer instance with a destination containing:
	https://www.mydomain.com/site/ZSyncer

My understanding here, is that it IS irrelevant as to the contents of this 
instance on the production box, as it is the definition on the dev box that 
will specify the synchronisation.

When I attempt a sync with this, I get a 'There was a problem with that 
comparison.' error, and a statement that 'None' object has no attribute 
'startswith'.

Something appears to have been expecting a string - but what????

If I can't get this running over the next couple of days, does anyone have 
an opinion on the feasibility of rsync'ing the Data.fs file?

Cheers, Alan


_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com