[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: LuaSocket 2.0b2 troubles
- From: "Adam D. Moss" <adam@...>
- Date: Fri, 27 Aug 2004 15:06:06 +0100
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