Giter Site home page Giter Site logo

Comments (6)

brunoos avatar brunoos commented on June 18, 2024

Can you give a small code example of the problem?

You can see the documentation of https.request at:
http://w3.impa.br/~diego/software/luasocket/http.html#request

from luasec.

carlocab avatar carlocab commented on June 18, 2024

Seeing this error at Homebrew CI too. In particular, it's this problem: luarocks/luarocks#1302

Will try to extract an example, but currently my way of reproducing it is to install luasec then try to install any other rock.

from luasec.

YarickDarknet avatar YarickDarknet commented on June 18, 2024

@brunoos
itdontwork.lua.txt

from luasec.

brunoos avatar brunoos commented on June 18, 2024

The problem seems to be with luasocket... luasec's https is a wrapper to luasocket's http module.
Could it be luaL_Buffer problem in Lua 5.4.3?

@update:
I did a wrong test, I don't know if the problem is with luasocket yet...

from luasec.

brunoos avatar brunoos commented on June 18, 2024

It seems Lua 5.4.3 broke luasocket... it works fine with Lua 5.4.2.

Maybe, it broke luasec too.

from luasec.

brunoos avatar brunoos commented on June 18, 2024

The function buffer_meth_receive expects 3 parameters, with parameters 2 and 3 being optional.

However, luaL_buffinit can push values into the stack and that is breaking the function if 2 or 3 are missing.

One solution is always push nothing for 2 and 3 if they are missing. Something ugly like this seems to work:

int buffer_meth_receive(lua_State *L, p_buffer buf) {
+    if (lua_gettop(L) < 3) lua_settop(L, 3);
    int err = IO_DONE, top = lua_gettop(L);

Of course, all the code needs to be reviewed now (and other functions).

from luasec.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.