Subject: [webfinger] feedback for multiple "rel"

From: nov matake <[email-masked]>
Date: Sat, 22 Dec 2012 13:48:37 +0900

Hi,

I have a comment for they way to specify multiple "rel" values.

As a ruby library developer, my main target is rails developers.
Since rails can't handle multiple same query keys, developers will need to hack query params parser in rails middleware layer.
I can easily imagine it'll be an annoying part to support webfinger in rails.

Is the multiple "rel" case can be a space-delimitered (or some other character) strings like multiple redirect_uri in OAuth2?
Or any reason for putting multiple same keys in query parameters?

Cheers,

Nov Matake

---

From: "Paul E. Jones" <[email-masked]>
Date: Sat, 22 Dec 2012 00:18:10 -0500

Nov,

It used to base space-delimited in the -02 draft:
http://tools.ietf.org/html/draft-ietf-appsawg-webfinger-02#section-5.3

We had a debate over this and, as usual, I lost. :-)

Some people expressed concerns that there might be spaces in the URL, so
taking two URLs like this:

http://example.com/this one
http://example.com/that one

And then putting them into the "rel" parameter like this:

http%3A%2F%2Fexample.com%2Fthis%20one%20http%3A%2F%2Fexample.com%2Fthat%20on
e
                               ^^^   ^^^

The ^^^ denotes the problem.

Unescaping and splitting on spaces would give you 4 values.

So, one has to do this:
encodeURIComponent(
   encodeURIComponent ("http://example.com/this one") + " " +
   encodeURIComponent ("http://example.com/that one") )

And put that into the "rel" parameter.

That can get a bit ugly.  I personally preferred the single rel parameter,
though.  I was overruled.

Perhaps you might be more persuasive than I was.

Paul

> -----Original Message-----
> From: [email-masked] [mailto:[email-masked]] On
> Behalf Of nov matake
> Sent: Friday, December 21, 2012 11:49 PM
> To: [email-masked]
> Subject: [webfinger] feedback for multiple "rel"
> 
> Hi,
> 
> Since rails can't handle multiple same query keys, developers will need
> to hack query params parser in rails middleware layer.
> Is the multiple "rel" case can be a space-delimitered (or some other
> character) strings like multiple redirect_uri in OAuth2?
> _______________________________________________
> webfinger mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/webfinger

---

From: nov matake <[email-masked]>
Date: Sat, 22 Dec 2012 14:35:58 +0900

Understood.
I saw the same debate in OAuth2 ML and saw opposite result :p

I, as a ruby library developer, prefer single "rel" because parsing double encoded values in library is easier than modifying developer's application framework.
But at same time, as OpenID Connect library developer, it's probably too late to change webfinger spec ... :(

---

From: "Paul E. Jones" <[email-masked]>
Date: Sat, 22 Dec 2012 00:44:09 -0500

Not if you shout loudly. :)  We could change it back.

I think Brad was the main proponent for this change.

Brad, what is your take?

Paul

> From: nov matake [mailto:[email-masked]]
> Sent: Saturday, December 22, 2012 12:36 AM
> To: Paul E. Jones
> Cc: [email-masked]
> Subject: Re: [webfinger] feedback for multiple "rel"
> 
> Understood.
> I, as a ruby library developer, prefer single "rel" because parsing
> double encoded values in library is easier than modifying developer's
> application framework.
> > Some people expressed concerns that there might be spaces in the URL,
> > so taking two URLs like this:
> >
> > That can get a bit ugly.  I personally preferred the single rel
> > parameter, though.  I was overruled.
> >
> >> From: [email-masked] [mailto:[email-masked]]
> >> On Behalf Of nov matake
> >> Since rails can't handle multiple same query keys, developers will
> >> need to hack query params parser in rails middleware layer.

---

From: Melvin Carvalho <[email-masked]>
Date: Sat, 22 Dec 2012 16:44:39 +0100

On 22 December 2012 05:48, nov matake <[email-masked]> wrote:

> Since rails can't handle multiple same query keys, developers will need to
> hack query params parser in rails middleware layer.

each time you delimit a list, you have to be able to escape the delimiter,
which can be a pain and also leads to problems with things like canonical
urls and search engines

