qiniu/nodejs-sdk — pull request #6 by why404 (2012-07-19 04:06:00+00:00)
Title: fixed http.request 'Transfer-Encoding: chunked' bug

原 NodeJS 发送 HTTP 请求时 body 部分会加 0 ，导致预发布环境签名认证失败：

2012/07/19 11:27:09 [WARN][qbox.us/servend/account] account_interface.go:102: GetAuthExt failed:
==> invalid argument ~ GetAuthExt
==> invalid argument ~ DigestAuth
==> invalid argument ~ digest_auth.Checksum

截取到的 NodeJS 请求如下：

POST /drop/test_image_bucket HTTP/1.1
Authorization: QBox a3pwrjafpZttICsgppnMKEk8oksvGNSSfjkjTlff:udlhyF_TO33dAmfSM3ed65NN1wA=
Host: m1.qbox.me:13003
Connection: keep-alive
Transfer-Encoding: chunked

0

^C

而 Ruby SDK 发送的请求是 OK 的，如下：

build@mail:~/proc/rs$ nc -l 13003
POST /drop/test_image_bucket HTTP/1.1
Accept: application/json
Accept-Encoding: gzip, deflate
User-Agent: Qiniu-RS-Ruby-SDK-2.1.2()
Authorization: QBox a3pwrjafpZttICsgppnMKEk8oksvGNSSfjkjTlff:udlhyF_TO33dAmfSM3ed65NN1wA=
Content-Type: application/x-www-form-urlencoded
Host: m1.qbox.me:13003