[jira] [Updated] (COUCHDB-687) Add md5 hash to _attachments properties for documents

2012-01-21 Thread Randall Leeds (Updated) (JIRA)

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

Randall Leeds updated COUCHDB-687:
--

Fix Version/s: 1.3
   2.0

> Add md5 hash to _attachments properties for documents
> -
>
> Key: COUCHDB-687
> URL: https://issues.apache.org/jira/browse/COUCHDB-687
> Project: CouchDB
>  Issue Type: Improvement
> Environment: CouchDB
>Reporter: mikeal
>Assignee: Filipe Manana
> Fix For: 2.0, 1.3
>
> Attachments: couchdb-md5-in-attachment-COUCHDB-687-v2.patch, 
> couchdb-md5-in-attachment-COUCHDB-687-v3.patch, 
> couchdb-md5-in-attachment-COUCHDB-687.patch, md5.patch
>
>
> The current attachment information looks like this:
> GET /dbname/docid
> "_attachments": {
>   "jquery-1.4.1.min.js": {
>   "content_type": "text/javascript"
>   "revpos": 138
>   "length": 70844
>   "stub": true
>   }
> }
> If a client wanted to sync local files as attachments with a document it 
> would not currently be able to do so without keeping a local store of the 
> revpos. If this information included an md5 hash of the attachment clients 
> could compare it against a hash of the local file to see if they match.
> -Mikeal

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira




[jira] Updated: (COUCHDB-687) Add md5 hash to _attachments properties for documents

2010-12-22 Thread JIRA

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

Juuso Väänänen updated COUCHDB-687:
---

Attachment: couchdb-md5-in-attachment-COUCHDB-687-v3.patch

- Formatting, line length and unnecessary changes fixed (mostly).
Some lines still might exist with 81 chars or so because of better 
readablility. How javascript should be intented, 2 spaces?
- Added one test for md5 after compaction to compact.js.
- Changed hex_to_bin/1 to allow also list as input.

> Add md5 hash to _attachments properties for documents
> -
>
> Key: COUCHDB-687
> URL: https://issues.apache.org/jira/browse/COUCHDB-687
> Project: CouchDB
>  Issue Type: Improvement
> Environment: CouchDB
>Reporter: mikeal
>Assignee: Filipe Manana
> Attachments: couchdb-md5-in-attachment-COUCHDB-687-v2.patch, 
> couchdb-md5-in-attachment-COUCHDB-687-v3.patch, 
> couchdb-md5-in-attachment-COUCHDB-687.patch, md5.patch
>
>
> The current attachment information looks like this:
> GET /dbname/docid
> "_attachments": {
>   "jquery-1.4.1.min.js": {
>   "content_type": "text/javascript"
>   "revpos": 138
>   "length": 70844
>   "stub": true
>   }
> }
> If a client wanted to sync local files as attachments with a document it 
> would not currently be able to do so without keeping a local store of the 
> revpos. If this information included an md5 hash of the attachment clients 
> could compare it against a hash of the local file to see if they match.
> -Mikeal

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



[jira] Updated: (COUCHDB-687) Add md5 hash to _attachments properties for documents

2010-12-22 Thread JIRA

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

Juuso Väänänen updated COUCHDB-687:
---

Attachment: couchdb-md5-in-attachment-COUCHDB-687-v2.patch

Thanks for comments, here is patch with some cleanups and improvements done.

Major changes:
- Simple javascript tests added, etap tests contain testing also to some extent.
- Md5 is calculated from attachement data when base64 is used to upload data.
- md5 is omitted from json output when value is undefined.
- Try to keep line length on 80 chars.

- Upgrade code not fully tested (no tests included), but revised to git master.

Some questions regarding functionality:
- Should md5 be calculated when gzipped attachement is uploaded without 
identity md5?

