HTTPKit 为 Let's Encrypt 站点提供 ProtocolException: "No status"

HTTPKit gives ProtocolException: "No status" for a Let's Encrypt site

我正在尝试检索 URL。在撰写本文时:https://upvote.pub/

使用 java.net.URL,我可以检索到罚款:

=> (count (slurp (.openStream (java.net.URL. "https://upvote.pub/"))))
44353

同上 clj-http:

=> (count (:body (clj-http.client/get "https://upvote.pub/")))
44353

但是当我使用 HTTPKit 时,我 运行 遇到了问题:

=> @(http/get "https://upvote.pub/")
{:opts {:method :get, :url "https://upvote.pub/"}, :error #error {
 :cause "No status"
 :via
 [{:type org.httpkit.ProtocolException
   :message "No status"
   :at [org.httpkit.client.RespListener onCompleted "RespListener.java" 126]}]
 :trace
 [[org.httpkit.client.RespListener onCompleted "RespListener.java" 126]
  [org.httpkit.client.Request finish "Request.java" 51]
  [org.httpkit.client.HttpClient doRead "HttpClient.java" 156]
  [org.httpkit.client.HttpClient run "HttpClient.java" 426]
  [java.lang.Thread run "Thread.java" 745]]}}

本网站使用 Let's Encrypt。但是,其他 Let's Encrypt 站点似乎有效:

=> (-> "https://letsencrypt.org/" http/get deref :body count)
21490

证书具有不同的属性,但来自同一机构。

此外,如果我包含:insecure? true,错误仍然会发生。

我认为这可能与 this HTTPS + proxy bug, as the symptoms are similar and Google App Engine seems to be load-balancing the site. However, this fix was rolled into release 2.2.0 有关。

这是 HTTP-Kit 的错误吗?我可以绕过它吗?

看起来这是由 SNI(服务器名称标识)引起的。我使用 HTTP Kit 版本“2.3.0-alpha5”并遵循 this blog post。现在可以使用了。