You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by lb...@apache.org on 2020/01/23 05:07:31 UTC

[camel-quarkus] 02/02: Fix #599 Document the need to set quarkus.native.add-all-charsets = true in HTTP extensions

This is an automated email from the ASF dual-hosted git repository.

lburgazzoli pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git

commit 7f9ec9cfe1c30765f3d554f561c28deabe0d5dff
Author: Peter Palaga <pp...@redhat.com>
AuthorDate: Tue Jan 21 11:49:07 2020 +0100

    Fix #599 Document the need to set quarkus.native.add-all-charsets = true in HTTP extensions
---
 docs/modules/ROOT/nav.adoc                         |  1 +
 docs/modules/ROOT/pages/extensions/ahc.adoc        | 28 ++++++++++++++++++++++
 docs/modules/ROOT/pages/extensions/http.adoc       | 27 +++++++++++++++++++++
 docs/modules/ROOT/pages/extensions/netty-http.adoc |  4 ++++
 .../ROOT/pages/extensions/platform-http.adoc       |  6 +++++
 .../pages/list-of-camel-quarkus-extensions.adoc    |  4 ++--
 docs/modules/ROOT/pages/native-mode.adoc           | 25 +++++++++++++++++++
 extensions/readme.adoc                             |  4 ++--
 8 files changed, 95 insertions(+), 4 deletions(-)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index 8bf3411..bcb2e35 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -1,6 +1,7 @@
 * xref:user-guide.adoc[User guide]
 ** xref:first-steps.adoc[First steps]
 ** xref:cdi.adoc[CDI]
+** xref:native-mode.adoc[Native mode]
 ** xref:examples.adoc[Examples]
 * xref:contributor-guide.adoc[Contributor guide]
 * xref:list-of-camel-quarkus-extensions.adoc[List of Camel Quarkus extensions]
diff --git a/docs/modules/ROOT/pages/extensions/ahc.adoc b/docs/modules/ROOT/pages/extensions/ahc.adoc
new file mode 100644
index 0000000..8ea06a3
--- /dev/null
+++ b/docs/modules/ROOT/pages/extensions/ahc.adoc
@@ -0,0 +1,28 @@
+[[ahc]]
+= Async HTTP Client (AHC) Extension
+
+*Since Camel Quarkus 1.0.0*
+
+The AHC component provides HTTP based endpoints for consuming external HTTP resources (as a client to call external
+servers using HTTP). It is using the https://github.com/AsyncHttpClient/async-http-client[Async Http Client library]
+under the hood.
+
+Maven users will need to add the following dependency to their `pom.xml` for this extension.
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel.quarkus</groupId>
+    <artifactId>camel-quarkus-ahc</artifactId>
+</dependency>
+----
+
+== Usage
+
+Please refer to the https://camel.apache.org/components/latest/ahc-component.html[AHC] component page.
+
+
+== Configuration
+
+* Check the xref:native-mode.adoc#charsets[Character encodings section] of the Native mode guide if you expect
+  your application to send or receive requests using non-default encodings.
diff --git a/docs/modules/ROOT/pages/extensions/http.adoc b/docs/modules/ROOT/pages/extensions/http.adoc
new file mode 100644
index 0000000..06ac77c
--- /dev/null
+++ b/docs/modules/ROOT/pages/extensions/http.adoc
@@ -0,0 +1,27 @@
+[[http]]
+= HTTP Extension
+
+*Since Camel Quarkus 1.0.0*
+
+The HTTP component provides HTTP based endpoints for calling external HTTP resources (as a client to call external
+servers using HTTP).
+
+Maven users will need to add the following dependency to their `pom.xml` for this extension.
+
+[source,xml]
+----
+<dependency>
+    <groupId>org.apache.camel.quarkus</groupId>
+    <artifactId>camel-quarkus-http</artifactId>
+</dependency>
+----
+
+== Usage
+
+Please refer to the https://camel.apache.org/components/latest/http-component.html[HTTP] component page.
+
+
+== Configuration
+
+* Check the xref:native-mode.adoc#charsets[Character encodings section] of the Native mode guide if you expect
+  your application to send or receive requests using non-default encodings.
diff --git a/docs/modules/ROOT/pages/extensions/netty-http.adoc b/docs/modules/ROOT/pages/extensions/netty-http.adoc
index 23595bb..df899d6 100644
--- a/docs/modules/ROOT/pages/extensions/netty-http.adoc
+++ b/docs/modules/ROOT/pages/extensions/netty-http.adoc
@@ -42,3 +42,7 @@ public class CamelRoute extends RouteBuilder {
 }
 ----
 
+== Configuration
+
+* Check the xref:native-mode.adoc#charsets[Character encodings section] of the Native mode guide if you expect
+  your application to send or receive requests using non-default encodings.
diff --git a/docs/modules/ROOT/pages/extensions/platform-http.adoc b/docs/modules/ROOT/pages/extensions/platform-http.adoc
index 64e00e4..01b60b0 100644
--- a/docs/modules/ROOT/pages/extensions/platform-http.adoc
+++ b/docs/modules/ROOT/pages/extensions/platform-http.adoc
@@ -97,3 +97,9 @@ from("platform-http:/upload/multipart?fileNameExtWhitelist=adoc,txt&httpMethodRe
 
 Also check the `quarkus.http.body.*` configuration options in
 https://quarkus.io/guides/all-config[Quarkus documentation], esp. `quarkus.http.body.handle-file-uploads`, `quarkus.http.body.uploads-directory` and `quarkus.http.body.delete-uploaded-files-on-end`.
+
+
+== Configuration
+
+* Check the xref:native-mode.adoc#charsets[Character encodings section] of the Native mode guide if you expect
+  your application to send or receive requests using non-default encodings.
diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index cdc5eee..7c22ea0 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -21,7 +21,7 @@ Number of Camel components: 60 in 51 JAR artifacts (0 deprecated)
 |===
 | Component | Since | Description
 
-| link:https://camel.apache.org/components/latest/ahc-component.html[AHC] (camel-quarkus-ahc) +
+| xref:extensions/ahc.adoc[AHC] (camel-quarkus-ahc) +
 `ahc:httpUri` | 1.2.0 | To call external HTTP services using Async Http Client.
 
 | link:https://camel.apache.org/components/latest/ahc-ws-component.html[AHC Websocket] (camel-quarkus-ahc-ws) +
@@ -102,7 +102,7 @@ Number of Camel components: 60 in 51 JAR artifacts (0 deprecated)
 | link:https://camel.apache.org/components/latest/ftps-component.html[FTPS] (camel-quarkus-ftp) +
 `ftps:host:port/directoryName` | 1.0.0-M1 | The \ftps (FTP secure SSL/TLS) component is used for uploading or downloading files from FTP servers.
 
-| link:https://camel.apache.org/components/latest/http-component.html[HTTP] (camel-quarkus-http) +
+| xref:extensions/http.adoc[HTTP] (camel-quarkus-http) +
 `http:httpUri` | 1.0.0 | For calling out to external HTTP servers using Apache HTTP Client 4.x.
 
 | link:https://camel.apache.org/components/latest/infinispan-component.html[Infinispan] (camel-quarkus-infinispan) +
diff --git a/docs/modules/ROOT/pages/native-mode.adoc b/docs/modules/ROOT/pages/native-mode.adoc
new file mode 100644
index 0000000..f1f8d73
--- /dev/null
+++ b/docs/modules/ROOT/pages/native-mode.adoc
@@ -0,0 +1,25 @@
+= Native mode
+
+Things to consider before you run your application in the native mode.
+
+[[charsets]]
+== Character encodings
+
+By default only a the following `Charsets` are available in the native mode (https://github.com/oracle/graal/blob/vm-19.3.0/substratevm/src/com.oracle.svm.core/src/com/oracle/svm/core/jdk/LocalizationFeature.java#L149-L163[source]):
+
+[code,text]
+----
+Charset.defaultCharset(), US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, UTF-16
+----
+
+If you expect your application to need any encoding not included in this set or if you see
+an `UnsupportedCharsetException` thrown in the native mode, please add the following entry to your
+`application.properties`:
+
+[code,properties]
+----
+quarkus.native.add-all-charsets = true
+----
+
+See also https://quarkus.io/guides/all-config#quarkus-core_quarkus.native.add-all-charsets[quarkus.native.add-all-charsets]
+in Quarkus documentation.
diff --git a/extensions/readme.adoc b/extensions/readme.adoc
index 2a78678..9a2f8f3 100644
--- a/extensions/readme.adoc
+++ b/extensions/readme.adoc
@@ -11,7 +11,7 @@ Number of Camel components: 60 in 51 JAR artifacts (0 deprecated)
 |===
 | Component | Since | Description
 
-| link:https://camel.apache.org/components/latest/ahc-component.html[AHC] (camel-quarkus-ahc) +
+| xref:extensions/ahc.adoc[AHC] (camel-quarkus-ahc) +
 `ahc:httpUri` | 1.2.0 | To call external HTTP services using Async Http Client.
 
 | link:https://camel.apache.org/components/latest/ahc-ws-component.html[AHC Websocket] (camel-quarkus-ahc-ws) +
@@ -92,7 +92,7 @@ Number of Camel components: 60 in 51 JAR artifacts (0 deprecated)
 | link:https://camel.apache.org/components/latest/ftps-component.html[FTPS] (camel-quarkus-ftp) +
 `ftps:host:port/directoryName` | 1.0.0-M1 | The \ftps (FTP secure SSL/TLS) component is used for uploading or downloading files from FTP servers.
 
-| link:https://camel.apache.org/components/latest/http-component.html[HTTP] (camel-quarkus-http) +
+| xref:extensions/http.adoc[HTTP] (camel-quarkus-http) +
 `http:httpUri` | 1.0.0 | For calling out to external HTTP servers using Apache HTTP Client 4.x.
 
 | link:https://camel.apache.org/components/latest/infinispan-component.html[Infinispan] (camel-quarkus-infinispan) +