学习廖雪峰做过滤器实验遇到坑记录
使用curl上传带签名文件时候,一定要注意-d后面字符串是你上传文件的内容,例如下面就是上传文件内容为”test-data“。
curl http://localhost:8080/upload/file -v -d "test-data" -H "Signature-Method: SHA-1" -H "Signature: 7115e9890f5b5cc6914bdfa3b7c011db1cdafedb" -H "Content-Type: application/octet-stream"
其中:7115e9890f5b5cc6914bdfa3b7c011db1cdafedb为字符串"test-data"经过SHA-1算法得到哈希值
感谢
链接: 廖雪峰修改请求章节.