VirtualHostMonster does not work with IPv6 named hosts

Bug #699865 reported by Łukasz Nowak on 2011-01-07
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zope 2

Bug Description

VirtualHostMonster does not work with IPv6 named hosts.

In case of such rewrite configuration:

RewriteRule (.*)[%{SERVER_ADDR}]:4080$1 [L,P]

When SERVER_ADDR is fd00::74ba VirtualHostMonster dies with:

Traceback (most recent call last):
  File "/eggs/Zope2-2.12.14-py2.6-linux-x86_64.egg/ZPublisher/", line 145, in __call__
    meth(*(container, request, None)[:args])
  File "/eggs/Zope2-2.12.14-py2.6-linux-x86_64.egg/Products/SiteAccess/", line 154, in __call__
    host, port = host.split(':')
ValueError: too many values to unpack

This is because IPv6 addresses contain ":" in them.

Łukasz Nowak (ionowaklukasz) wrote :

I "fixed" this issue by simply extending analysis of given address to being able to survive having semicolons in ip address and assuming that last part of address is a port, but only if it is integer, otherwise it is treat as address.

Hanno Schlichting (hannosch) wrote :

I'd be surprised if this is the only place that cannot deal with IPv6 addresses in Zope2. But we should start adding this new feature at some point...

Changed in zope2:
importance: Undecided → Medium
status: New → Confirmed
Łukasz Nowak (ionowaklukasz) wrote :

I uploaded patch and a test.
All test are passing for bin/test Products.SiteAccess

I am ready for your comments.


Colin Watson (cjwatson) wrote :

The zope2 project on Launchpad has been archived at the request of the Zope developers (see and If this bug is still relevant, please refile it at

Changed in zope2:
status: Confirmed → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers