couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2375) 500 error returned if rev query parameter contains -
Date Wed, 29 Oct 2014 23:20:33 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-2375?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14189256#comment-14189256
] 

ASF subversion and git services commented on COUCHDB-2375:
----------------------------------------------------------

Commit ed360325cacbc3f5320b28f3c42ef2bc3ca3c716 in couchdb-couch's branch refs/heads/2365-fix-failed-multipart-process-leak
from [~kxepal]
[ https://git-wip-us.apache.org/repos/asf?p=couchdb-couch.git;h=ed36032 ]

Respond with HTTP 400 Bad Request on invalid revision number

CouchDB should return HTTP 400 instead of HTTP 500 response
when revision number isn't integer like "foo-bar" as like as it does
for completely invalid revisions like "foo".

COUCHDB-2375


> 500 error returned if rev query parameter contains -
> ----------------------------------------------------
>
>                 Key: COUCHDB-2375
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2375
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>            Reporter: Kristine Jetzke
>            Assignee: Alexander Shorin
>            Priority: Minor
>             Fix For: 2.0.0
>
>
> A 500 error is returned when putting a document with {{?rev=00290d7e-0d94-4bf9-a421-33813c186513}}.
The response body is  
> {code}
> {"error":"unknown_error","reason":"badarg"}
> {code}
> Expected:
> 400 with {code}{"error":"bad_request","reason":"Invalid rev format"}{code}
> Steps to reproduce:
> # {{curl -X PUT 127.0.0.1:5984/tmp}}
> # {{curl -X POST 127.0.0.1:5984/tmp -d '{}' -H 'Content-Type: application/json'}}
> # {{curl -v -X PUT 127.0.0.1:5984/tmp/40c8ffbe2cc32de448c77af288001063?rev=00290d7e0d944bf9a421-33813c186513
-d '{}' -H 'Content-Type: application/json'}}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message