The correct call is posts.find(Bson.EmptyObject). I'll have to check why
the connection is reset for the other variants though...

Am 25.08.2012 21:52, schrieb Sergey:

I try to find all docs in collection like this:
posts.find(Bson())
or
posts.find([""])

And i get error in runtime:
500 - Internal Server Error

Internal Server Error

Internal error information:
object.Exception@/opt/vibe/source/vibe/core/drivers/libevent2_tcp.d(270): Remote
hung up while operating on TCPConnection.

/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(pure @safe
bool std.exception.enforce!(bool).enforce(bool, lazy const(char)[],
immutable(char)[], uint)+0x2c) [0x815e1b8]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(void
vibe.core.drivers.libevent2tcp.Libevent2TcpConnection.checkConnected()+0x7d)<br>[0x8192bb1]<br>/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(void<br>vibe.core.drivers.libevent2tcp.Libevent2TcpConnection.read(ubyte[])+0x4e)
[0x819273e]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(void
vibe.db.mongo.connection.MongoConnection.recv(ubyte[])+0x43) [0x81aae37]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(int
vibe.db.mongo.connection.MongoConnection.recvInt()+0x1e) [0x81aad2e]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(vibe.db.mongo.connection.Reply
vibe.db.mongo.connection.MongoConnection.recvReply(int)+0x20) [0x81aa950]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(vibe.db.mongo.connection.Reply
vibe.db.mongo.connection.MongoConnection.call(vibe.db.mongo.connection.Message)+0x22)
[0x81aabf2]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(vibe.db.mongo.connection.Reply
vibe.db.mongo.connection.MongoConnection.query(immutable(char)[],
vibe.db.mongo.connection.QueryFlags, int, int, vibe.data.bson.Bson,
vibe.data.bson.Bson)+0xc8) [0x81aa648]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(vibe.db.mongo.cursor.MongoCursor
vibe.db.mongo.collection.MongoCollection.find!(vibe.data.bson.Bson,
).find(vibe.data.bson.Bson, , vibe.db.mongo.connection.QueryFlags, int,
int)+0xaa) [0x814b72a]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(void
app.index(vibe.http.server.HttpServerRequest,
vibe.http.server.HttpServerResponse)+0x90) [0x814b490]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(void
std.functional.DelegateFaker!(void
function(vibe.http.server.HttpServerRequest,
vibe.http.server.HttpServerResponse)).DelegateFaker.doIt(vibe.http.server.HttpServerRequest,<br>vibe.http.server.HttpServerResponse)+0x45) [0x816c5bd]<br>/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(void<br>vibe.http.router.UrlRouter.handleRequest(vibe.http.server.HttpServerRequest,<br>vibe.http.server.HttpServerResponse)+0x129) [0x81a62ed]<br>/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(bool<br>vibe.http.server.handleRequest(vibe.stream.stream.Stream,<br>immutable(char)[], vibe.http.server.HTTPServerListener, ref<br>vibe.http.server.HttpServerSettings)+0xdec) [0x81cd708]<br>/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(void<br>vibe.http.server.handleHttpConnection(vibe.core.driver.TcpConnection,<br>vibe.http.server.HTTPServerListener)+0x143) [0x81cc8a3]<br>/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(void<br>vibe.http.server.listenHttpPlain(vibe.http.server.HttpServerSettings,<br>void delegate(vibe.http.server.HttpServerRequest,<br>vibe.http.server.HttpServerResponse)).void<br>doListen(vibe.http.server.HttpServerSettings,<br>vibe.http.server.HTTPServerListener, immutable(char)[]).void<br>__lambda31(vibe.core.driver.TcpConnection)+0x27) [0x81ca66f]<br>/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(extern (C)<br>void vibe.core.drivers.libevent2_tcp.onConnect(int, short, void).void
ClientTask.execute()+0x200) [0x8193220]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(void
vibe.core.core.CoreTask.run()+0x5d) [0x81521d9]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(void
core.thread.Fiber.run()+0x21) [0x81fc1f1]
/tmp/.rdmd-0/rdmd-app.d-9E010235A46EBDDBD7CF9667F5324106/app(fiber_entryPoint+0x4e)
[0x81fc12e]
[(nil)]