couchdb-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Kocoloski <kocol...@apache.org>
Subject Re: large replication URL
Date Tue, 18 Jun 2013 00:26:03 GMT
Well, a GET request is the RESTful choice.  I do admit that the limit on the length of a URL
is going to be much more stringent than the limit on the size of a POST body.

CouchDB already has code to split the request up if the generated URL is "too large".  Currently
the value of "too large" is hard-coded at 7000 bytes:

https://github.com/apache/couchdb/blob/1.3.0/src/couch_replicator/src/couch_replicator_api_wrap.erl#L473

If you happen to be building from source you can lower that value to something your proxy
will accept.

For dev@ -- it would absolutely make sense to patch this so that the user could supply a parameter
like max_url_length in the replication spec and override the default.  It may also make sense
to turn the default into a config setting.

Adam

On Jun 17, 2013, at 8:12 PM, Cliffano Subagio <cliffano@gmail.com> wrote:

> Hi,
> 
> I have a CouchDB database which replicates from npm registry and I notice
> that the replication URL can get large due to the revisions array in
> atts_since parameter, to a point that its too large that the proxy I'm
> using doesn't let the GET request through.
> 
> Here's a sample of the large URL
> https://gist.github.com/cliffano/5726639/raw/ea0e416dbbd8928ade4809c38e5a3214a736c35c/gistfile1.txt
> 
> Is there any particular reason why this is a GET instead of a POST?
> Is there any way to change the request to use POST?
> 
> Cheers,
> Cliff.


Mime
View raw message