For consistency with HTML URLs, I prefer ; to ,
http://www.w3.org/TR/1999/REC-html401-19991224/appendix/notes.html#h-B.2.2
[quote]
B.2.2 Ampersands in URI attribute values
The URI that is constructed when a form is submitted
<http://www.w3.org/TR/1999/REC-html401-19991224/interact/forms.html#submit-format>
may be used as an anchor-style link (e.g., the href
<http://www.w3.org/TR/1999/REC-html401-19991224/struct/links.html#adef-href>
attribute for the A
<http://www.w3.org/TR/1999/REC-html401-19991224/struct/links.html#edef-A>
element). Unfortunately, the use of the "&" character to separate form
fields interacts with its use in SGML attribute values to delimit
character entity references
<http://www.w3.org/TR/1999/REC-html401-19991224/intro/sgmltut.html#character-entities>.
For example, to use the URI "http://host/?x=1&y=2" as a linking URI, it
must be written <A href="http://host/?x=1&y=2"> or <A
href="http://host/?x=1&y=2">.
We recommend that HTTP server implementors, and in particular, CGI
implementors support the use of ";" in place of "&" to save authors the
trouble of escaping "&" characters in this manner.[/quote]
Jonathan
Alan Conway wrote:
Thanks for the feedback, here's an updated proposal that takes on the
suggestions so far:
Aidan + Martin: using user:pass@ syntax.
Martin: updated the examples
Jonathan: added note on percent-encoding.
Other changes:
updated my references to the current URI spec
http://tools.ietf.org/html/rfc3986
Went back to using "," rather than ";" separators for multiple
addresses since rfc3986 does include "," as a reserved separator
character.
Any further comments before I send this to the AMQP working group?
Nice.
I assume URL encoding is used for spaces and such?
http://en.wikipedia.org/wiki/Query_string#URL_encoding
Jonathan
Martin Ritchie wrote:
2009/2/9 Aidan Skinner <[email protected]>:
On Thu, Feb 5, 2009 at 9:53 PM, Alan Conway <[email protected]>
wrote:
I really like the proposal, and I think having a standardised AMQP url
is a big win.
** Differences from Qpid Java format
Addresses are at the start of the URL rather than in the "brokerlist"
option.
Option format is ?foo=bar&x=y rather than ?foo='bar'&x='y'. The
use of
' quotes is not common for URI query strings. See
http://en.wikipedia.org/wiki/Query_string
I hate that the java urls have both of those and am so glad to see
them going.
user, pass and clientid are options rather than having a special
place at
the front of the URL.
clientid is a Qpid proprietary property and user/pass are not
relevant in
all authentication schemes.
I think we should probably use username:passw...@host syntax for this,
it's more inline with what other URL formats such as http and ftp. It
also has the advantage of being more obvious that you're including
authentication information so less prone to accidently leaking it when
cut and pasting urls. If they're not relevant in the negotiated authen
scheme then they can be dropped. I think it's useful to have the
ability to include them, though I would tend to discourage their usage
from a security PoV.
Putting clientid as a property makes sense.
- Aidan
--
Apache Qpid - World Domination through Advanced Message Queueing
http://qpid.apache.org
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
Alan,
It is good that we are evolving the format to better adhere to
established standards and putting it forward to the AMQP-WG to become
the standard format. I don't think we should implement in the current
form until it is adopted by the AMQP-WG othewise we may have yet
another URL format to support.
One approach would be to use replace amqp:// with qpid:// if we want
to press ahead before ratification.
If I'm understanding correctly the examples should be formatted with
the amqp:// as follows. Though agree with Aidan that we should use a
'user:p...@host' format such as:
amqp://tcp:foo:b...@host1:1234/vhost?clientid=baz
* Examples
# Connect to vhost "/" and via default AMQP port on host1. TCP is the
default protoocl.
amqp://host1
# Connect to port 1234, virtual host "vhost" passing username,
password and a JMS client-id
# Connect to the first of host1,host2,host3 that succeeds, retry
each twice.
# retry property at connection level is applied to all addresses.
amqp://host1;host2;host3/?retry=2
# Connect to the first hosts that succeeds, retry host2 twice.
amqp://host1;host2?retry=2;host3
Regards
Martin
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
------------------------------------------------------------------------
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:[email protected]