You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "Benoit Chesneau (JIRA)" <ji...@apache.org> on 2009/09/06 16:42:00 UTC

[jira] Created: (COUCHDB-497) fix attachments with an undefined Content-Length header and no TE

fix attachments with an undefined Content-Length  header and no TE
------------------------------------------------------------------

                 Key: COUCHDB-497
                 URL: https://issues.apache.org/jira/browse/COUCHDB-497
             Project: CouchDB
          Issue Type: Bug
    Affects Versions: 0.10, 0.11
            Reporter: Benoit Chesneau
             Fix For: 0.10, 0.11
         Attachments: fix_put_attachments.patch

 When you push an empty attachments with an undefined Content-Length  header and no TE, couchdb raises following error :

[error] [<0.27660.52>] function_clause error in HTTP request
[info] [<0.27660.52>] Stacktrace: [{couch_db,flush_att,
                       [<0.27653.52>,
                        {att,<<"test">>,<<"application/octet-stream">>,
                             undefined,<<>>,2,undefined}]},
             {couch_db,'-doc_flush_atts/2-lc$^0/1-0-',2},
             {couch_db,doc_flush_atts,2},
             {couch_db,'-update_docs/4-lc$^7/1-7-',2},
             {couch_db,'-update_docs/4-lc$^6/1-6-',2},
             {couch_db,update_docs,4},
             {couch_db,update_doc,3},
             {couch_httpd_db,db_attachment_req,4}]
[debug] [<0.27660.52>] httpd 500 error response:
 {"error":"unknown_error","reason":"function_clause"}


attached patch fix this error.

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


[jira] Updated: (COUCHDB-497) fix attachments with an undefined Content-Length header and no TE

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

Benoit Chesneau updated COUCHDB-497:
------------------------------------

    Attachment: fix_put_attachments.patch

> fix attachments with an undefined Content-Length  header and no TE
> ------------------------------------------------------------------
>
>                 Key: COUCHDB-497
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-497
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 0.10, 0.11
>            Reporter: Benoit Chesneau
>             Fix For: 0.10, 0.11
>
>         Attachments: fix_put_attachments.patch
>
>
>  When you push an empty attachments with an undefined Content-Length  header and no TE, couchdb raises following error :
> [error] [<0.27660.52>] function_clause error in HTTP request
> [info] [<0.27660.52>] Stacktrace: [{couch_db,flush_att,
>                        [<0.27653.52>,
>                         {att,<<"test">>,<<"application/octet-stream">>,
>                              undefined,<<>>,2,undefined}]},
>              {couch_db,'-doc_flush_atts/2-lc$^0/1-0-',2},
>              {couch_db,doc_flush_atts,2},
>              {couch_db,'-update_docs/4-lc$^7/1-7-',2},
>              {couch_db,'-update_docs/4-lc$^6/1-6-',2},
>              {couch_db,update_docs,4},
>              {couch_db,update_doc,3},
>              {couch_httpd_db,db_attachment_req,4}]
> [debug] [<0.27660.52>] httpd 500 error response:
>  {"error":"unknown_error","reason":"function_clause"}
> attached patch fix this error.

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


[jira] Updated: (COUCHDB-497) fix attachments with an undefined Content-Length header and no TE

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

Benoit Chesneau updated COUCHDB-497:
------------------------------------

    Attachment: fix_put_attachment2.patch

attachment with test for empty attachment. I can't test the undefined clause with undefined content since the browser always add a Content-Length. Howerver following test in python allow you to reproduce it :

before patch
>>> h.request("PUT", "http://127.0.0.1:5984/test_suite_db/bin_doc5/empty.txt?rev=3-112f7d0e2ecfab9b1601560c80e9d9b1")
>>> r = h.getresponse()
>>> r.read()
'{"error":"unknown_error","reason":"function_clause"}\n'
>>> h.close()

after patch :

>>> h.request("PUT", "http://127.0.0.1:5984/test_suite_db/bin_doc5/empty.txt?rev=3-112f7d0e2ecfab9b1601560c80e9d9b1")
>>> r = h.getresponse()
>>> r.read()
'{"ok":true,"id":"bin_doc5","rev":"4-3a4c408e867e6ed4068d5e55bdf6f048"}\n'


> fix attachments with an undefined Content-Length  header and no TE
> ------------------------------------------------------------------
>
>                 Key: COUCHDB-497
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-497
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 0.10, 0.11
>            Reporter: Benoit Chesneau
>             Fix For: 0.10, 0.11
>
>         Attachments: fix_put_attachment2.patch, fix_put_attachments.patch
>
>
>  When you push an empty attachments with an undefined Content-Length  header and no TE, couchdb raises following error :
> [error] [<0.27660.52>] function_clause error in HTTP request
> [info] [<0.27660.52>] Stacktrace: [{couch_db,flush_att,
>                        [<0.27653.52>,
>                         {att,<<"test">>,<<"application/octet-stream">>,
>                              undefined,<<>>,2,undefined}]},
>              {couch_db,'-doc_flush_atts/2-lc$^0/1-0-',2},
>              {couch_db,doc_flush_atts,2},
>              {couch_db,'-update_docs/4-lc$^7/1-7-',2},
>              {couch_db,'-update_docs/4-lc$^6/1-6-',2},
>              {couch_db,update_docs,4},
>              {couch_db,update_doc,3},
>              {couch_httpd_db,db_attachment_req,4}]
> [debug] [<0.27660.52>] httpd 500 error response:
>  {"error":"unknown_error","reason":"function_clause"}
> attached patch fix this error.

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


[jira] Closed: (COUCHDB-497) fix attachments with an undefined Content-Length header and no TE

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

Jan Lehnardt closed COUCHDB-497.
--------------------------------

    Resolution: Fixed

Fixed in trunk in r815308 and in 0.10.0

> fix attachments with an undefined Content-Length  header and no TE
> ------------------------------------------------------------------
>
>                 Key: COUCHDB-497
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-497
>             Project: CouchDB
>          Issue Type: Bug
>    Affects Versions: 0.10, 0.11
>            Reporter: Benoit Chesneau
>             Fix For: 0.10, 0.11
>
>         Attachments: fix_put_attachment2.patch, fix_put_attachments.patch
>
>
>  When you push an empty attachments with an undefined Content-Length  header and no TE, couchdb raises following error :
> [error] [<0.27660.52>] function_clause error in HTTP request
> [info] [<0.27660.52>] Stacktrace: [{couch_db,flush_att,
>                        [<0.27653.52>,
>                         {att,<<"test">>,<<"application/octet-stream">>,
>                              undefined,<<>>,2,undefined}]},
>              {couch_db,'-doc_flush_atts/2-lc$^0/1-0-',2},
>              {couch_db,doc_flush_atts,2},
>              {couch_db,'-update_docs/4-lc$^7/1-7-',2},
>              {couch_db,'-update_docs/4-lc$^6/1-6-',2},
>              {couch_db,update_docs,4},
>              {couch_db,update_doc,3},
>              {couch_httpd_db,db_attachment_req,4}]
> [debug] [<0.27660.52>] httpd 500 error response:
>  {"error":"unknown_error","reason":"function_clause"}
> attached patch fix this error.

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