cloudhead/cradle — Issue #127: HEAD's etag causes "badarg" error
Author: diversario
Created: 2011-12-20 16:15:39+00:00
State: open

Fails:

```javascript
db.head(id, function(err, _doc){
console.log(err, _doc.etag);
/*
null "1-22788a41e7a23f4026b7443533903086"
*/
db.saveAttachment(id, _doc.etag, attachmentName, mime, stream, function(err, result){
console.log(err, result);
/*
{ error: 'unknown_error',
reason: 'badarg',
headers: { status: 500 } }
*/
});
});
```

Works:

```javascript
db.get(id, function(err, _doc){
console.log(err, _doc._rev);
/*
null '3-06bf76af67ceb51fa64c74419fc699e1'
*/
db.saveAttachment(id, _doc._rev, attachmentName, mime, stream, function(err, result){
console.log(err, result);
/*
null 4-e97d04dca1cbaa83b82bb54a9e499429
*/
});
});
```

The only difference I notices is that `etag` is double-quoted.