> Add md5 hash to _attachments properties for documents
> -
>
> Key: COUCHDB-687
> URL: https://issues.apache.org/jira/browse/COUCHDB-687
> Project: CouchDB
>  Issue Type: Improvement
> Environment: CouchDB
>Reporter: mikeal
>Assignee: Filipe Manana
> Attachments: couchdb-md5-in-attachment-COUCHDB-687-v2.patch, 
> couchdb-md5-in-attachment-COUCHDB-687.patch, md5.patch
>
>
> The current attachment information looks like this:
> GET /dbname/docid
> "_attachments": {
>   "jquery-1.4.1.min.js": {
>   "content_type": "text/javascript"
>   "revpos": 138
>   "length": 70844
>   "stub": true
>   }
> }
> If a client wanted to sync local files as attachments with a document it 
> would not currently be able to do so without keeping a local store of the 
> revpos. If this information included an md5 hash of the attachment clients 
> could compare it against a hash of the local file to see if they match.
> -Mikeal

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



[jira] Updated: (COUCHDB-687) Add md5 hash to _attachments properties for documents

2010-11-23 Thread JIRA

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

Juuso Väänänen updated COUCHDB-687:
---

Attachment: couchdb-md5-in-attachment-COUCHDB-687.patch

Second try storing md5 calculated from attachement when attachement added to 
file. Replication uses provided identity-md5 if such exists. Compressed 
attachements are not extracted to find out what actual md5 would be. If md5 is 
not known for some reason text value "unknown" is used on json.

Upgrade path from older disk formats is not most likely complete and this patch 
is at the moment only request for comments. (Anyway granted for inclusion)

> Add md5 hash to _attachments properties for documents
> -
>
> Key: COUCHDB-687
> URL: https://issues.apache.org/jira/browse/COUCHDB-687
> Project: CouchDB
>  Issue Type: Improvement
> Environment: CouchDB
>Reporter: mikeal
>Assignee: Filipe Manana
> Attachments: couchdb-md5-in-attachment-COUCHDB-687.patch, md5.patch
>
>
> The current attachment information looks like this:
> GET /dbname/docid
> "_attachments": {
>   "jquery-1.4.1.min.js": {
>   "content_type": "text/javascript"
>   "revpos": 138
>   "length": 70844
>   "stub": true
>   }
> }
> If a client wanted to sync local files as attachments with a document it 
> would not currently be able to do so without keeping a local store of the 
> revpos. If this information included an md5 hash of the attachment clients 
> could compare it against a hash of the local file to see if they match.
> -Mikeal

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



[jira] Updated: (COUCHDB-687) Add md5 hash to _attachments properties for documents

2010-10-25 Thread JIRA

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

Juuso Väänänen updated COUCHDB-687:
---

Attachment: md5.patch

Expose md5 of attachement as hex string on json of document.

> Add md5 hash to _attachments properties for documents
> -
>
> Key: COUCHDB-687
> URL: https://issues.apache.org/jira/browse/COUCHDB-687
> Project: CouchDB
>  Issue Type: Improvement
> Environment: CouchDB
>Reporter: mikeal
>Assignee: Filipe Manana
> Attachments: md5.patch
>
>
> The current attachment information looks like this:
> GET /dbname/docid
> "_attachments": {
>   "jquery-1.4.1.min.js": {
>   "content_type": "text/javascript"
>   "revpos": 138
>   "length": 70844
>   "stub": true
>   }
> }
> If a client wanted to sync local files as attachments with a document it 
> would not currently be able to do so without keeping a local store of the 
> revpos. If this information included an md5 hash of the attachment clients 
> could compare it against a hash of the local file to see if they match.
> -Mikeal

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



[jira] Updated: (COUCHDB-687) Add md5 hash to _attachments properties for documents

2010-10-09 Thread Paul Joseph Davis (JIRA)

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

Paul Joseph Davis updated COUCHDB-687:
--

Skill Level: Regular Contributors Level (Easy to Medium)

> Add md5 hash to _attachments properties for documents
> -
>
> Key: COUCHDB-687
> URL: https://issues.apache.org/jira/browse/COUCHDB-687
> Project: CouchDB
>  Issue Type: Improvement
> Environment: CouchDB
>Reporter: mikeal
>Assignee: Filipe Manana
>
> The current attachment information looks like this:
> GET /dbname/docid
> "_attachments": {
>   "jquery-1.4.1.min.js": {
>   "content_type": "text/javascript"
>   "revpos": 138
>   "length": 70844
>   "stub": true
>   }
> }
> If a client wanted to sync local files as attachments with a document it 
> would not currently be able to do so without keeping a local store of the 
> revpos. If this information included an md5 hash of the attachment clients 
> could compare it against a hash of the local file to see if they match.
> -Mikeal

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