couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Benoit Chesneau <bchesn...@gmail.com>
Subject Re: Rewriting a parameterized URL
Date Sat, 05 Jun 2010 08:05:28 GMT
On Sat, Jun 5, 2010 at 9:16 AM, Aurélien Bénel <aurelien.benel@utt.fr> wrote:
> Hi there,
>
> I am now trying to rewrite URLs...
>
> With a nightly build of CouchDB (to fix COUCHDB-677 issue), I successfully used this
rewrite rule:
> [
>  {
>   "from": "/item/:corpus",
>   "to": "_list/mapping/kwic",
>   "query": {
>     "startkey": [":corpus"],
>     "endkey": [":corpus",{}]
>   }
>  }
> ]
>
> However in order to implement the given specification, I would need something like this
rule:
> [
>  {
>   "from": "/item/?corpus=:corpus",
>   "to": "_list/mapping/kwic",
>   "query": {
>     "startkey": [":corpus"],
>     "endkey": [":corpus",{}]
>   }
>  }
> ]
>
> I get:
> 1> [debug] [<0.3235.0>] 'GET' /cassandre/_design/cassandre/_rewrite/item/?corpus=MISS
{1,1}
> [snip]
> 1> [debug] [<0.3235.0>] OAuth Params: [{"corpus","MISS"}]
> [snip]
> 1> [debug] [<0.3235.0>] httpd 404 error response:
> {"error":"not_found","reason":"missing"}
>
> Any idea of what should be done so that my parameters are not interpreted as OAuth parameters
and so that they are sent to my rewrite rule instead?
>
>
> Regards,
>
> Aurélien

could you paste the headers received by couchdb ?

- benoit

Mime
View raw message