lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


I've traced the problem to this code in buffer.c:

int buf_meth_send(lua_State *L, p_buf buf) {
    int top = lua_gettop(L);
    p_tm tm = tm_markstart(buf->tm);
    int err = IO_DONE;
    size_t size, sent;
    const char *data = luaL_checklstring(L, 2, &size);
    long start = (long) luaL_optnumber(L, 3, 1);
    long end = (long) luaL_optnumber(L, 4, -1);

The luaL_checklstring() correctly gets the string and its
size, but (start, end) are always (0, 0), so sendraw()
never gets called, so sock_send() never gets called.  Also,
'top' is 2.

I'm utterly stumped.  This is simply from calling
http.request("http://www.tecgraf.puc-rio.br/luasocket/http.html";),
so I'm not doing anything unusual, I think.

--Adam