Bob Van Zant | 7 Oct 18:07 2011

URI scheme best practices

Hello everyone,
I've been reading through RFC 4395 and some of the mailing list
archives. We're working on iOS and Android apps that we'd like to have
be able to respond to URIs in the mail applications of each of those
devices. For example, if we generate a password reset email and send
it to the user and they click on that link in their mail application
we'd like that to fire up our app instead of the web browser.

I recognize that this is a fairly standard thing to do and in reading
through what must be a somewhat memorable thread (fb: URIs?
http://lists.w3.org/Archives/Public/uri/2010Feb/0013.html) I see that
this has been beaten around a bit.

Based on the fb: URIs thread I get the feeling that people wish we
could register with iOS and Android to have our app handle URIs of the
form http://www.eventbrite.com/resetpassword. I'm pretty sure that
this is not possible?

Given that we don't think we can use http and given RFC 4395 we're
planning to use a scheme com-eventbrite-attendee: and generate URIs
like com-eventbrite-attendee:resetpassword?parameters&go&here

Is this the current best practice? Is the intent of 4395 that we
attempt registration of the scheme com-eventbrite-attendee:? I'm happy
to go through the process described in section 5 of 4395 but the
extremely tiny URI scheme registration list almost makes me think that
IANA doesn't want us in there.

Thanks,

(Continue reading)

Mykyta Yevstifeyev | 8 Oct 16:03 2011
Picon

Re: URI scheme best practices

Hi Bob,

The IRI working group of IETF is now working on 4395bis, an the WG is 
considering the questions whether to leave or not the provisions you 
were guided by.  That was me who raised that issue, and my justification 
is that there was no evidence of any attempts to register the scheme 
like you're proposing.  So, I'd like you didn't consider such provisions 
as current practices, since there has been no practice at all with this 
respect.

Thanks,
Mykyta Yevstifeyev

07.10.2011 19:07, Bob Van Zant wrote:
> Hello everyone,
> I've been reading through RFC 4395 and some of the mailing list
> archives. We're working on iOS and Android apps that we'd like to have
> be able to respond to URIs in the mail applications of each of those
> devices. For example, if we generate a password reset email and send
> it to the user and they click on that link in their mail application
> we'd like that to fire up our app instead of the web browser.
>
> I recognize that this is a fairly standard thing to do and in reading
> through what must be a somewhat memorable thread (fb: URIs?
> http://lists.w3.org/Archives/Public/uri/2010Feb/0013.html) I see that
> this has been beaten around a bit.
>
> Based on the fb: URIs thread I get the feeling that people wish we
> could register with iOS and Android to have our app handle URIs of the
> form http://www.eventbrite.com/resetpassword. I'm pretty sure that
(Continue reading)

"Martin J. Dürst" | 10 Oct 05:28 2011
Picon

Re: URI scheme best practices

Hello Bob,

Mykyta is correct that the IRI WG is now working on an update for 4395. 
I'm copying that mailing list and suggest that we move discussion there.

Registering company/application/operation-specific URIs is definitely 
not current practice, but using them is quite a bit in practice on 
mobile Apple systems.

One thing I think you can do is to submit a registration and see how it 
goes. If we have lots of such registration requests, that may finally 
get Apple to rethink things and find a better way to start applications.

Of course, I hope you also complain loudly to Apple. On this issue, they 
definitely deserve it.

Regards,    Martin.

On 2011/10/08 23:03, Mykyta Yevstifeyev wrote:
> Hi Bob,
>
> The IRI working group of IETF is now working on 4395bis, an the WG is
> considering the questions whether to leave or not the provisions you
> were guided by. That was me who raised that issue, and my justification
> is that there was no evidence of any attempts to register the scheme
> like you're proposing. So, I'd like you didn't consider such provisions
> as current practices, since there has been no practice at all with this
> respect.
>
> Thanks,
(Continue reading)

Murray S. Kucherawy | 25 Oct 11:46 2011

Another idea for URI templates

Hi all,

 

I don’t have the URI template draft handy unfortunately (on a long flight), so I can’t confirm this, but I think I found something useful that I don’t believe the template draft currently handles.


If you have a template that includes “/{foo}”, then the “/” is always inserted into the template regardless of whether or not “foo” is actually defined.  It might be nice to have the “/” be there only if “foo” is set.  Maybe something like “{?foo/}”, which means:

 

-          If “foo” is not set, append the empty string.

-          If “foo” is set but empty, append “/” and the name “foo” only.

-          If “foo” is set to a string, append “/”, then the name, then “=”, then the value.

-          If “foo” is set to a list, append “/”, then the name, then “=”, then the list elements separated by “,”.

-          If “foo” is set to a key-value set, append “/”, then the first key, then “=”, then the first value; for all remaining key-value pairs, append “&”, the next key, then “=”, then its matching value. (The name is not actually inserted into the template.)

 

So then a template of http://example.com/query.php{?foo?} expands thus:

 

-          “foo” undefined: http://example.com/query.php

-          “foo” defined, but empty: http://example.com/query.php?foo

-          “foo” defined to string “bar”: http://example.com/query.php?foo=bar

-          “foo” defined to list “a,b,c”: http://example.com/query.php?foo=a,b,c

-          “foo” defined to key-value set “{a, 1}, {b, 2}, {c, 3}”: http://example.com/query.php?a=1&b=2&c=3

 

Am I wrong, and the URI template spec handles this?  Or does this warrant some consideration and development?

Thanks,

-MSK

 

Kev Burns | 25 Oct 16:10 2011
Picon

Re: Another idea for URI templates

Pretty sure the path segment and query expansions do this already. However, the -07 spec is missing examples of empty or undefined inputs for these expansions.

- Kev

On Oct 25, 2011 2:50 AM, "Murray S. Kucherawy" <msk <at> cloudmark.com> wrote:
Murray S. Kucherawy | 25 Oct 16:56 2011

TTLs for templates

What general guidance is there on how often one should query for a template from a well-known URI, in case it changes?  A long-running client might have trouble if the server wants a new template for some reason, and the client doesn’t know it should get a new one.

 

-MSK

Mark Nottingham | 26 Oct 00:53 2011
Picon

Re: TTLs for templates

If I were doing this, I'd rely on the cacheability of the response to the well-known URI; the server is
effectively making a guarantee that the template is good for that period of time.

When defining a well-known URI, you might want to consider defining a "default" freshness lifetime as a
heuristic -- i.e., one that only takes effect if the server doesn't set explicit freshness.

Cheers,

On 26/10/2011, at 1:56 AM, Murray S. Kucherawy wrote:

> What general guidance is there on how often one should query for a template from a well-known URI, in case it
changes?  A long-running client might have trouble if the server wants a new template for some reason, and
the client doesn’t know it should get a new one.
>  
> -MSK

--
Mark Nottingham   http://www.mnot.net/

Roy T. Fielding | 26 Oct 02:41 2011

Re: Another idea for URI templates

On Oct 25, 2011, at 2:46 AM, Murray S. Kucherawy wrote:

> I don’t have the URI template draft handy unfortunately (on a long flight), so I can’t confirm this,
but I think I found something useful that I don’t believe the template draft currently handles.
> 
> If you have a template that includes “/{foo}”, then the “/” is always inserted into the template
regardless of whether or not “foo” is actually defined.  It might be nice to have the “/” be there
only if “foo” is set.

That is exactly what is defined for {/foo}.

....Roy

Roy T. Fielding | 26 Oct 02:48 2011

Re: Another idea for URI templates

On Oct 25, 2011, at 7:10 AM, Kev Burns wrote:

> Pretty sure the path segment and query expansions do this already. However, the -07 spec is missing
examples of empty or undefined inputs for these expansions.

Well, sec 3.2.6 does have one, but I combined it with another variable

    {/var,empty}       /value/
    {/var,undef}       /value

....Roy


Gmane