Heroku是否支持分块的HTTP POST数据?

时间:2014-01-14 15:01:32

标签: http post heroku chunked

我有一个正在开发的应用程序,我想使用分块的HTTP / 1.1 POST请求向服务器发送未定义的数据量。

我现在可以看到的是,在初始标题之后似乎没有任何内容发送到服务器:

% cat ~/file.mp3 | curl -T - -X POST http://foo.com/source -v
* About to connect() to foo.com port 80 (#0)
*   Trying xx.yy.zz.tt...
* Connected to foo.com (xx.yy.zz.tt) port 80 (#0)
> POST /source HTTP/1.1
> User-Agent: curl/7.30.0
> Host: foo.com
> Accept: */*
> Transfer-Encoding: chunked
> Expect: 100-continue
>
< HTTP/1.1 100 Continue
< HTTP/1.1 200 OK
< Content-Type: text/html; charset=utf-8
< Date: Tue, 14 Jan 2014 14:57:19 GMT
< X-Powered-By: Express
< Content-Length: 13
< Connection: keep-alive
<
* Connection #0 to host foo.com left intact
Thanks, brah!

在应用程序(node express)中,如果我记录响应的“数据”事件,我只会看到:

2014-01-14T14:57:19.977995+00:00 heroku[router]: at=info method=POST path=/source host=foo.com fwd="xx.yy.zz.tt" dyno=web.1 connect=6ms service=73ms status=200 bytes=13

但是,在本地,相同的日志记录给出:

...
[request] Got 360 bytes of data
[request] Got 16372 bytes of data
[request] Got 16372 bytes of data
[request] Got 16372 bytes of data
[request] Got 48 bytes of data
[request] Got 15974 bytes of data
[request] Got 398 bytes of data
...

有什么我可以遗失的吗?

0 个答案:

没有答案