[ 
https://issues.apache.org/jira/browse/COUCHDB-558?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Filipe Manana updated COUCHDB-558:
----------------------------------

    Attachment: jira-couchdb-558-8th-try-trunk.patch

Hello Paul,

no problem.

I though attachments were always base64 encoded. Never mind, the test case is 
now corrected. I have to start reading the online book.

The check_md5/2 function was not written by me. It's in couch_db.erl line 
685-687. It never threw an exception before since the md5 filed of an #att{} 
record was always the empty binary <<>>. I suppose this field and function were 
added with md5 integrity check in mind for the future.

I also simplified the mochiweb_headers.erl header parsing function and added 
more tests to its test/0 function. I submitted a patch with this addition to 
the mochiweb project, but so far I had no awnser ( 
http://code.google.com/p/mochiweb/issues/detail?id=48 ).

I do have a question. In couch_util I noticed the declaration of some custom 
base64 encoding/decoding functions. Why do they exist? Is there any problem 
with Erlang's base64 module?

cheers

> Validate Content-MD5 request headers on uploads
> -----------------------------------------------
>
>                 Key: COUCHDB-558
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-558
>             Project: CouchDB
>          Issue Type: Improvement
>          Components: Database Core, HTTP Interface
>            Reporter: Adam Kocoloski
>             Fix For: 0.11
>
>         Attachments: jira-couchdb-558-4th-try.patch, 
> jira-couchdb-558-5th-try.patch, jira-couchdb-558-6th-try-trunk.patch, 
> jira-couchdb-558-7th-try-trunk.patch, jira-couchdb-558-8th-try-trunk.patch, 
> jira-couchdb-558-for-trunk-2nd-try.patch, 
> jira-couchdb-558-for-trunk-3rd-try.patch, jira-couchdb-558-for-trunk.patch, 
> run.tpl.patch
>
>
> We could detect in-flight data corruption if a client sends a Content-MD5 
> header along with the data and Couch validates the MD5 on arrival.
> RFC1864 - The Content-MD5 Header Field
> http://www.faqs.org/rfcs/rfc1864.html

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

Reply via email to