couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Taras Puchko <taras.puc...@gmail.com>
Subject Passing matrix parameters to show and list
Date Tue, 07 Sep 2010 16:05:00 GMT
Hello,

Does anyone know if it's possible to pass matrix parameters to show and list
functions?

I tried the following rewrite rule: {"from" : "myshow/:id/:extra",  "to":
"_show/myshow/:id"}

_rewrite/myshow/myid/path;m1=v1;m2=v2
is translated to
_show/myshow/myid?id=myid&extra=path%3Bm1%3Dv1%3Bm2%3Dv2
so I have
req.query.extra == "path;m1=v1;m2=v2" and can parse it manually.

But if I use special characters things break, e.g. I want to pass "a;b=c" as
a value for m2:

_rewrite/myshow/myid/path;m1=v1;m2=a%3Bb%3Dc
is translated to
_show/myshow/myid?id=myid&extra=path%3Bm1%3Dv1%3Bm2%3Da%3Bb%3Dc
so I have
req.query.extra == "path;m1=v1;m2=a;b=c" and cannot parse it correctly.

Thanks,
Taras

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message