问题标签 [luasec]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
lua - 使用 luarocks 安装 lua 请求时出错
你好stackoverflow的好人,
我luarocks install lua-requests
在命令行中使用安装 lua-requests 模块时遇到问题。所述模块的一些依赖项将毫无问题地安装,但luasec
会导致问题。
起初,我收到以下错误:
但是,我可以通过下载 OpenSSL 并在命令行中使用以下命令来修复它:
C:\Users\user>luarocks install luasec OPENSSL_DIR=" *path to openssl directory* "
然后导致以下错误:
谷歌搜索了一段时间后,我发现了以下问题https://github.com/brunoos/luasec/issues/150。
我尝试重命名 dll,但再次没有运气。所以,现在我有点卡住了,不知道该怎么做......如果有人对如何进行有任何提示或建议,我将非常感激。
在此先感谢,祝您有美好的一天:)
email - smtp.lua:80:尝试使用 lua 套接字发送电子邮件时尝试调用字段“b64”(一个 nil 值)
因此,我尝试使用带有 ssl 的 luasocket smtp 函数发送电子邮件,但由于某种原因,我收到此错误/usr/local/share/lua/5.1/socket/smtp.lua:80: attempt to call field 'b64' (a nil value)
,我已下载所有库,但我不知道为什么它不起作用。这是我的代码
http - Lua - Handle a 301 Moved Permanently error and then save generated image from resulting URL
I’m trying to make a http.request to have a graph created, and then save the resulting .png graph image that is created. The problem is I want to do this with Lua, yet I’m struggling on two parts. (If you take url, you’ll see that this should work fine in a standard browser)
- Handling a 301 error, have looked through SO, I could see a few references to this and the need to use luasec, which I believe I have.
301 moved permanently with socket.http
Here is the script, with the URL I’m trying to call via HTTP, and then (eventually want to ) save the resulting graph image (.png file) that’s created
Which returns the 301 Moved Permanently error
, plus via a viewer it also provides me with a link to another URL (this time a https on)
So to try and get to the https site first off, I tried adding in the ssl.http element with the following, but that that does not return anything at all, all nil
.
And then …</p>
- assuming I can eventually make the http.request work, the web page returns a png. image of the resulting graph - I’d love to be able to extract/copy that for further use within this piece of code..
As always any help/advice would be appreciated..