You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Caleb Land (JIRA)" <ji...@apache.org> on 2010/06/23 20:32:49 UTC

[jira] Created: (COUCHDB-809) Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error

Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error
---------------------------------------------------------------------------------------------------------------

                 Key: COUCHDB-809
                 URL: https://issues.apache.org/jira/browse/COUCHDB-809
             Project: CouchDB
          Issue Type: Bug
          Components: Database Core
    Affects Versions: 0.11
         Environment: Mac OS X 10.6, CouchDBX 0.11.0
            Reporter: Caleb Land


If you PUT a document with attachment stubs that are missing the revpos field, a 412 Precondition Failed error is raised with the message:

{"error":"missing_stub","reason":"id:test, name:graph.html"}

If a revpos is provided, then everything works ok.

Here is some sample ruby code that demonstrates this: http://gist.github.com/450323

I think the only field that should be required for an attachment is the "stub" field.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Closed: (COUCHDB-809) Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error

Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/COUCHDB-809?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chris Anderson closed COUCHDB-809.
----------------------------------

    Resolution: Fixed

applied in r957653. thanks!

> Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-809
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-809
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.11
>         Environment: Mac OS X 10.6, CouchDBX 0.11.0
>            Reporter: Caleb Land
>
> If you PUT a document with attachment stubs that are missing the revpos field, a 412 Precondition Failed error is raised with the message:
> {"error":"missing_stub","reason":"id:test, name:graph.html"}
> If a revpos is provided, then everything works ok.
> Here is some sample ruby code that demonstrates this: http://gist.github.com/450323
> I think the only field that should be required for an attachment is the "stub" field.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-809) Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error

Posted by "Chris Anderson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882204#action_12882204 ] 

Chris Anderson commented on COUCHDB-809:
----------------------------------------

That looks pretty solid, but it's important to have tests for this stuff as otherwise there's nothing to keep it from breaking again. Are you comfortable adding a test case to the attachments.js test in Futon?

> Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-809
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-809
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.11
>         Environment: Mac OS X 10.6, CouchDBX 0.11.0
>            Reporter: Caleb Land
>
> If you PUT a document with attachment stubs that are missing the revpos field, a 412 Precondition Failed error is raised with the message:
> {"error":"missing_stub","reason":"id:test, name:graph.html"}
> If a revpos is provided, then everything works ok.
> Here is some sample ruby code that demonstrates this: http://gist.github.com/450323
> I think the only field that should be required for an attachment is the "stub" field.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-809) Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error

Posted by "Caleb Land (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882198#action_12882198 ] 

Caleb Land commented on COUCHDB-809:
------------------------------------

I'm very green at Erlang, but would this be the fix for this issue?

http://github.com/caleb/couchdb/commit/90fd0c411b682d5bfcc05c9055a95d4cc7e08895

> Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-809
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-809
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.11
>         Environment: Mac OS X 10.6, CouchDBX 0.11.0
>            Reporter: Caleb Land
>
> If you PUT a document with attachment stubs that are missing the revpos field, a 412 Precondition Failed error is raised with the message:
> {"error":"missing_stub","reason":"id:test, name:graph.html"}
> If a revpos is provided, then everything works ok.
> Here is some sample ruby code that demonstrates this: http://gist.github.com/450323
> I think the only field that should be required for an attachment is the "stub" field.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-809) Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error

Posted by "Caleb Land (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882208#action_12882208 ] 

Caleb Land commented on COUCHDB-809:
------------------------------------

Okay, I'll do that. Thanks

> Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-809
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-809
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.11
>         Environment: Mac OS X 10.6, CouchDBX 0.11.0
>            Reporter: Caleb Land
>
> If you PUT a document with attachment stubs that are missing the revpos field, a 412 Precondition Failed error is raised with the message:
> {"error":"missing_stub","reason":"id:test, name:graph.html"}
> If a revpos is provided, then everything works ok.
> Here is some sample ruby code that demonstrates this: http://gist.github.com/450323
> I think the only field that should be required for an attachment is the "stub" field.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (COUCHDB-809) Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error

Posted by "Caleb Land (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/COUCHDB-809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12882240#action_12882240 ] 

Caleb Land commented on COUCHDB-809:
------------------------------------

Here is the new commit with a test for this issue:

http://github.com/caleb/couchdb/commit/e0a0998d06c51af290ac990e5de8cc3f9db00585

> Saving an attachment stub with a missing revpos field results in a 412 Precondition Failed (missing_stub) error
> ---------------------------------------------------------------------------------------------------------------
>
>                 Key: COUCHDB-809
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-809
>             Project: CouchDB
>          Issue Type: Bug
>          Components: Database Core
>    Affects Versions: 0.11
>         Environment: Mac OS X 10.6, CouchDBX 0.11.0
>            Reporter: Caleb Land
>
> If you PUT a document with attachment stubs that are missing the revpos field, a 412 Precondition Failed error is raised with the message:
> {"error":"missing_stub","reason":"id:test, name:graph.html"}
> If a revpos is provided, then everything works ok.
> Here is some sample ruby code that demonstrates this: http://gist.github.com/450323
> I think the only field that should be required for an attachment is the "stub" field.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.