can you use mod_rewrite?

---

From: nov matake <[email-masked]>
Date: Sun, 23 Dec 2012 01:02:13 +0900

I understand double encoding issue.
Same discussion was in OAuth/OpenID Connect ML.
However, for library developer, handling double encoding value is easier than handling duplicated query keys, at least in rails case.

Of course, developers who use my ruby library can use mod_rewrite.
But I don't want to provide/use a library which requires specific rewrite rule :(

On 2012/12/23, at 0:44, Melvin Carvalho <[email-masked]> wrote:

> each time you delimit a list, you have to be able to escape the delimiter, which can be a pain and also leads to problems with things like canonical urls and search engines
> 
> can you use mod_rewrite?
>  
> 
> Cheers,
> 
> Nov Matake

---

From: nov matake <[email-masked]>
Date: Sun, 23 Dec 2012 01:12:13 +0900

BTW, why double encoding lead "problems with things like canonical urls and search engines"?
Can you provide more details?

If 2 rel included, the response would be different than when only 1 rel given.
So I feel those 2 are not the same, and can be indexed as 2 resources..

---

From: Melvin Carvalho <[email-masked]>
Date: Sat, 22 Dec 2012 17:39:41 +0100

> Can you provide more details?

Not easily, no.  You could perhaps ignore that comment.

However I've had situations where I've had to escape delimiters to create a
URL in the past.  It leads to the question of whether the escaped character
should be part of the canonical url.  Maybe it was just me, but I found it
a bit fiddly...

---

From: "Paul E. Jones" <[email-masked]>
Date: Sat, 22 Dec 2012 19:00:20 -0500

If we made it a requirement that "rel" values have no spaces (which I would
argue is a damn good thing for many reasons) then we would not have to
double-encode.

Paul

From: [email-masked] [mailto:[email-masked]] On
Behalf Of nov matake
Sent: Saturday, December 22, 2012 11:12 AM
To: Melvin Carvalho
Cc: [email-masked]
Subject: Re: [webfinger] feedback for multiple "rel"

BTW, why double encoding lead "problems with things like canonical urls and
search engines"?

If 2 rel included, the response would be different than when only 1 rel
given.

 

Hi,

As a ruby library developer, my main target is rails developers.
Since rails can't handle multiple same query keys, developers will need to
hack query params parser in rails middleware layer.
I can easily imagine it'll be an annoying part to support webfinger in
rails.

can you use mod_rewrite?

Cheers,

Nov Matake

---

From: James M Snell <[email-masked]>
Date: Sat, 22 Dec 2012 16:51:04 -0800

Spaces in rel values are already illegal.. specifically, spaces are
disallowed in registered link relations and non-escaped spaces are
disallowed in absolute IRI's.. A comma delimited list of rel's is better
than multiple individual parameters.. even with the potential need for
double encoding.

On Sat, Dec 22, 2012 at 4:00 PM, Paul E. Jones <[email-masked]>wrote:

> If we made it a requirement that “rel” values have no spaces (which I
> would argue is a damn good thing for many reasons) then we would not have
> to double-encode.****
>
> ** **
>
> Paul****
>
> ** **
>
> *From:* [email-masked] [mailto:[email-masked]] *On
> Behalf Of *nov matake
> *Sent:* Saturday, December 22, 2012 11:12 AM
> *To:* Melvin Carvalho
>
> *Cc:* [email-masked]
> *Subject:* Re: [webfinger] feedback for multiple "rel"****
>
> ** **
>
> BTW, why double encoding lead "problems with things like canonical urls
> and search engines"?****
>
> Can you provide more details?****
>
> ** **
>
> given.****
> So I feel those 2 are not the same, and can be indexed as 2 resources..***
> *
>
> ** **
>
> On 2012/12/23, at 0:44, Melvin Carvalho <[email-masked]> wrote:*
> ***
>
>
>
> ****
>
> ** **
>
> On 22 December 2012 05:48, nov matake <[email-masked]> wrote:****
>
> Hi,
>
> Or any reason for putting multiple same keys in query parameters?****
>
>
>  ****
> https://www.ietf.org/mailman/listinfo/webfinger****
>
> ** **
>
> ** **
>

---

From: "Paul E. Jones" <[email-masked]>
Date: Sat, 22 Dec 2012 20:30:28 -0500

That depends on where they’re used.  If I tell you the “rel” value is “http://example.com/first one”, I don’t escape that as I write it.  Or are you saying there is text somewhere that already makes that, as written, illegal?

I’m quite favorable to a space-separated list of rel values in a single rel parameter, too.  I was concerned before that spaces would present an issue, but figured we could either we make spaces illegal in rel values (which we can do since those are fabricated things!) or we double-escape.  My preference is a single escape and a single rel parameter and spaces are illegal in the “rel” values themselves.

But, the forces that be pushed pretty hard to change from &rel=token1%20token to &rel=token1&rel=token2.  At the end of the day, it makes no difference to me since I just need to know which way to deal with it.

So Ruby can really only support only a single parameter with a given name?  It will not collect those into an array or anything?

Paul

From: James M Snell [mailto:[email-masked]] 
Sent: Saturday, December 22, 2012 7:51 PM
To: Paul E. Jones
Cc: nov matake; Melvin Carvalho; [email-masked]
Subject: Re: [webfinger] feedback for multiple "rel"

Spaces in rel values are already illegal.. specifically, spaces are disallowed in registered link relations and non-escaped spaces are disallowed in absolute IRI's.. A comma delimited list of rel's is better than multiple individual parameters.. even with the potential need for double encoding.

On Sat, Dec 22, 2012 at 4:00 PM, Paul E. Jones <[email-masked]> wrote:

If we made it a requirement that “rel” values have no spaces (which I would argue is a damn good thing for many reasons) then we would not have to double-encode.

Paul

From: [email-masked] [mailto:[email-masked]] On Behalf Of nov matake
Sent: Saturday, December 22, 2012 11:12 AM
To: Melvin Carvalho

Cc: [email-masked]

 

Hi,

can you use mod_rewrite?

Cheers,

Nov Matake

---

From: Dick Hardt <[email-masked]>
Date: Sat, 22 Dec 2012 17:39:49 -0800

FYI: multiple query string params with the same name are turned into arrays or parsed into arrays in node.js

the following script:

var querystring = require('querystring')
console.log( querystring.parse( 'foo=bar&rel=token1&rel=token2' ) )
console.log( querystring.stringify( {'foo':'bar','rel':['token1','token2']} ) )

outputs:

{ foo: 'bar', rel: [ 'token1', 'token2' ] }
foo=bar&rel=token1&rel=token2

Perhaps Ruby devs should just move to the next cool language? :-)
Seriously though, what does the query string parser do in Ruby?

-- Dick

---

From: James M Snell <[email-masked]>
Date: Sat, 22 Dec 2012 17:42:46 -0800

On Sat, Dec 22, 2012 at 5:30 PM, Paul E. Jones <[email-masked]>wrote:

> That depends on where they’re used.  If I tell you the “rel” value is “
> http://example.com/first one”, I don’t escape that as I write it.  Or are
> you saying there is text somewhere that already makes that, as written,
> illegal?****
>
> **
>

Yes. RFC 3987. That is, so long as the character separating the "first" and
the "one" is an ASCII Space (0x20). IRI's allow for a range of space-like
characters, such as a nonbreaking space (0xA0) but strongly recommends that
those be pct-encoded. Whitespace of any type is explicitly disallowed in
URI's.

> **
>
> I’m quite favorable to a space-separated list of rel values in a single
> rel parameter, too.  I was concerned before that spaces would present an
> issue, but figured we could either we make spaces illegal in rel values
> (which we can do since those are fabricated things!) or we double-escape.
> My preference is a single escape and a single rel parameter and spaces are
> illegal in the “rel” values themselves.
>

Double-escaping is really a separate issue, as there may be lots of reasons
why escaping is used, not just whitespace. Best to just treat that as a
separate issue. Just say that the link rels are a list of 0x20 separated
values and that the 0x20 must be pct-encoded, and go with that.. e.g.

http://example.org/.well-known/webfinger?resource=acct:foo&rel=abc%20def%20http://example.org/foo

