diff --git a/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/NullPolicies.java b/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/NullPolicies.java index 8acd6df555..febb859491 100644 --- a/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/NullPolicies.java +++ b/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/NullPolicies.java @@ -1,3 +1,17 @@ +/* Copyright 2026 predic8 GmbH, www.predic8.com + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ + package com.predic8.membrane.core.interceptor.llmgateway; import com.predic8.membrane.core.exchange.Exchange; diff --git a/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/Policies.java b/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/Policies.java index 62419f0ed2..a6727b9fa1 100644 --- a/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/Policies.java +++ b/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/Policies.java @@ -1,3 +1,17 @@ +/* Copyright 2026 predic8 GmbH, www.predic8.com + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ + package com.predic8.membrane.core.interceptor.llmgateway; import com.predic8.membrane.core.exchange.Exchange; diff --git a/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/SystemPrompt.java b/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/SystemPrompt.java index a63c1535c0..95af02d399 100644 --- a/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/SystemPrompt.java +++ b/core/src/main/java/com/predic8/membrane/core/interceptor/llmgateway/SystemPrompt.java @@ -1,3 +1,17 @@ +/* Copyright 2026 predic8 GmbH, www.predic8.com + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ + package com.predic8.membrane.core.interceptor.llmgateway; import com.predic8.membrane.annot.MCAttribute; diff --git a/core/src/main/java/com/predic8/membrane/core/util/text/SerializationUtil.java b/core/src/main/java/com/predic8/membrane/core/util/text/SerializationUtil.java index 997c0deaf3..1d2c0e029f 100644 --- a/core/src/main/java/com/predic8/membrane/core/util/text/SerializationUtil.java +++ b/core/src/main/java/com/predic8/membrane/core/util/text/SerializationUtil.java @@ -20,6 +20,7 @@ import static com.predic8.membrane.core.http.MimeType.*; import static com.predic8.membrane.core.util.text.SerializationFunction.*; +import static com.predic8.membrane.core.util.text.ToTextSerializer.toText; import static java.lang.Character.*; import static java.nio.charset.StandardCharsets.*; @@ -150,7 +151,7 @@ public static String pathEncode(Object value) { public static String headerValueEncode(Object value) { if (value == null) return ""; - String s = value.toString(); + String s = toText(value); var out = new StringBuilder(s.length()); for (int i = 0; i < s.length(); i++) { @@ -165,4 +166,4 @@ public static String headerValueEncode(Object value) { return out.toString(); } -} \ No newline at end of file +} diff --git a/core/src/test/java/com/predic8/membrane/core/interceptor/llmgateway/provider/AbstractLLMRequestTest.java b/core/src/test/java/com/predic8/membrane/core/interceptor/llmgateway/provider/AbstractLLMRequestTest.java index af841ffed8..94f2465cd9 100644 --- a/core/src/test/java/com/predic8/membrane/core/interceptor/llmgateway/provider/AbstractLLMRequestTest.java +++ b/core/src/test/java/com/predic8/membrane/core/interceptor/llmgateway/provider/AbstractLLMRequestTest.java @@ -1,3 +1,17 @@ +/* Copyright 2026 predic8 GmbH, www.predic8.com + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ + package com.predic8.membrane.core.interceptor.llmgateway.provider; import com.predic8.membrane.core.exchange.Exchange; diff --git a/core/src/test/java/com/predic8/membrane/core/lang/ScriptingUtilsTest.java b/core/src/test/java/com/predic8/membrane/core/lang/ScriptingUtilsTest.java index 45fe8a506f..1b365b1563 100644 --- a/core/src/test/java/com/predic8/membrane/core/lang/ScriptingUtilsTest.java +++ b/core/src/test/java/com/predic8/membrane/core/lang/ScriptingUtilsTest.java @@ -1,3 +1,17 @@ +/* Copyright 2026 predic8 GmbH, www.predic8.com + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. */ + package com.predic8.membrane.core.lang; import com.predic8.membrane.core.router.DefaultRouter;