You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by armin weisser <ar...@virtual-identity.com> on 2011/05/05 11:42:54 UTC

URL-Encoded DELETE: " vs. %22

Hi,

i'm facing an issue with URL-Encoded DELETE Requests where double quotes
(") are translated to %22.

These GETS are equivalent
curl -X GET
http://localhost:5984/mydb/_design/views/_view/accounts?key="4711"
curl -X GET
http://localhost:5984/mydb/_design/views/_view/accounts?key=%224711%22

This DELETE is OK
curl -X DELETE
http://localhost:5984/mydb/4711?rev="1-7511a58b76f9a9dec6a666ecc74302f6"

But this one returns a 500
curl -X DELETE
http://localhost:5984/mydb/4711?rev=%221-7511a58b76f9a9dec6a666ecc74302f
6%22

Is this a known problem?

Cheers,

Armin


Re: AW: URL-Encoded DELETE: " vs. %22

Posted by Paul Hirst <pa...@sophos.com>.
Ah ok. Never mind then. My theory is fatally flawed.

On Thu, 2011-05-05 at 11:32 +0100, armin weisser wrote:
> Actually I'm on windows.
>
> The problem occurs in Java (using Apache HttpClient) and on cmd shell.
>
>
> -----Ursprüngliche Nachricht-----
> Von: Paul Hirst [mailto:paul.hirst@sophos.com]
> Gesendet: Donnerstag, 5. Mai 2011 12:03
> An: user@couchdb.apache.org
> Betreff: Re: URL-Encoded DELETE: " vs. %22
>
> If you are doing this under a UNIX shell then the shell will 'eat' the quotes so I suspect this means that quotes are just invalid because in the first instance couch never sees them.
>
> Try
>
> echo foo"bar"
>
> and you'll see what I mean
>
>
> On Thu, 2011-05-05 at 10:48 +0100, Robert Newson wrote:
> > "Is this a known problem?"
> >
> > It is now. :) Can you file a ticket?
> >
> > B.
> >
> > On 5 May 2011 10:42, armin weisser <ar...@virtual-identity.com> wrote:
> > > Hi,
> > >
> > > i'm facing an issue with URL-Encoded DELETE Requests where double
> > > quotes
> > > (") are translated to %22.
> > >
> > > These GETS are equivalent
> > > curl -X GET
> > > http://localhost:5984/mydb/_design/views/_view/accounts?key="4711"
> > > curl -X GET
> > > http://localhost:5984/mydb/_design/views/_view/accounts?key=%224711%
> > > 22
> > >
> > > This DELETE is OK
> > > curl -X DELETE
> > > http://localhost:5984/mydb/4711?rev="1-7511a58b76f9a9dec6a666ecc74302f6"
> > >
> > > But this one returns a 500
> > > curl -X DELETE
> > > http://localhost:5984/mydb/4711?rev=%221-7511a58b76f9a9dec6a666ecc74
> > > 302f
> > > 6%22
> > >
> > > Is this a known problem?
> > >
> > > Cheers,
> > >
> > > Armin
> > >
> > >
>
>
>
> Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
> Company Reg No 2096520. VAT Reg No GB 991 2418 08.



Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 991 2418 08.

AW: URL-Encoded DELETE: " vs. %22

Posted by armin weisser <ar...@virtual-identity.com>.
Actually I'm on windows.

The problem occurs in Java (using Apache HttpClient) and on cmd shell.


-----Ursprüngliche Nachricht-----
Von: Paul Hirst [mailto:paul.hirst@sophos.com] 
Gesendet: Donnerstag, 5. Mai 2011 12:03
An: user@couchdb.apache.org
Betreff: Re: URL-Encoded DELETE: " vs. %22

If you are doing this under a UNIX shell then the shell will 'eat' the quotes so I suspect this means that quotes are just invalid because in the first instance couch never sees them.

Try

echo foo"bar"

and you'll see what I mean


On Thu, 2011-05-05 at 10:48 +0100, Robert Newson wrote:
> "Is this a known problem?"
>
> It is now. :) Can you file a ticket?
>
> B.
>
> On 5 May 2011 10:42, armin weisser <ar...@virtual-identity.com> wrote:
> > Hi,
> >
> > i'm facing an issue with URL-Encoded DELETE Requests where double 
> > quotes
> > (") are translated to %22.
> >
> > These GETS are equivalent
> > curl -X GET
> > http://localhost:5984/mydb/_design/views/_view/accounts?key="4711"
> > curl -X GET
> > http://localhost:5984/mydb/_design/views/_view/accounts?key=%224711%
> > 22
> >
> > This DELETE is OK
> > curl -X DELETE
> > http://localhost:5984/mydb/4711?rev="1-7511a58b76f9a9dec6a666ecc74302f6"
> >
> > But this one returns a 500
> > curl -X DELETE
> > http://localhost:5984/mydb/4711?rev=%221-7511a58b76f9a9dec6a666ecc74
> > 302f
> > 6%22
> >
> > Is this a known problem?
> >
> > Cheers,
> >
> > Armin
> >
> >



Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 991 2418 08.

Re: URL-Encoded DELETE: " vs. %22

Posted by Paul Hirst <pa...@sophos.com>.
If you are doing this under a UNIX shell then the shell will 'eat' the
quotes so I suspect this means that quotes are just invalid because in
the first instance couch never sees them.

Try

echo foo"bar"

and you'll see what I mean


On Thu, 2011-05-05 at 10:48 +0100, Robert Newson wrote:
> "Is this a known problem?"
>
> It is now. :) Can you file a ticket?
>
> B.
>
> On 5 May 2011 10:42, armin weisser <ar...@virtual-identity.com> wrote:
> > Hi,
> >
> > i'm facing an issue with URL-Encoded DELETE Requests where double quotes
> > (") are translated to %22.
> >
> > These GETS are equivalent
> > curl -X GET
> > http://localhost:5984/mydb/_design/views/_view/accounts?key="4711"
> > curl -X GET
> > http://localhost:5984/mydb/_design/views/_view/accounts?key=%224711%22
> >
> > This DELETE is OK
> > curl -X DELETE
> > http://localhost:5984/mydb/4711?rev="1-7511a58b76f9a9dec6a666ecc74302f6"
> >
> > But this one returns a 500
> > curl -X DELETE
> > http://localhost:5984/mydb/4711?rev=%221-7511a58b76f9a9dec6a666ecc74302f
> > 6%22
> >
> > Is this a known problem?
> >
> > Cheers,
> >
> > Armin
> >
> >



Sophos Limited, The Pentagon, Abingdon Science Park, Abingdon, OX14 3YP, United Kingdom.
Company Reg No 2096520. VAT Reg No GB 991 2418 08.

AW: URL-Encoded DELETE: " vs. %22

Posted by armin weisser <ar...@virtual-identity.com>.
Here it is 
https://issues.apache.org/jira/browse/COUCHDB-1150

-----Ursprüngliche Nachricht-----
Von: armin weisser [mailto:armin.weisser@virtual-identity.com] 
Gesendet: Donnerstag, 5. Mai 2011 12:33
An: user@couchdb.apache.org
Betreff: AW: URL-Encoded DELETE: " vs. %22



>>>> "Is this a known problem?"

>> It is now. :) Can you file a ticket?

