You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Klaus Trainer (JIRA)" <ji...@apache.org> on 2011/01/09 18:23:46 UTC
[jira] Created: (COUCHDB-1018) trying to attach a file to a
document and specifying a nonexistent revision number causes status code
500 in the HTTP response
trying to attach a file to a document and specifying a nonexistent revision number causes status code 500 in the HTTP response
------------------------------------------------------------------------------------------------------------------------------
Key: COUCHDB-1018
URL: https://issues.apache.org/jira/browse/COUCHDB-1018
Project: CouchDB
Issue Type: Bug
Components: HTTP Interface
Reporter: Klaus Trainer
Priority: Minor
When trying to attach a file to a document and specifying a nonexistent revision number, the HTTP response's status code is 500. This status code is plainly wrong, as there is definitely no Internal Server Error in that case.
When trying to update a document body and specifying a nonexistent revision number, the HTTP response's status code is 409 (which is reasonable).
Here, the resulting HTTP status codes should be consistent, i.e., independent of the fact whether a new version of the document body or an attachment is written.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (COUCHDB-1018) trying to attach a file to a
document and specifying a nonexistent revision number causes status code
500 in the HTTP response
Posted by "Klaus Trainer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Klaus Trainer updated COUCHDB-1018:
-----------------------------------
Attachment: 0001-Fix-COUCHDB-1018.patch
Yeah. Should have seen that. Patch is updated.
> trying to attach a file to a document and specifying a nonexistent revision number causes status code 500 in the HTTP response
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: COUCHDB-1018
> URL: https://issues.apache.org/jira/browse/COUCHDB-1018
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Reporter: Klaus Trainer
> Priority: Minor
> Attachments: 0001-Fix-COUCHDB-1018.patch, 0001-Fix-COUCHDB-1018.patch
>
>
> When trying to attach a file to a document and specifying a nonexistent revision number, the HTTP response's status code is 500. This status code is plainly wrong, as there is definitely no Internal Server Error in that case.
> When trying to update a document body and specifying a nonexistent revision number, the HTTP response's status code is 409 (which is reasonable).
> Here, the resulting HTTP status codes should be consistent, i.e., independent of the fact whether a new version of the document body or an attachment is written.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Updated: (COUCHDB-1018) trying to attach a file to a
document and specifying a nonexistent revision number causes status code
500 in the HTTP response
Posted by "Klaus Trainer (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Klaus Trainer updated COUCHDB-1018:
-----------------------------------
Attachment: 0001-Fix-COUCHDB-1018.patch
This tests fixes the issue and adds a corresponding futon test case.
> trying to attach a file to a document and specifying a nonexistent revision number causes status code 500 in the HTTP response
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: COUCHDB-1018
> URL: https://issues.apache.org/jira/browse/COUCHDB-1018
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Reporter: Klaus Trainer
> Priority: Minor
> Attachments: 0001-Fix-COUCHDB-1018.patch
>
>
> When trying to attach a file to a document and specifying a nonexistent revision number, the HTTP response's status code is 500. This status code is plainly wrong, as there is definitely no Internal Server Error in that case.
> When trying to update a document body and specifying a nonexistent revision number, the HTTP response's status code is 409 (which is reasonable).
> Here, the resulting HTTP status codes should be consistent, i.e., independent of the fact whether a new version of the document body or an attachment is written.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (COUCHDB-1018) trying to attach a file to a
document and specifying a nonexistent revision number causes status code
500 in the HTTP response
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1018?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Paul Joseph Davis resolved COUCHDB-1018.
----------------------------------------
Resolution: Fixed
Applied in r1086944
> trying to attach a file to a document and specifying a nonexistent revision number causes status code 500 in the HTTP response
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: COUCHDB-1018
> URL: https://issues.apache.org/jira/browse/COUCHDB-1018
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Reporter: Klaus Trainer
> Priority: Minor
> Attachments: 0001-Fix-COUCHDB-1018.patch, 0001-Fix-COUCHDB-1018.patch
>
>
> When trying to attach a file to a document and specifying a nonexistent revision number, the HTTP response's status code is 500. This status code is plainly wrong, as there is definitely no Internal Server Error in that case.
> When trying to update a document body and specifying a nonexistent revision number, the HTTP response's status code is 409 (which is reasonable).
> Here, the resulting HTTP status codes should be consistent, i.e., independent of the fact whether a new version of the document body or an attachment is written.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (COUCHDB-1018) trying to attach a file to a
document and specifying a nonexistent revision number causes status code
500 in the HTTP response
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989465#comment-12989465 ]
Paul Joseph Davis commented on COUCHDB-1018:
--------------------------------------------
Looks good to me.
> trying to attach a file to a document and specifying a nonexistent revision number causes status code 500 in the HTTP response
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: COUCHDB-1018
> URL: https://issues.apache.org/jira/browse/COUCHDB-1018
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Reporter: Klaus Trainer
> Priority: Minor
> Attachments: 0001-Fix-COUCHDB-1018.patch, 0001-Fix-COUCHDB-1018.patch
>
>
> When trying to attach a file to a document and specifying a nonexistent revision number, the HTTP response's status code is 500. This status code is plainly wrong, as there is definitely no Internal Server Error in that case.
> When trying to update a document body and specifying a nonexistent revision number, the HTTP response's status code is 409 (which is reasonable).
> Here, the resulting HTTP status codes should be consistent, i.e., independent of the fact whether a new version of the document body or an attachment is written.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (COUCHDB-1018) trying to attach a file to a
document and specifying a nonexistent revision number causes status code
500 in the HTTP response
Posted by "Paul Joseph Davis (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/COUCHDB-1018?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12989458#comment-12989458 ]
Paul Joseph Davis commented on COUCHDB-1018:
--------------------------------------------
Minor nit on the layout of that case statement. I'd prefer something more like:
case couch_db:open_doc_revs(Db, DocId, [Rev], []) of
{ok, [{ok, Doc0}]} -> Doc0;
{ok, [{{not_found, missing}, Rev}]} -> throw(conflict);
{ok, [Error]} -> throw(Error)
end
> trying to attach a file to a document and specifying a nonexistent revision number causes status code 500 in the HTTP response
> ------------------------------------------------------------------------------------------------------------------------------
>
> Key: COUCHDB-1018
> URL: https://issues.apache.org/jira/browse/COUCHDB-1018
> Project: CouchDB
> Issue Type: Bug
> Components: HTTP Interface
> Reporter: Klaus Trainer
> Priority: Minor
> Attachments: 0001-Fix-COUCHDB-1018.patch
>
>
> When trying to attach a file to a document and specifying a nonexistent revision number, the HTTP response's status code is 500. This status code is plainly wrong, as there is definitely no Internal Server Error in that case.
> When trying to update a document body and specifying a nonexistent revision number, the HTTP response's status code is 409 (which is reasonable).
> Here, the resulting HTTP status codes should be consistent, i.e., independent of the fact whether a new version of the document body or an attachment is written.
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira