You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@couchdb.apache.org by Nils Breunese <n....@vpro.nl> on 2009/08/07 14:58:13 UTC

Mochiweb parse bug?

Hello all,

I have a strange problem. I can access a list view just fine from 
Firefox and curl, but when doing an JSTL include from a JSP page (using 
c:import) CouchDB returns a HTTP 500 error for the exact same URL.

I enabled debug logging in CouchDB and get this for a request from 
Firefox and then a request from a JSP page: 
http://friendpaste.com/4f5PUEUqCVzQFK7X13MYeO

Is there something wrong with the request or is this a bug in mochiweb? 
Seems like mochiweb has trouble parsing the request?

Nils Breunese.

Re: Mochiweb parse bug?

Posted by Chris Anderson <jc...@apache.org>.
On Fri, Aug 7, 2009 at 5:58 AM, Nils Breunese<n....@vpro.nl> wrote:
> Hello all,
>
> I have a strange problem. I can access a list view just fine from Firefox
> and curl, but when doing an JSTL include from a JSP page (using c:import)
> CouchDB returns a HTTP 500 error for the exact same URL.
>
> I enabled debug logging in CouchDB and get this for a request from Firefox
> and then a request from a JSP page:
> http://friendpaste.com/4f5PUEUqCVzQFK7X13MYeO
>
> Is there something wrong with the request or is this a bug in mochiweb?
> Seems like mochiweb has trouble parsing the request?
>

It looks like the JSP thing is sending a bad header in the GET request:

{'Content-Type',"application/x-www-form-urlencoded"},

So mochi is probably trying to parse the form (which doesn't exist).

This is wild speculation on my part but I'm guessing dropping that
header would fix things.

Chris



-- 
Chris Anderson
http://jchrisa.net
http://couch.io