Skip to content

IndexMany() result in an 411 if IEnumerable<T> is empty #303

Closed
@salyh

Description

@salyh
IQueryable<Entity> ents = ...
IBulkResponse res = client.IndexMany(ents, npindexname, "objects");

generates an empty POST _bulk request if ents is empty:

POST http://myhost/nonephoneticindex/_bulk HTTP/1.1
Accept: application/json
Content-Type: application/json
Host: myhost
Proxy-Connection: Keep-Alive
empty

The result is

HTTP/1.0 411 Length Required
Server: squid/2.6.STABLE18
Date: Thu, 04 Jul 2013 13:55:27 GMT
Content-Type: text/html
Content-Length: 1522
Expires: Thu, 04 Jul 2013 13:55:27 GMT
X-Squid-Error: ERR_INVALID_REQ 0
X-Cache: MISS from webproxy.myorganization.com
X-Cache-Lookup: NONE from webproxy.myorganization.com:80
Proxy-Connection: close
some html ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions