akka/akka-http

Bug: Server responses with 431 when uri length exceeds headers length limit

開放

#2,472 建立於 2019年3月15日

 (1 則留言) (0 個反應) (0 位負責人)Scala (598 個分叉)batch import
1 - triagedbughackathonhelp wantedt:core

倉庫指標

星標
 (1,311 顆星)
PR 合併指標
 (平均合併 1天 10小時) (30 天內合併 2 個 PR)

描述

I use Akka = "2.5.19" and AkkaHttp = "10.1.7". server config:

akka {
  http {
    parsing {
      max-uri-length = 96k
      max-header-value-length = 16k
    }
  }
}

I need to send relatively long query(more than 16k (list of ~ 300-500 uuids)). I was getting 414 status code when akka.http.parsing.max-uri-length was 8k. To fix that I've increased value up to 96k and it partially solved problem. Now server responses with (431,HttpEntity.Strict(text/plain; charset=UTF-8,HTTP header value exceeds the configured limit of 16384 characters)) which seems weird cause I send only only Auth header with short String value. To fix that I've increased akka.http.parsing.max-header-value-length up to 32k. This change has solved issue but it looks like an Akka bug.

貢獻者指南