由于某些原因,当在头键中传递unicode字符时,请求不会到达express.js框架,它会消失:
# this never gets to my application code
curl localhost:9981/v1/test/bucket -X PUT -H "x-container-meta-♫: something" -i
# this gets to my application code
curl localhost:9981/v1/test/bucket -X PUT -H "x-container-meta-not_unicode: s
我有一个bash脚本,它具有以下功能:
function curl_the_URL_and_check_status(){
status=$(curl $1 | grep "X-Cache-Status:" | cut -d " " -f 2)
if [[ "$status" != *"MISS"* ]]; then
echo "
cURL returned non MISS status. Something is not correct. Exiting with status 1
我正在使用模块node-libcurl。当我将我的应用程序部署到Heroku时,当我从模块(在我的电脑上可以工作)启动一个函数时,它就崩溃了。
因此,我想在现有的node-libcurl模块中添加一些日志记录来解决这个问题,并将其放在node_modules之外的我的lib文件夹中(我将其从git heroku repo中排除)。
我显式地将node-pre-gyp库添加到node_modules中。
对于信息,错误是不言而喻的:
Error: getInfo failed. Error: An unknown option was passed in to libcurl
at Curl.g