couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Candler <B.Cand...@pobox.com>
Subject Re: [RESULT]: Accept newline patch into CouchDB for 0.9 (Was: Re: VOTE: accept newline patch into CouchDB for 0.9)
Date Fri, 27 Feb 2009 08:17:27 GMT
On Fri, Feb 27, 2009 at 07:44:36AM +0000, Brian Candler wrote:
> The canonical reference is RFC 2046 section 5.1. Also see RFC 2387 for
> multipart/related, which is probably what CouchDB will want to use.
> 
> It's actually pretty simple, as you can see by looking at some lightweight
> MIME implementations which handle only multipart, e.g.
> http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/lib/soap/mimemessage.rb?view=markup

And here's a really tiny one (just for multipart HTTP POSTs)
http://www.realityforge.org/articles/2006/03/02/upload-a-file-via-post-with-net-http

A couple of knock-on effects to consider:

- You could allow the option of using multipart/mixed when doing a
  multi-document fetch (or even a view). Then when this is combined with
  attachments=true, each doc would be a multipart/related nested within
  a multipart/mixed wrapper. A bit unusual, but perfectly legal.

- You won't want to calculate an up-front Content-Length: for all this,
  so probably best to use chunked transfer encoding.

Regards,

Brian.

Mime
View raw message