Lot of "Illegal header" error since upgraded to Play 2.6

38 views
Skip to first unread message

Thibault Meyer

unread,
Jan 15, 2018, 8:27:43 AM1/15/18
to Play Framework
Hello, 


since we have upgraded our application to Play 2.6.x, we got a lot of errors like :

Illegal header: Illegal 'accept-language' header: Invalid input '/', expected weight, OWS, 'EOI', listSep, ALPHA or '-' (line 1, column 12): application/json


Reporting this kind of issue is a good idea, but the message, besides being annoying, is totally useless because it dont give usefull information (like IP address or user-agent) via the message or MDC context to retrieve the applications or the developers who make non RFC compliant HTTP request.

Is it possible to add, at leat, the remote IP and the user-agent in logger MDC context or print this kind of message 

Illegal header from XXX.XXX.XXX.XXX:  'accept-language' header: Invalid input '/', expected weight, OWS, 'EOI', listSep, ALPHA or '-' (line 1, column 12): application/json


Sincerely.

Marcos Pereira

unread,
Jan 15, 2018, 3:39:09 PM1/15/18
to play-fr...@googlegroups.com
Hey Thibault,

This is the same as https://github.com/playframework/playframework/issues/7997 and it is also related to this discussion: https://github.com/playframework/playframework/issues/7737. I don't have an exact timeline, but we are planning to change how Play/Akka HTTP integration works wrt headers parsing (we want to be less strict in Play, for example).

Anyway, the log message you are seeing is logged by Akka HTTP itself, so maybe you want to open an issue here: https://github.com/akka/akka-http/issues


Best.

--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framework+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/play-framework/af6987bb-3b5e-4927-bf4b-6c313ed225de%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Marcos Pereira
Software Engineer, Lightbend.com

Thibault Meyer

unread,
Jan 16, 2018, 2:28:08 AM1/16/18
to Play Framework
Thanks Marcos


Le lundi 15 janvier 2018 21:39:09 UTC+1, Marcos Pereira a écrit :
Hey Thibault,

This is the same as https://github.com/playframework/playframework/issues/7997 and it is also related to this discussion: https://github.com/playframework/playframework/issues/7737. I don't have an exact timeline, but we are planning to change how Play/Akka HTTP integration works wrt headers parsing (we want to be less strict in Play, for example).

Anyway, the log message you are seeing is logged by Akka HTTP itself, so maybe you want to open an issue here: https://github.com/akka/akka-http/issues


Best.
On Mon, Jan 15, 2018 at 11:27 AM, Thibault Meyer <thibaul...@payintech.com> wrote:
Hello, 


since we have upgraded our application to Play 2.6.x, we got a lot of errors like :

Illegal header: Illegal 'accept-language' header: Invalid input '/', expected weight, OWS, 'EOI', listSep, ALPHA or '-' (line 1, column 12): application/json


Reporting this kind of issue is a good idea, but the message, besides being annoying, is totally useless because it dont give usefull information (like IP address or user-agent) via the message or MDC context to retrieve the applications or the developers who make non RFC compliant HTTP request.

Is it possible to add, at leat, the remote IP and the user-agent in logger MDC context or print this kind of message 

Illegal header from XXX.XXX.XXX.XXX:  'accept-language' header: Invalid input '/', expected weight, OWS, 'EOI', listSep, ALPHA or '-' (line 1, column 12): application/json


Sincerely.

--
You received this message because you are subscribed to the Google Groups "Play Framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to play-framewor...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages