400 bad request error
May 31, 2022 05:42AM
I got an error: "client sent invalid header line while reading client request headers" when I pass some of ios-8859-1 encoded chinese words in http header value。 but I dont know why? and I dont know which ios-8859-1 char can not set in http header values? who can tell me the reason?

the error code example(in java):
String chineseWords = “一”;
String headerValue = new String(chineseWords.getBytes("utf-8"), "ISO-8859-1");

the http requeset as follow:

GET /EurekaApp/v1/test
Accept: application/json
X-Biz-Id: ${headerValue}

then nginx will return 400 code.

Most Chinese characters are good, only a few get 400



Edited 2 time(s). Last edit at 05/31/2022 05:45AM by lchpersonal.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 91
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready