We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The request should use a default host or at least not attempt to check the first character of an empty host. This issue seemed to be introduced here a3e6d37#diff-c53be0aa1c780a295ce5c742f574d0633894044b87e7ff68c01da79af95e5f65R68. It seems the simple solution would be to do:
if (header != null && !header.isEmpty())
You end up getting the following error:
15:52:54,501 WARNING [reactor.netty.http.server.HttpServerOperations] (reactor-http-nio-2) [7d6754c8, L:/127.0.0.1:8081 - R:/127.0.0.1:50526] Decoding failed: REQUEST(decodeResult: failure(java.lang.StringIndexOutOfBoundsException: String index out of range: 0), version: HTTP/1.1) GET /uriinfo HTTP/1.1 Host: <filtered> Connection: <filtered>
Simply pass a header like:
Host:
Check if the Host header is blank/empty before attempting to substring the header value.
netty
java -version
uname -a
The text was updated successfully, but these errors were encountered:
Handle empty HOST header when processing connection information
680d721
Fixes #2723
HOST
@jamezp Thanks for reporting the issue. PTAL #2724
Sorry, something went wrong.
9b23fed
violetagg
Successfully merging a pull request may close this issue.
Expected Behavior
The request should use a default host or at least not attempt to check the first character of an empty host. This issue seemed to be introduced here a3e6d37#diff-c53be0aa1c780a295ce5c742f574d0633894044b87e7ff68c01da79af95e5f65R68. It seems the simple solution would be to do:
Actual Behavior
You end up getting the following error:
Steps to Reproduce
Simply pass a header like:
Possible Solution
Check if the Host header is blank/empty before attempting to substring the header value.
Your Environment
netty
, ...): Netty 4.1.89.Finaljava -version
): OpenJDK 64-Bit Server VM (Red_Hat-11.0.18.0.10-1.fc37) (build 11.0.18+10, mixed mode, sharing)uname -a
): Linux localhost 6.1.14-200.fc37.x86_64 MonoHttpClientChannel subscribes to Mono with a null subscriber #1 SMP PREEMPT_DYNAMIC Sun Feb 26 00:13:26 UTC 2023 x86_64 x86_64 x86_64 GNU/LinuxThe text was updated successfully, but these errors were encountered: