Hello David,
you may be in a special case. There is no obvious reason the port number
is not part of the request object.
You can get a working test case at this address and compare with your
own code =>
http://restlet.tigris.org/nonav/issues/showattachment.cgi/287/Test738.java
best regards,
Thierry Boileau
> Hi Thierry-
>
> When I stepped through the VirtualHost/HostRoute code in the debugger, I
> found that the problem seems to be that the incoming Request object did not
> actually contain the Host port number. This meant that any VirtualHost which
> had a non-null host port pattern would fail the matching/scoring process, and
> therefor would not be called.
>
> In particular, this code, from HostRoute.score():
>
> int basePortValue = request.getHostRef().getHostPort();
> if (basePortValue == -1) {
> basePortValue = request.getHostRef().getSchemeProtocol()
> .getDefaultPort();
> }
> hostPort = Integer.toString(basePortValue);
>
> Would result in the default port for the scheme getting assigned to the
> hostPort value. since my Servers (and virtual hosts) were set to non-default
> port values, this seems like it must be a bug, perhaps in the internal
> Connectors?
>
> Thanks very much for all your help- very much appreciated!
>
> - Dave Fogel
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1234601
>
>
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1237968