Would be rel=["abc","def","http://example.org/foo"]

All done.

- James

> ****
>
> ** **
>
> But, the forces that be pushed pretty hard to change from
> &rel=token1%20token to &rel=token1&rel=token2.  At the end of the day, it
> makes no difference to me since I just need to know which way to deal with
> it.****
>
> ** **
>
> So Ruby can really only support only a single parameter with a given
> name?  It will not collect those into an array or anything?****
>
> ** **
>
> Paul****
>
> ** **
>
> *From:* James M Snell [mailto:[email-masked]]
> *Sent:* Saturday, December 22, 2012 7:51 PM
> *To:* Paul E. Jones
> *Cc:* nov matake; Melvin Carvalho; [email-masked]
>
> double encoding.****
> On Sat, Dec 22, 2012 at 4:00 PM, Paul E. Jones <[email-masked]>
> wrote:****
>
> *To:* Melvin Carvalho****
>
>
> *Cc:* [email-masked]

---

From: "Paul E. Jones" <[email-masked]>
Date: Sat, 22 Dec 2012 21:13:59 -0500

Dick, Nov,

I've never written a Ruby program before, but I was quite curious as to
whether it was or was not possible to access multiple "rel" parameters.  It
appears that is.  Here's my first Ruby program (and my apologies to the
developers of Ruby):

#!/bin/ruby

require 'cgi'

cgi = CGI.new

params = cgi.params

# Following appears to show an associative array with values that are arrays

puts params;

# Grab the 'rel' array

rels = params['rel'];

# Display the array

puts rels;

# How many items are in the "rel" array?

count = rels.size

print "Number of rel params: ", count, "\n";

# Can I access each one?

for i in 0..(count-1)

   print "Item ", i, ": ", rels[i], "\n"

end

Here's what I get:

$ ./test "rel=rel1&c=d&rel=rel2&e=f"

{"rel"=>["rel1", "rel2"], "c"=>["d"], "e"=>["f"]}

rel1

rel2

Number of rel params: 2

Item 0: rel1

Item 1: rel2

So, it looks like it works to me.  Is the issue only with Rails?  I'm not
going to venture down that path to see what the issue is, but if Ruby can
access the data, can't it provide it to Rails in a form that it likes?

Paul

From: Dick Hardt [mailto:[email-masked]] 
Sent: Saturday, December 22, 2012 8:40 PM
To: Paul E. Jones
Cc: 'James M Snell'; [email-masked]; 'nov matake'; 'Melvin Carvalho'
Subject: Re: [webfinger] feedback for multiple "rel"

FYI: multiple query string params with the same name are turned into arrays
or parsed into arrays in node.js

the following script:

console.log( querystring.stringify( {'foo':'bar','rel':['token1','token2']}
) )

outputs:

-- Dick

That depends on where they're used.  If I tell you the "rel" value is "
<http://example.com/first> http://example.com/first one", I don't escape
that as I write it.  Or are you saying there is text somewhere that already
makes that, as written, illegal?

I'm quite favorable to a space-separated list of rel values in a single rel
parameter, too.  I was concerned before that spaces would present an issue,
but figured we could either we make spaces illegal in rel values (which we
can do since those are fabricated things!) or we double-escape.  My
preference is a single escape and a single rel parameter and spaces are
illegal in the "rel" values themselves.

it.

So Ruby can really only support only a single parameter with a given name?
It will not collect those into an array or anything?

Paul

 

On Sat, Dec 22, 2012 at 4:00 PM, Paul E. Jones <
<mailto:[email-masked]> [email-masked]> wrote:

Paul

From:  <mailto:[email-masked]> [email-masked]
[mailto: <mailto:[email-masked]> [email-masked]] On
Behalf Of nov matake
Sent: Saturday, December 22, 2012 11:12 AM
To: Melvin Carvalho

Cc:  <mailto:[email-masked]> [email-masked]
Subject: Re: [webfinger] feedback for multiple "rel"

On 2012/12/23, at 0:44, Melvin Carvalho < <mailto:[email-masked]>
[email-masked]> wrote:

On 22 December 2012 05:48, nov matake < <mailto:[email-masked]>
[email-masked]> wrote:

Hi,

