couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From J Chris Anderson <jch...@gmail.com>
Subject Re: standalone attachments and content-encoding header
Date Tue, 23 Mar 2010 16:30:37 GMT

On Mar 23, 2010, at 6:40 AM, Filipe David Manana wrote:

> On Tue, Mar 23, 2010 at 12:36 AM, J Chris Anderson <jchris@gmail.com> wrote:
> 
>> So we should make sure our public api will accommodate patches to add
>> support for deflate and compress. This is more important than actually
>> supporting those encodings, for now.
>> 
>> 
> In that case, if nobody is against it, I'll do a patch that:
> 
> - removes the ?att_gzip_length=true doc query parameter
> - adds the doc query parameter ?att_encoding_info=true
> - adds two fields to an attachment stub, only when the doc is queried with
> the above parameter, that are "encoding" (currently the value will always be
> "gzip") and "encoded_length" (which replaces the "gzip_length" field).
> 
> This would imply also adding a new extra field to the record #att named
> "encoding" for e.g., or better yet, renaming #att.comp to #att.encoding
> (currently with only 2 possible values "identity" and "gzip"), which in turn
> implies changing the DB file format :(
> 
> Perhaps those 2 attachment stub properties should be always present? Without
> needing that doc query parameter "att_encoding_info=true"
> 

I think it'd be good to keep the file format unchanged (even if the names aren't 100% descriptive
-- "comp" seems ok for now, if there are code comments added.)

It should also be possible to use pattern matching to treat comp = true as comp = "gzip".

Also, I don't think there is a rush on this stuff, just as long as we move in the proper direction.

Chris

> 
>> Chris
>> 
>>> --
>>> Filipe David Manana,
>>> fdmanana@gmail.com
>>> 
>>> "Reasonable men adapt themselves to the world.
>>> Unreasonable men adapt the world to themselves.
>>> That's why all progress depends on unreasonable men."
>> 
>> 
> 
> 
> -- 
> Filipe David Manana,
> fdmanana@gmail.com
> 
> "Reasonable men adapt themselves to the world.
> Unreasonable men adapt the world to themselves.
> That's why all progress depends on unreasonable men."


Mime
View raw message