sure


On 5 May 2011 10:42, armin weisser <ar...@virtual-identity.com>
wrote:
> Hi,
>
> i'm facing an issue with URL-Encoded DELETE Requests where double
quotes
> (") are translated to %22.
>
> These GETS are equivalent
> curl -X GET
> http://localhost:5984/mydb/_design/views/_view/accounts?key="4711"
> curl -X GET
> http://localhost:5984/mydb/_design/views/_view/accounts?key=%224711%22
>
> This DELETE is OK
> curl -X DELETE
>
http://localhost:5984/mydb/4711?rev="1-7511a58b76f9a9dec6a666ecc74302f6"
>
> But this one returns a 500
> curl -X DELETE
>
http://localhost:5984/mydb/4711?rev=%221-7511a58b76f9a9dec6a666ecc74302f
> 6%22
>
> Is this a known problem?
>
> Cheers,
>
> Armin
>
>

AW: URL-Encoded DELETE: " vs. %22

Posted by armin weisser <ar...@virtual-identity.com>.

>>>> "Is this a known problem?"

>> It is now. :) Can you file a ticket?

sure


On 5 May 2011 10:42, armin weisser <ar...@virtual-identity.com>
wrote:
> Hi,
>
> i'm facing an issue with URL-Encoded DELETE Requests where double
quotes
> (") are translated to %22.
>
> These GETS are equivalent
> curl -X GET
> http://localhost:5984/mydb/_design/views/_view/accounts?key="4711"
> curl -X GET
> http://localhost:5984/mydb/_design/views/_view/accounts?key=%224711%22
>
> This DELETE is OK
> curl -X DELETE
>
http://localhost:5984/mydb/4711?rev="1-7511a58b76f9a9dec6a666ecc74302f6"
>
> But this one returns a 500
> curl -X DELETE
>
http://localhost:5984/mydb/4711?rev=%221-7511a58b76f9a9dec6a666ecc74302f
> 6%22
>
> Is this a known problem?
>
> Cheers,
>
> Armin
>
>

Re: URL-Encoded DELETE: " vs. %22

Posted by Robert Newson <ro...@gmail.com>.
"Is this a known problem?"

It is now. :) Can you file a ticket?

B.

On 5 May 2011 10:42, armin weisser <ar...@virtual-identity.com> wrote:
> Hi,
>
> i'm facing an issue with URL-Encoded DELETE Requests where double quotes
> (") are translated to %22.
>
> These GETS are equivalent
> curl -X GET
> http://localhost:5984/mydb/_design/views/_view/accounts?key="4711"
> curl -X GET
> http://localhost:5984/mydb/_design/views/_view/accounts?key=%224711%22
>
> This DELETE is OK
> curl -X DELETE
> http://localhost:5984/mydb/4711?rev="1-7511a58b76f9a9dec6a666ecc74302f6"
>
> But this one returns a 500
> curl -X DELETE
> http://localhost:5984/mydb/4711?rev=%221-7511a58b76f9a9dec6a666ecc74302f
> 6%22
>
> Is this a known problem?
>
> Cheers,
>
> Armin
>
>