mirror of
https://github.com/wekan/wekan.git
synced 2026-01-14 21:48:51 +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
26
packages/wekan-request/tests/test-node-debug.js
Normal file
26
packages/wekan-request/tests/test-node-debug.js
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
var assert = require('assert')
|
||||
, request = require('../index')
|
||||
, http = require('http')
|
||||
;
|
||||
|
||||
var s = http.createServer(function(req, res) {
|
||||
res.statusCode = 200
|
||||
res.end('')
|
||||
}).listen(6767, function () {
|
||||
// a simple request should not fail with NODE_DEBUG
|
||||
process.env.NODE_DEBUG = 'mumblemumble,request'
|
||||
|
||||
var stderr = ''
|
||||
process.stderr.write = (function(write) {
|
||||
return function(string, encoding, fd) {
|
||||
stderr += string
|
||||
}
|
||||
})(process.stderr.write)
|
||||
|
||||
request('http://localhost:6767', function (err, resp, body) {
|
||||
assert.ifError(err, 'the request did not fail')
|
||||
assert.ok(resp, 'the request did not fail')
|
||||
assert.ok(/REQUEST/.test(stderr), 'stderr has some messages')
|
||||
s.close(); // clean up
|
||||
})
|
||||
})
|
||||
Loading…
Add table
Add a link
Reference in a new issue