W3C home > Mailing lists > Public > www-archive@w3.org > October 2007

Re: URI Templates - optional variables? (explain.cgi)

From: Joe Gregorio <joe@bitworking.org>
Date: Thu, 18 Oct 2007 01:37:00 -0400
Message-ID: <3f1451f50710172237u5c15a175x49ee5c8028e3aee8@mail.gmail.com>
To: "Dan Connolly" <connolly@w3.org>
Cc: www-archive <www-archive@w3.org>

On 10/18/07, Dan Connolly <connolly@w3.org> wrote:
> Yeah... looks like perl code. ;-)
>
> OK... as an exercise in understanding the code, I
> made the main body into a function, factored
> out 3 parts, and added doctests. Enjoy.

Thanks! Checked in.

> While I was at it, I think I fixed a bug: in
> the case of "Not a valid URI Template", I think
> your code gives an HTTP 200 and then prints
> an HTTP 400 status message in the body.

Yup, that was a bug.

> You might add a clue about how to satisfy 'import tpg'
> in template_parser.py; tpg isn't in apt nor the CheeseShop,
> so I had to hunt for it a bit.
> http://christophe.delord.free.fr/tpg/index.html

Now listed under prerequisites on the project home page.

   Thanks!
   -joe

-- 
Joe Gregorio        http://bitworking.org
Received on Thursday, 18 October 2007 05:37:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 7 July 2008 08:10:19 GMT