News : The level of daily SPAM has reached insane proportions, all registrations are now manual. I ask you to send me an e-mail (john (at) murga (dot) org), to confirm that you want me to create an account for you.


Post Reply  Post Thread 
socket.http bug or aminotdoinitrite?
Author Message
JohnMurga
Administrator
*******


Posts: 381
Group: Administrators
Joined: Apr 2007
Status: Offline
Reputation: 2
Post: #1
RE: socket.http bug or aminotdoinitrite?

jpjacobs Wrote:
That's weird. Executing the same code as you gives me this:

Code:
> r, e = socket.http.request("http://wrong.host/")
host not found
stack traceback:
    [C]: in function 'request'
    stdin:1: in main chunk
    [C]: ?
>


And it doesn't take down murgaLua, just the error. But indeed, normally r should be nil and e should be the error message, and no error should be thrown automagically.

Edit:
I looked at this a bit further, and found out that it does work as expected in a plain Lua with the LuaRocks version of LuaSocket.
Apparently the only difference in the luasocket code between murgaLua and what I got from LuaRocks is this:

Code:
diff .//usocket.c /home/jpjacobs/software/murgaLua/3rd-party/luasocket-2.0.2-MOD/src//usocket.c
349c349
<         default: return hstrerror(err);
---
>         default: return strerror(err);

But this shouldn't matter because usocket isn't even being included in murgaLua, is it? So I think the problem must lie somewhere in the binding / build process...

Greetings,
JP


I will look into this

01-14-2011 01:00 AM
Visit this user's website Find all posts by this user Quote this message in a reply
Post Reply  Post Thread 

Messages In This Thread
RE: socket.http bug or aminotdoinitrite? - JohnMurga - 01-14-2011 01:00 AM

View a Printable Version
Send this Thread to a Friend
Subscribe to this Thread | Add Thread to Favorites

Forum Jump: