Re: function_clause error in HTTP request
On Fri, Aug 3, 2012 at 12:24 PM, Jens Alfke <jens@...> wrote:
>
> On Aug 3, 2012, at 12:33 AM, Pieter van der Eems <p.van.der.eems <at> interactiveblueprints.nl> wrote:
>
>> We have an IOS client using TouchDB which syncs with CouchDB (1.2) on
>> our server.
>> The IOS client is a black box for me so I can't do any debugging there.
>
> The HTTP headers in the logs show that it's TouchDB 0.8; the latest release is 0.93. If this is an app in the
wild it's understandable that it's not running the latest release, but there have been several multipart
upload bugs fixed since then (where "then" = June 20) that _might_ be causing this.
>
> IIRC, most of those bugs involved HTTP auth; is that involved here? The headers in the pastie don't include
"Authorization:" but that might have been stripped from the log for security purposes.
>
> When I was debugging these, it was the CouchDB side that was the black box :) so I'm curious to know what the
CouchDB experts make of the logs you captured, i.e. what they imply might have been wrong with the
formatting of the multipart data.
>
> [Fri, 03 Aug 2012 07:12:52 GMT] [error] [<0.2639.144>] function_clause error in HTTP request
> [Fri, 03 Aug 2012 07:12:52 GMT] [info] [<0.2639.144>] Stacktrace: [{couch_db,write_streamed_attachment,
> [<0.4031.144>,
> #Fun<couch_doc.16.119974875>,-1576],
> [{file,
> "/opt/build-couchdb/dependencies/couchdb/src/couchdb/couch_db.erl"},
> {line,1031}]},
>
> In the CouchDB sources I have on hand (which are not up-to-date with 1.2) write_streamed_attachment
looks like
>> write_streamed_attachment(_Stream, _F, 0) ->
(Continue reading)