lua-users home
lua-l archive

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


Milind,

> Interesting thing is that Zerobranestudio uses LuaSocket 3.0 rc-1 but its version seems to work fine when retrieving the page above compared to the version I compiled. So now I am in the process of comparing those.

I used https://github.com/diegonehab/luasocket/archive/v3.0-rc1.zip
archive to compile the version included with ZBS. I only made one
change to make socket.lua compatible with earlier versions of
socket.core (here is the commit:
https://github.com/pkulchenko/ZeroBraneStudio/commit/689cd8cf851a0cbb9a93d78ed9eb9a7bc02691b5),
but I doubt this change is relevant to the issue you are working with.

Paul.

On Mon, Jul 14, 2014 at 8:29 AM, Milind Gupta <milind.gupta@gmail.com> wrote:
> Luasocket 3.0 rc-1 is here: https://github.com/diegonehab/luasocket
> This one fixes bugs in LuaSocket 2.0.2
> Interesting thing is that Zerobranestudio uses LuaSocket 3.0 rc-1 but its
> version seems to work fine when retrieving the page above compared to the
> version I compiled. So now I am in the process of comparing those.
>
> Thanks I will compare the requests each of them sends out, especially the
> headers.
>
> Milind
>
>
>
> On Sat, Jul 12, 2014 at 6:56 PM, Rena <hyperhacker@gmail.com> wrote:
>>
>> On Sat, Jul 12, 2014 at 5:41 PM, Milind Gupta <milind.gupta@gmail.com>
>> wrote:
>>>
>>> Hi,
>>>       If I do the following:
>>>
>>> local h = require "socket.http"
>>>
>>>
>>>
>>>
>>> print(h.request([[http://www.amved.com/milindsweb/tableDB.html]]))
>>>
>>>
>>>
>>>
>>>
>>> It prints the correct HTML if I use luasocket 2.0 but if I use luasocket
>>> 3.0 it prints out this:
>>>
>>> <!-- pageok -->
>>> <!-- managed by puppet -->
>>> <html>
>>> <pre>pageok</pre>
>>> </html>
>>> 200     table: 0092BD00 HTTP/1.1 200 OK
>>>
>>>
>>>
>>> Is this a bug or something needs to be done differently?
>>>
>>> Thanks,
>>> Milind
>>>
>>
>> I didn't know there *was* a LuaSocket 3.0.
>>
>> My guess would be it's not setting the Host HTTP header, so you're getting
>> some default page.
>>
>> --
>> Sent from my Game Boy.
>
>