[Zope] VirtualHostMonster and "unpack list of wrong size"

Dieter Maurer dieter@handshake.de
Thu, 24 Oct 2002 20:05:05 +0200


Jo Meder writes:
 > Am 23.10.2002, 20:23 Uhr
 > 	schrub Dieter Maurer <dieter@handshake.de>:
 > 
 > >   Some HTTP clients include the port in the "HOST" HTTP header.
 > > 
 > > Use an Apache "RewriteCond" to strip away the port if it is present:
 > > 
 > >     RewriteCond  %{HTTP_HOST}  ([^:]*)(:.*)?
 > >     RewriteRule ..../http/%1:80/...
 > 
 > Looks good, thanks a lot.
 > 
 > So far I've learned that Apaches rewrite-machinery is rather expensive
 > (in CPU cycles) and my small patch to the VirtualHostMonster is
 > comparably cheap. Are there circumstances where throwing away extra port
 > parameters inside the VHM will cause trouble?
I guess the Apache RewriteCond is less expensive than something in Zope,
but both are probably cheap.

In my view, the apache solution is cleaner in that it prevents the construction
of an invalid URL.


Dieter