http 400 while addings links(and python client bug)
sean at basho.com
Sun Apr 25 09:40:22 EDT 2010
The solution is to send multiple instances of the same header, which is valid HTTP. Split your long headers (I'm guessing "Link"?) into < 8K chunks.
Sean Cribbs <sean at basho.com>
Basho Technologies, Inc.
On Apr 25, 2010, at 6:28 AM, alexander krohn wrote:
> sorry for replying myself ;)
> the header hits the 8k size mark, that causes the 400.
> is there a way to configure the max header length for the rest api's http server? like apache's LimitRequestFieldsize?
> also there's a bug in the python client lib, the links are qouted but not unquoted. this leads to "growing" and wrong tag names.
> patch for __init__.py:
> < link = RiakLink(matches.group(2), matches.group(3), matches.group(4))
> > bucket = urllib.unquote_plus(matches.group(2))
> > key = urllib.unquote_plus(matches.group(3))
> > tag = urllib.unquote_plus(matches.group(4))
> > link = RiakLink(bucket, key, tag)
> alexander krohn wrote:
>> (i already posted this yesterday in irc, mailing-list subscribe was pending)
>> i'm using python to insert several items to riak. the code i'm using receives an http 400 exactly while inserting the 238th link to an object.
>> the response tells no additional errors, also the erlang-log doesn't show anything.
>> something wrong on my side or bug?
>> can anyone reproduce this 400?
>> thanks in advance.
>>  used code:
>> import riak
>> client = riak.RiakClient('127.0.0.1',
>> print "client alive: ", client.is_alive()
>> bucket = client.bucket('t1')
>> a = bucket.new('a', (1, 2, 3))
>> for i in range(1000):
>> x = bucket.new('x_%i' % i, i)
>> print "stored", i + 1, "items"
>> a.add_link(x, 'dings').store()
>> print "stored", i + 1, "links"
>> riak-users mailing list
>> riak-users at lists.basho.com
> riak-users mailing list
> riak-users at lists.basho.com
More information about the riak-users