[英]Heroku router closing persistent http/1.1 connection requests?
我在Heroku上托管了一個應用程序,它似乎正在向HTTP / 1.1連接請求的響應標頭添加Connection:close,並且不允許我們重新使用持久的HTTP / 1.1連接。 這適用於我在Heroku上擁有的其他應用程序,但是我不知道為什么會為此應用程序執行此操作。 有什么線索嗎?
因此,例如,如果我嘗試使用curl進行測試,
curl -v "http://myapp.herokuapp.com/api/posts/trending" "http://myapp.com/api/posts/trending"
* Connected to myapp.herokuapp.com () port 80 (#0)
> GET /api/posts/trending HTTP/1.1
> User-Agent: curl/7.37.1
> Host: myapp.herokuapp.com
> Accept: */*
>
< HTTP/1.1 200 OK
< Connection: close
< Date: Mon, 09 Mar 2015 20:54:15 GMT
< Cache-Control: no-cache, no-store, must-revalidate
< Pragma: no-cache
< Expires: 0
< Content-Type: application/json;charset=UTF-8
* Server Jetty(9.2.7.v20150116) is not blacklisted
< Server: Jetty(9.2.7.v20150116)
< Via: 1.1 vegur
...response...
* Closing connection 0
根據Heroku支持,在這里回答我自己的問題,這是Heroku路由器的已知限制,因為Jetty不會按設計發送HTTP / 1.1請求響應中的Connection:keep-alive。 目前沒有建議的解決方法。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.