Re: Standardization of Case for ARI URIs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I was assuming that we would leave TECH to be case INsensitive, and thus it wouldn't matter.  We can also then optionally go through and change all json output to lowercase.

If you want to treat TECH as a case sensitive value, then ALL instances of IAX and PJSIP and LOCAL etc would have to be changed everywhere in the code (for any json output anyway) so that you don't have code broken by a lowercase TECH requirement.  This would also break some EXISTING ari apps, likely also tests.

What about a transitional period (such as Asterisk 12) where TECH is case insensitive and the json output of TECH is lowercased, then later (in trunk & Asterisk 13) the case sensitivity on TECH can be changed?




On Tue, Jan 21, 2014 at 2:50 PM, Paul Belanger <paul.belanger@xxxxxxxxxxxxxx> wrote:
On Tue, Jan 21, 2014 at 3:47 PM, Scott Griepentrog
<sgriepentrog@xxxxxxxxxx> wrote:
>
> Would you extend TECH being lower case to replacing all cases where PJSIP is output in response to an ARI request (and thus could get copied into a URL)?  For example, instead of:
>
>   {
>     "technology": "IAX2",
>     "resource": "demo",
>     "state": "unknown",
>     "channel_ids": []
>   },
>   {
>     "technology": "PJSIP",
>     "resource": "200",
>     "state": "offline",
>     "channel_ids": []
>   },
>
> You would want:
>
>   {
>     "technology": "iax2",
>     "resource": "demo",
>     "state": "unknown",
>     "channel_ids": []
>   },
>   {
>     "technology": "pjsip",
>     "resource": "200",
>     "state": "offline",
>     "channel_ids": []
>   },
>
> Or would it be sufficient to say that lowercase is preferred, but due to case insensitivity it's not necessary to change all existing cases where it is output?
>
Right, I would expect only lower case TECH to work after the change.
URL are case sensitive, but we are forcing lower case for TECH.

So:

/iax2/demo works!

and

/IAX2/demo 404

--
Paul Belanger | PolyBeacon, Inc.
Jabber: paul.belanger@xxxxxxxxxxxxxx | IRC: pabelanger (Freenode)
Github: https://github.com/pabelanger | Twitter: https://twitter.com/pabelanger

_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev



--
Digium logo
Scott Griepentrog
Digium, Inc · Software Developer
445 Jan Davis Drive NW · Huntsville, AL 35806 · US
direct/fax: +1 256 428 6239 · mobile: +1 317 507 4029
Check us out at: http://digium.com · http://asterisk.org
_______________________________________________
asterisk-app-dev mailing list
asterisk-app-dev@xxxxxxxxxxxxxxxx
http://lists.digium.com/cgi-bin/mailman/listinfo/asterisk-app-dev

[Index of Archives]     [Asterisk SS7]     [Asterisk Announcements]     [Asterisk Users]     [PJ SIP]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Linux API]

  Powered by Linux