mirror of
https://github.com/wekan/wekan.git
synced 2026-02-28 02:44:07 +01:00
Fixed Non-ASCII attachment filename will crash when downloading.
Thanks to xet7 ! Fixes #2759
This commit is contained in:
parent
843ff8eaaa
commit
c2da477735
277 changed files with 30568 additions and 52 deletions
28
packages/wekan-request/tests/ssl/ca/server.js
Normal file
28
packages/wekan-request/tests/ssl/ca/server.js
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
var fs = require("fs")
|
||||
var https = require("https")
|
||||
var options = { key: fs.readFileSync("./server.key")
|
||||
, cert: fs.readFileSync("./server.crt") }
|
||||
|
||||
var server = https.createServer(options, function (req, res) {
|
||||
res.writeHead(200)
|
||||
res.end()
|
||||
server.close()
|
||||
})
|
||||
server.listen(1337)
|
||||
|
||||
var ca = fs.readFileSync("./ca.crt")
|
||||
var agent = new https.Agent({ host: "localhost", port: 1337, ca: ca })
|
||||
|
||||
https.request({ host: "localhost"
|
||||
, method: "HEAD"
|
||||
, port: 1337
|
||||
, headers: { host: "testing.request.mikealrogers.com" }
|
||||
, agent: agent
|
||||
, ca: [ ca ]
|
||||
, path: "/" }, function (res) {
|
||||
if (res.client.authorized) {
|
||||
console.log("node test: OK")
|
||||
} else {
|
||||
throw new Error(res.client.authorizationError)
|
||||
}
|
||||
}).end()
|
||||
Loading…
Add table
Add a link
Reference in a new issue