can you use mod_rewrite?

Cheers,

Nov Matake
_______________________________________________
webfinger mailing list
 <mailto:[email-masked]> [email-masked]
 <https://www.ietf.org/mailman/listinfo/webfinger>
https://www.ietf.org/mailman/listinfo/webfinger

_______________________________________________
webfinger mailing list
 <mailto:[email-masked]> [email-masked]
 <https://www.ietf.org/mailman/listinfo/webfinger>
https://www.ietf.org/mailman/listinfo/webfinger

---

From: "Paul E. Jones" <[email-masked]>
Date: Sat, 22 Dec 2012 21:32:36 -0500

Indeed… RFC 3986 also shows that spaces must be percent-encoded before they are considered a valid URI.

Anyway, I’m open to going either way.  The -02 draft said described a single “rel” parameters as “space-separated list of link relations”.  Of course, that would be escaped before being put into a GET… that goes without saying, really.

Which way do folks want it?  I recall arguing to keep it this way before, but I was successfully pushed to change it.

We might have to wait a bit for folks to reply given this is the weekend and a holiday weekend, at that.

Paul

From: James M Snell [mailto:[email-masked]] 
Sent: Saturday, December 22, 2012 8:43 PM
To: Paul E. Jones
Cc: nov matake; Melvin Carvalho; [email-masked]
Subject: Re: [webfinger] feedback for multiple "rel"

On Sat, Dec 22, 2012 at 5:30 PM, Paul E. Jones <[email-masked]> wrote:

 

Yes. RFC 3987. That is, so long as the character separating the "first" and the "one" is an ASCII Space (0x20). IRI's allow for a range of space-like characters, such as a nonbreaking space (0xA0) but strongly recommends that those be pct-encoded. Whitespace of any type is explicitly disallowed in URI's.

Double-escaping is really a separate issue, as there may be lots of reasons why escaping is used, not just whitespace. Best to just treat that as a separate issue. Just say that the link rels are a list of 0x20 separated values and that the 0x20 must be pct-encoded, and go with that.. e.g. 

  http://example.org/.well-known/webfinger?resource=acct:foo <http://example.org/.well-known/webfinger?resource=acct:foo&rel=abc%20def%20http://example.org/foo> &rel=abc%20def%20http://example.org/foo

All done.

- James

Paul

 

Paul

Cc: [email-masked]

 

Hi,

can you use mod_rewrite?

Cheers,

Nov Matake

---

From: Joseph Holsten <[email-masked]>
Date: Sat, 22 Dec 2012 19:32:52 -0800

On Dec 22, 2012, at 17:30, "Paul E. Jones" <[email-masked]> wrote:

> That depends on where they’re used.  If I tell you the “rel” value is “http://example.com/first one”, I don’t escape that as I write it. 

That is an IRI, which must be converted to a URI before it can be a valid rel. Yay encoding canonicalization, another one of the bottomless pits of standardization! 

--
http://josephholsten.com

---

From: nov matake <[email-masked]>
Date: Sun, 23 Dec 2012 13:15:59 +0900

CGI library handle it well.
It returns query values as array even when it's a single value though.

So the issue is Rails (actually it uses Rack::Utils.parse_nested_query) only.
It takes only the last "rel" value.

> require 'rack'
> Rack::Utils.parse_nested_query "rel=a&rel=b"
=> {"rel"=>"b"} 

On 2012/12/23, at 11:13, "Paul E. Jones" <[email-masked]> wrote:

> Dick, Nov,
>  
> I’ve never written a Ruby program before, but I was quite curious as to whether it was or was not possible to access multiple “rel” parameters.  It appears that is.  Here’s my first Ruby program (and my apologies to the developers of Ruby):
>  
> #!/bin/ruby
>  
> require 'cgi'
>  
> cgi = CGI.new
>  
> params = cgi.params
>  
> Here’s what I get:
> So, it looks like it works to me.  Is the issue only with Rails?  I’m not going to venture down that path to see what the issue is, but if Ruby can access the data, can’t it provide it to Rails in a form that it likes?
>  
> Paul
>

---

From: "Paul E. Jones" <[email-masked]>
Date: Sat, 22 Dec 2012 23:25:36 -0500

Nov,

Do you absolutely need to use that particular function?  It appears that it
returns an associative array where the values are not array (unlike the
"cgi" code).  So, if using it is required, this will certainly present a
challenge.

I would assume WF is not the first thing to use multiple parameters with the
same name.  This has not been encountered before?

Paul

From: nov matake [mailto:[email-masked]] 
Sent: Saturday, December 22, 2012 11:16 PM
To: Paul E. Jones
Cc: 'Dick Hardt'; 'James M Snell'; [email-masked]; 'Melvin Carvalho'
Subject: Re: [webfinger] feedback for multiple "rel"

So the issue is Rails (actually it uses Rack::Utils.parse_nested_query)
only.

=> {"rel"=>"b"} 

Dick, Nov,

#!/bin/ruby

require 'cgi'

cgi = CGI.new

params = cgi.params

puts params;

# Grab the 'rel' array

rels = params['rel'];

# Display the array

puts rels;

count = rels.size

# Can I access each one?

for i in 0..(count-1)

end

Here's what I get:

rel1

rel2

Number of rel params: 2

Item 0: rel1

Item 1: rel2

Paul

the following script:

outputs:

-- Dick

On Dec 22, 2012, at 5:30 PM, "Paul E. Jones" <
<mailto:[email-masked]> [email-masked]> wrote:

Paul

From: James M Snell [mailto:jasnell@ <http://gmail.com> gmail.com] 
Sent: Saturday, December 22, 2012 7:51 PM
To: Paul E. Jones
Cc: nov matake; Melvin Carvalho;  <mailto:[email-masked]>
[email-masked]
Subject: Re: [webfinger] feedback for multiple "rel"

 

Paul

 

Hi,

can you use mod_rewrite?

Cheers,

Nov Matake

---

From: nov matake <[email-masked]>
Date: Sun, 23 Dec 2012 13:34:54 +0900

Developers who uses my library in their rails project would use that function.
I can't stop them.

Of course, I can ask developers to give raw request object (which includes raw requested url, cookies etc) to my library.
But developers will feel weird to give raw request object only for multiple rel case, I think.

====
# put raw request object
WebFinger.discover @request

# put resource & rel only (I prefer this one)
WebFinger.discover params[:resource], params[:rel]
====

On 2012/12/23, at 13:25, Paul E. Jones <[email-masked]> wrote:

> Nov,
>  
> Do you absolutely need to use that particular function?  It appears that it returns an associative array where the values are not array (unlike the “cgi” code).  So, if using it is required, this will certainly present a challenge.
>  
> I would assume WF is not the first thing to use multiple parameters with the same name.  This has not been encountered before?
>  
> Paul
>

---

From: Mike Jones <[email-masked]>
Date: Mon, 24 Dec 2012 00:58:36 +0000

A few thoughts after reading this thread.  First, while space-separating values worked for OAuth scopes (because scope values were a new thing and we could just prohibit them from containing spaces) it wouldn't work as well for "rel" values, since URIs are not a new thing and we can't prohibit them from containing spaces (when represented as %20).  So I believe that the change to use multiple "rel" parameter instead was a good one, and one well supported by the reasoning in the earlier thread on this topic.

To Nov's particular issue, a few thoughts come to mind.  First "rel" is an optimization.  It's legal for a server to ignore all "rel" values and just return everything.  That would be a very simple, if inelegant, solution to the Rails issue you're facing, Nov.

Second, if the work you're doing is scoped to just supporting OpenID Connect discovery, you will never have to support multiple "rel" values.  You'll only be receiving requests without "rel" or with a single "rel" parameter of the form rel=http%3A%2F%2Fopenid.net%2Fspecs%2Fconnect%2F1.0%2Fissuer.  If you're never going to receive multiple "rel" parameters, you can ignore the Rails issue.  Again - inelegant, but practically workable.

                                                            Cheers,
                                                            -- Mike

From: [email-masked] [mailto:[email-masked]] On Behalf Of nov matake
Sent: Saturday, December 22, 2012 8:35 PM
To: Paul E.Jones
Cc: [email-masked]; 'James M Snell'; 'Melvin Carvalho'; 'Dick Hardt'
Subject: Re: [webfinger] feedback for multiple "rel"

====
# put raw request object

On 2012/12/23, at 13:25, Paul E. Jones <[email-masked]<mailto:[email-masked]>> wrote:

Nov,

Do you absolutely need to use that particular function?  It appears that it returns an associative array where the values are not array (unlike the "cgi" code).  So, if using it is required, this will certainly present a challenge.

Paul

From: nov matake [mailto:[email-masked]<http://gmail.com>]
Sent: Saturday, December 22, 2012 11:16 PM
To: Paul E. Jones
Cc: 'Dick Hardt'; 'James M Snell'; [email-masked]<mailto:[email-masked]>; 'Melvin Carvalho'
Subject: Re: [webfinger] feedback for multiple "rel"

=> {"rel"=>"b"}

On 2012/12/23, at 11:13, "Paul E. Jones" <[email-masked]<mailto:[email-masked]>> wrote:

Dick, Nov,

I've never written a Ruby program before, but I was quite curious as to whether it was or was not possible to access multiple "rel" parameters.  It appears that is.  Here's my first Ruby program (and my apologies to the developers of Ruby):

#!/bin/ruby

require 'cgi'

cgi = CGI.new

params = cgi.params

# Grab the 'rel' array
rels = params['rel'];

# Display the array
puts rels;

# Can I access each one?
for i in 0..(count-1)

Here's what I get:

So, it looks like it works to me.  Is the issue only with Rails?  I'm not going to venture down that path to see what the issue is, but if Ruby can access the data, can't it provide it to Rails in a form that it likes?

Paul

From: Dick Hardt [mailto:[email-masked]<http://gmail.com>]
Sent: Saturday, December 22, 2012 8:40 PM
To: Paul E. Jones
Cc: 'James M Snell'; [email-masked]<mailto:[email-masked]>; 'nov matake'; 'Melvin Carvalho'
Subject: Re: [webfinger] feedback for multiple "rel"

the following script:

outputs:

-- Dick

On Dec 22, 2012, at 5:30 PM, "Paul E. Jones" <[email-masked]<mailto:[email-masked]>> wrote:

That depends on where they're used.  If I tell you the "rel" value is "http://example.com/first one", I don't escape that as I write it.  Or are you saying there is text somewhere that already makes that, as written, illegal?

I'm quite favorable to a space-separated list of rel values in a single rel parameter, too.  I was concerned before that spaces would present an issue, but figured we could either we make spaces illegal in rel values (which we can do since those are fabricated things!) or we double-escape.  My preference is a single escape and a single rel parameter and spaces are illegal in the "rel" values themselves.

Paul

From: James M Snell [mailto:[email-masked]<http://gmail.com>]
Sent: Saturday, December 22, 2012 7:51 PM
To: Paul E. Jones
Cc: nov matake; Melvin Carvalho; [email-masked]<mailto:[email-masked]>
Subject: Re: [webfinger] feedback for multiple "rel"

On Sat, Dec 22, 2012 at 4:00 PM, Paul E. Jones <[email-masked]<mailto:[email-masked]>> wrote:
If we made it a requirement that "rel" values have no spaces (which I would argue is a damn good thing for many reasons) then we would not have to double-encode.

Paul

From: [email-masked]<mailto:[email-masked]> [mailto:[email-masked]<mailto:[email-masked]>] On Behalf Of nov matake
Sent: Saturday, December 22, 2012 11:12 AM
To: Melvin Carvalho

Cc: [email-masked]<mailto:[email-masked]>
Subject: Re: [webfinger] feedback for multiple "rel"

On 2012/12/23, at 0:44, Melvin Carvalho <[email-masked]<mailto:[email-masked]>> wrote:

On 22 December 2012 05:48, nov matake <[email-masked]<mailto:[email-masked]>> wrote:
Hi,

can you use mod_rewrite?

Cheers,

Nov Matake
_______________________________________________
webfinger mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/webfinger

_______________________________________________
webfinger mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/webfinger

_______________________________________________
webfinger mailing list
[email-masked]<mailto:[email-masked]>
https://www.ietf.org/mailman/listinfo/webfinger