File tree Expand file tree Collapse file tree 2 files changed +15
-2
lines changed
webclient/api/src/main/java/io/helidon/webclient/api
webserver/tests/webserver/src/test/java/io/helidon/webserver/tests Expand file tree Collapse file tree 2 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -475,7 +475,8 @@ private static String nextRequestId(String protocolId) {
475475 }
476476
477477 private R validateAndSubmit (Object entity ) {
478- if (!SUPPORTED_SCHEMES .contains (uri ().scheme ())) {
478+ String scheme = uri ().scheme ();
479+ if (scheme == null || !SUPPORTED_SCHEMES .contains (scheme .toLowerCase ())) {
479480 throw new IllegalArgumentException (
480481 String .format ("Not supported scheme %s, client supported schemes are: %s" ,
481482 uri ().scheme (),
Original file line number Diff line number Diff line change 11/*
2- * Copyright (c) 2023 Oracle and/or its affiliates.
2+ * Copyright (c) 2023, 2025 Oracle and/or its affiliates.
33 *
44 * Licensed under the Apache License, Version 2.0 (the "License");
55 * you may not use this file except in compliance with the License.
@@ -75,4 +75,16 @@ void ipV6Test() {
7575 () -> assertThat (response .status (), is (Status .OK_200 ))
7676 );
7777 }
78+
79+ @ Test
80+ void schemeCaseTest () {
81+ int port = webServer .port ();
82+ WebClient client = WebClient .builder ()
83+ .baseUri ("hTTp://localhost:" + port )
84+ .build ();
85+ ClientResponseTyped <String > response = client .get ()
86+ .path ("/uri" )
87+ .request (String .class );
88+ assertThat (response .status (), is (Status .OK_200 ));
89+ }
7890}
You can’t perform that action at this time.
0 commit comments