The java code is still using amqp-0.8 which as Gordon says requires a leading '/'. The java client url parsing requires the '/' for the url to be well formed. The java broker never enforced an initial '/' so when the vhost implementation was done it was done with out the '/'. Which made sense as it is a wasted byte in network traffic. So currently I believe the client code strips off the '/' after verifying the vhost before sending over the wire to save that extra byte.
On 18/04/07, Gordon Sim <[EMAIL PROTECTED]> wrote:
Tomas Restrepo wrote: > I've been doing a bit of testing on the .NET and java clients, and got a bit > confused about the current behavior around virtual host names and connection > urls. > > Basically, my question is this: When sending a connection.open command, does > a virtual host name of "/test" supposed to be interpreted exactly as "test" > (i.e. ignore the leading slash)? That is I think for historical reasons. Previous versions of the spec stated that the virtual host must start with a '/'. That rule has since been relaxed, but I suspect no-one has been confident enough to alter the code in case something unexpected breaks! I agree that we should fix that.
-- Martin Ritchie
