akka/akka-http

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

Aberta

#2.472 aberto em 15 de mar. de 2019

 (1 comentário) (0 reação) (0 responsável)Scala (598 forks)batch import
1 - triagedbughackathonhelp wantedt:core

Métricas do repositório

Stars
 (1.311 estrelas)
Métricas de merge de PR
 (Mesclagem média 1d 10h) (2 fundiu PRs em 30d)

Description

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.

Guia do colaborador