This is an automated email from the ASF dual-hosted git repository.
davsclaus pushed a commit to branch camel-4.4.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.4.x by this push:
new bb339e9eb26 Http stream (#15251)
bb339e9eb26 is described below
commit bb339e9eb26fa38b448d74bbb058c70d0a057f33
Author: Claus Ibsen <[email protected]>
AuthorDate: Wed Aug 21 13:17:07 2024 +0200
Http stream (#15251)
CAMEL-20938: http producer with disableStreamCache=true should use the raw
stream as-is
---
.../catalog/components/atmosphere-websocket.json | 2 +-
.../org/apache/camel/catalog/components/http.json | 2 +-
.../org/apache/camel/catalog/components/https.json | 2 +-
.../org/apache/camel/catalog/components/jetty.json | 2 +-
.../apache/camel/catalog/components/servlet.json | 2 +-
.../atmosphere/websocket/atmosphere-websocket.json | 2 +-
.../camel/http/common/HttpCommonEndpoint.java | 9 +-
.../org/apache/camel/component/http/http.json | 2 +-
.../org/apache/camel/component/http/https.json | 2 +-
.../apache/camel/component/http/HttpProducer.java | 16 +-
.../component/http/HttpDisableStreamCacheTest.java | 39 +++--
.../org/apache/camel/component/jetty12/jetty.json | 2 +-
.../apache/camel/component/servlet/servlet.json | 2 +-
.../AtmosphereWebsocketEndpointBuilderFactory.java | 192 ++++++++++-----------
.../endpoint/dsl/HttpEndpointBuilderFactory.java | 64 +++----
.../dsl/JettyHttp12EndpointBuilderFactory.java | 64 +++----
.../dsl/ServletEndpointBuilderFactory.java | 64 +++----
17 files changed, 244 insertions(+), 224 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/atmosphere-websocket.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/atmosphere-websocket.json
index b43a03eab81..c719854f0bd 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/atmosphere-websocket.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/atmosphere-websocket.json
@@ -45,7 +45,7 @@
"properties": {
"servicePath": { "index": 0, "kind": "path", "displayName": "Service
Path", "group": "common", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "Name of websocket
endpoint" },
"chunked": { "index": 1, "kind": "parameter", "displayName": "Chunked",
"group": "common", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": true, "description": "If this option is false the
Servlet will disable the HTTP streaming and set the content-length header on
the response" },
- "disableStreamCache": { "index": 2, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream from Servlet is cached or not
(Camel will read the stream into a in memory\/overflow to file, Stream caching)
cache. By default Camel will cache the [...]
+ "disableStreamCache": { "index": 2, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream is cached or not. The Camel
consumer (camel-servlet, camel-jetty etc.) will by default cache the input
stream to support reading it multiple times to [...]
"sendToAll": { "index": 3, "kind": "parameter", "displayName": "Send To
All", "group": "common", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": false, "description": "Whether to send to all
(broadcast) or send to a single receiver." },
"transferException": { "index": 4, "kind": "parameter", "displayName":
"Transfer Exception", "group": "common", "label": "common", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled and
an Exchange failed processing on the consumer side, and if the caused Exception
was send back serialized in the response as a
application\/x-java-serialized-object content type. On the [...]
"useStreaming": { "index": 5, "kind": "parameter", "displayName": "Use
Streaming", "group": "common", "label": "", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "To enable streaming to
send data as multiple text fragments." },
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/http.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/http.json
index d5daf32810f..10923173507 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/http.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/http.json
@@ -84,7 +84,7 @@
},
"properties": {
"httpUri": { "index": 0, "kind": "path", "displayName": "Http Uri",
"group": "common", "label": "common", "required": true, "type": "string",
"javaType": "java.net.URI", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The url of the HTTP
endpoint to call." },
- "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream from Servlet is cached or not
(Camel will read the stream into a in memory\/overflow to file, Stream caching)
cache. By default Camel will cache the [...]
+ "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream is cached or not. The Camel
consumer (camel-servlet, camel-jetty etc.) will by default cache the input
stream to support reading it multiple times to [...]
"headerFilterStrategy": { "index": 2, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "common (advanced)", "label":
"common,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter header to and from Camel message." },
"bridgeEndpoint": { "index": 3, "kind": "parameter", "displayName":
"Bridge Endpoint", "group": "producer", "label": "producer", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If the option is
true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the
endpoint's URI for request. You may also set the option throwExceptionOnFailure
to be false to let the HttpProd [...]
"connectionClose": { "index": 4, "kind": "parameter", "displayName":
"Connection Close", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Specifies whether a Connection Close header must be added to HTTP Request. By
default connectionClose is false." },
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/https.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/https.json
index 31fe13858d1..4922a72855d 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/https.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/https.json
@@ -84,7 +84,7 @@
},
"properties": {
"httpUri": { "index": 0, "kind": "path", "displayName": "Http Uri",
"group": "common", "label": "common", "required": true, "type": "string",
"javaType": "java.net.URI", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The url of the HTTP
endpoint to call." },
- "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream from Servlet is cached or not
(Camel will read the stream into a in memory\/overflow to file, Stream caching)
cache. By default Camel will cache the [...]
+ "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream is cached or not. The Camel
consumer (camel-servlet, camel-jetty etc.) will by default cache the input
stream to support reading it multiple times to [...]
"headerFilterStrategy": { "index": 2, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "common (advanced)", "label":
"common,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter header to and from Camel message." },
"bridgeEndpoint": { "index": 3, "kind": "parameter", "displayName":
"Bridge Endpoint", "group": "producer", "label": "producer", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If the option is
true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the
endpoint's URI for request. You may also set the option throwExceptionOnFailure
to be false to let the HttpProd [...]
"connectionClose": { "index": 4, "kind": "parameter", "displayName":
"Connection Close", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Specifies whether a Connection Close header must be added to HTTP Request. By
default connectionClose is false." },
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jetty.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jetty.json
index 8973eb637d4..387d7790096 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jetty.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jetty.json
@@ -69,7 +69,7 @@
"headerFilterStrategy": { "index": 1, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "common (advanced)", "label":
"common,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter header to and from Camel message." },
"httpBinding": { "index": 2, "kind": "parameter", "displayName": "Http
Binding", "group": "common (advanced)", "label": "common,advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.http.common.HttpBinding", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HttpBinding to control
the mapping between Camel message and HttpClient." },
"chunked": { "index": 3, "kind": "parameter", "displayName": "Chunked",
"group": "consumer", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": true, "description": "If this option is false the
Servlet will disable the HTTP streaming and set the content-length header on
the response" },
- "disableStreamCache": { "index": 4, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream from Servlet is cached or not
(Camel will read the stream into a in memory\/overflow to file, Stream caching)
cache. By default Camel will cache the [...]
+ "disableStreamCache": { "index": 4, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream is cached or not. The Camel
consumer (camel-servlet, camel-jetty etc.) will by default cache the input
stream to support reading it multiple times to [...]
"transferException": { "index": 5, "kind": "parameter", "displayName":
"Transfer Exception", "group": "common", "label": "common", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled and
an Exchange failed processing on the consumer side, and if the caused Exception
was send back serialized in the response as a
application\/x-java-serialized-object content type. On the [...]
"async": { "index": 6, "kind": "parameter", "displayName": "Async",
"group": "consumer", "label": "consumer", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": false, "description": "Configure the consumer to work in
async mode" },
"continuationTimeout": { "index": 7, "kind": "parameter", "displayName":
"Continuation Timeout", "group": "consumer", "label": "consumer", "required":
false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "30000", "description":
"Allows to set a timeout in millis when using Jetty as consumer (server). By
default Jetty uses 30000. You can use a value of = 0 to never expire. If a
timeout occurs then the request [...]
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/servlet.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/servlet.json
index 5b733605d92..f82ea8ea0ad 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/servlet.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/servlet.json
@@ -37,7 +37,7 @@
},
"properties": {
"contextPath": { "index": 0, "kind": "path", "displayName": "Context
Path", "group": "consumer", "label": "consumer", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
context-path to use" },
- "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream from Servlet is cached or not
(Camel will read the stream into a in memory\/overflow to file, Stream caching)
cache. By default Camel will cache the [...]
+ "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream is cached or not. The Camel
consumer (camel-servlet, camel-jetty etc.) will by default cache the input
stream to support reading it multiple times to [...]
"headerFilterStrategy": { "index": 2, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "common (advanced)", "label":
"common,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter header to and from Camel message." },
"httpBinding": { "index": 3, "kind": "parameter", "displayName": "Http
Binding", "group": "common (advanced)", "label": "common,advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.http.common.HttpBinding", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HttpBinding to control
the mapping between Camel message and HttpClient." },
"chunked": { "index": 4, "kind": "parameter", "displayName": "Chunked",
"group": "consumer", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": true, "description": "If this option is false the
Servlet will disable the HTTP streaming and set the content-length header on
the response" },
diff --git
a/components/camel-atmosphere-websocket/src/generated/resources/org/apache/camel/component/atmosphere/websocket/atmosphere-websocket.json
b/components/camel-atmosphere-websocket/src/generated/resources/org/apache/camel/component/atmosphere/websocket/atmosphere-websocket.json
index b43a03eab81..c719854f0bd 100644
---
a/components/camel-atmosphere-websocket/src/generated/resources/org/apache/camel/component/atmosphere/websocket/atmosphere-websocket.json
+++
b/components/camel-atmosphere-websocket/src/generated/resources/org/apache/camel/component/atmosphere/websocket/atmosphere-websocket.json
@@ -45,7 +45,7 @@
"properties": {
"servicePath": { "index": 0, "kind": "path", "displayName": "Service
Path", "group": "common", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "Name of websocket
endpoint" },
"chunked": { "index": 1, "kind": "parameter", "displayName": "Chunked",
"group": "common", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": true, "description": "If this option is false the
Servlet will disable the HTTP streaming and set the content-length header on
the response" },
- "disableStreamCache": { "index": 2, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream from Servlet is cached or not
(Camel will read the stream into a in memory\/overflow to file, Stream caching)
cache. By default Camel will cache the [...]
+ "disableStreamCache": { "index": 2, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream is cached or not. The Camel
consumer (camel-servlet, camel-jetty etc.) will by default cache the input
stream to support reading it multiple times to [...]
"sendToAll": { "index": 3, "kind": "parameter", "displayName": "Send To
All", "group": "common", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": false, "description": "Whether to send to all
(broadcast) or send to a single receiver." },
"transferException": { "index": 4, "kind": "parameter", "displayName":
"Transfer Exception", "group": "common", "label": "common", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled and
an Exchange failed processing on the consumer side, and if the caused Exception
was send back serialized in the response as a
application\/x-java-serialized-object content type. On the [...]
"useStreaming": { "index": 5, "kind": "parameter", "displayName": "Use
Streaming", "group": "common", "label": "", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "description": "To enable streaming to
send data as multiple text fragments." },
diff --git
a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
index 208c4e55690..46406bcc02b 100644
---
a/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
+++
b/components/camel-http-common/src/main/java/org/apache/camel/http/common/HttpCommonEndpoint.java
@@ -65,17 +65,16 @@ public abstract class HttpCommonEndpoint extends
DefaultEndpoint implements Head
description = "If this option is false the Servlet will disable
the HTTP streaming and set the content-length header on the response")
boolean chunked = true;
@UriParam(label = "common",
- description = "Determines whether or not the raw input stream
from Servlet is cached or not"
- + " (Camel will read the stream into a in
memory/overflow to file, Stream caching) cache."
- + " By default Camel will cache the Servlet input
stream to support reading it multiple times to ensure it Camel"
+ description = "Determines whether or not the raw input stream is
cached or not."
+ + " The Camel consumer (camel-servlet, camel-jetty
etc.) will by default cache the input stream to support reading it multiple
times to ensure it Camel"
+ " can retrieve all data from the stream. However
you can set this option to true when you for example need"
+ " to access the raw stream, such as streaming it
directly to a file or other persistent store."
+ " DefaultHttpBinding will copy the request input
stream into a stream cache and put it into message body"
+ " if this option is false to support reading the
stream multiple times."
+ " If you use Servlet to bridge/proxy an endpoint
then consider enabling this option to improve performance,"
+ " in case you do not need to read the message
payload multiple times."
- + " The http producer will by default cache the
response body stream. If setting this option to true,"
- + " then the producers will not cache the response
body stream but use the response stream as-is as the message body.")
+ + " The producer (camel-http) will by default
cache the response body stream. If setting this option to true,"
+ + " then the producers will not cache the response
body stream but use the response stream as-is (the stream can only be read
once) as the message body.")
boolean disableStreamCache;
@UriParam(label = "common",
description = "If enabled and an Exchange failed processing on
the consumer side, and if the caused Exception was send back serialized"
diff --git
a/components/camel-http/src/generated/resources/org/apache/camel/component/http/http.json
b/components/camel-http/src/generated/resources/org/apache/camel/component/http/http.json
index d5daf32810f..10923173507 100644
---
a/components/camel-http/src/generated/resources/org/apache/camel/component/http/http.json
+++
b/components/camel-http/src/generated/resources/org/apache/camel/component/http/http.json
@@ -84,7 +84,7 @@
},
"properties": {
"httpUri": { "index": 0, "kind": "path", "displayName": "Http Uri",
"group": "common", "label": "common", "required": true, "type": "string",
"javaType": "java.net.URI", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The url of the HTTP
endpoint to call." },
- "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream from Servlet is cached or not
(Camel will read the stream into a in memory\/overflow to file, Stream caching)
cache. By default Camel will cache the [...]
+ "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream is cached or not. The Camel
consumer (camel-servlet, camel-jetty etc.) will by default cache the input
stream to support reading it multiple times to [...]
"headerFilterStrategy": { "index": 2, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "common (advanced)", "label":
"common,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter header to and from Camel message." },
"bridgeEndpoint": { "index": 3, "kind": "parameter", "displayName":
"Bridge Endpoint", "group": "producer", "label": "producer", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If the option is
true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the
endpoint's URI for request. You may also set the option throwExceptionOnFailure
to be false to let the HttpProd [...]
"connectionClose": { "index": 4, "kind": "parameter", "displayName":
"Connection Close", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Specifies whether a Connection Close header must be added to HTTP Request. By
default connectionClose is false." },
diff --git
a/components/camel-http/src/generated/resources/org/apache/camel/component/http/https.json
b/components/camel-http/src/generated/resources/org/apache/camel/component/http/https.json
index 31fe13858d1..4922a72855d 100644
---
a/components/camel-http/src/generated/resources/org/apache/camel/component/http/https.json
+++
b/components/camel-http/src/generated/resources/org/apache/camel/component/http/https.json
@@ -84,7 +84,7 @@
},
"properties": {
"httpUri": { "index": 0, "kind": "path", "displayName": "Http Uri",
"group": "common", "label": "common", "required": true, "type": "string",
"javaType": "java.net.URI", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The url of the HTTP
endpoint to call." },
- "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream from Servlet is cached or not
(Camel will read the stream into a in memory\/overflow to file, Stream caching)
cache. By default Camel will cache the [...]
+ "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream is cached or not. The Camel
consumer (camel-servlet, camel-jetty etc.) will by default cache the input
stream to support reading it multiple times to [...]
"headerFilterStrategy": { "index": 2, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "common (advanced)", "label":
"common,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter header to and from Camel message." },
"bridgeEndpoint": { "index": 3, "kind": "parameter", "displayName":
"Bridge Endpoint", "group": "producer", "label": "producer", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If the option is
true, HttpProducer will ignore the Exchange.HTTP_URI header, and use the
endpoint's URI for request. You may also set the option throwExceptionOnFailure
to be false to let the HttpProd [...]
"connectionClose": { "index": 4, "kind": "parameter", "displayName":
"Connection Close", "group": "producer", "label": "producer", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Specifies whether a Connection Close header must be added to HTTP Request. By
default connectionClose is false." },
diff --git
a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
index 9d7eb7b0cbe..c5a7ef4670e 100644
---
a/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
+++
b/components/camel-http/src/main/java/org/apache/camel/component/http/HttpProducer.java
@@ -469,12 +469,16 @@ public class HttpProducer extends DefaultProducer {
* @throws IOException can be thrown
*/
protected <T> T executeMethod(HttpHost httpHost, HttpUriRequest
httpRequest, HttpClientResponseHandler<T> handler)
- throws IOException {
- HttpContext localContext = HttpClientContext.create();
+ throws IOException, HttpException {
+ HttpContext localContext;
if (httpContext != null) {
localContext = new BasicHttpContext(httpContext);
+ } else {
+ localContext = HttpClientContext.create();
}
- return httpClient.execute(httpHost, httpRequest, localContext,
handler);
+ // execute open that does not automatic close response input-stream
(this is done in exchange on-completion by Camel)
+ ClassicHttpResponse res = httpClient.executeOpen(httpHost,
httpRequest, localContext);
+ return handler.handleResponse(res);
}
/**
@@ -545,10 +549,8 @@ public class HttpProducer extends DefaultProducer {
} else {
if (entity.isStreaming()) {
if (getEndpoint().isDisableStreamCache()) {
- // write to in-memory buffer
- ByteArrayOutputStream bos = new
ByteArrayOutputStream(BUFFER_SIZE);
- entity.writeTo(bos);
- return bos.toByteArray();
+ // use the response as-is
+ return is;
} else {
int max =
getEndpoint().getComponent().getResponsePayloadStreamingThreshold();
if (max > 0) {
diff --git
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDisableStreamCacheTest.java
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDisableStreamCacheTest.java
index cc61ac4e559..f6510fcaa87 100644
---
a/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDisableStreamCacheTest.java
+++
b/components/camel-http/src/test/java/org/apache/camel/component/http/HttpDisableStreamCacheTest.java
@@ -16,8 +16,13 @@
*/
package org.apache.camel.component.http;
-import org.apache.camel.Exchange;
+import java.io.ByteArrayOutputStream;
+import java.io.InputStream;
+
+import org.apache.camel.RoutesBuilder;
+import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.http.handler.BasicValidationHandler;
+import org.apache.camel.util.IOHelper;
import org.apache.hc.core5.http.impl.bootstrap.HttpServer;
import org.apache.hc.core5.http.impl.bootstrap.ServerBootstrap;
import org.junit.jupiter.api.AfterEach;
@@ -25,7 +30,6 @@ import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import static org.apache.camel.http.common.HttpMethods.GET;
-import static org.apache.camel.test.junit5.TestSupport.assertIsInstanceOf;
import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertNotNull;
@@ -57,15 +61,30 @@ public class HttpDisableStreamCacheTest extends
BaseHttpTest {
@Test
public void httpDisableStreamCache() {
- Exchange exchange = template.request("http://localhost:"
- + localServer.getLocalPort() +
"/test/?disableStreamCache=true",
- exchange1 -> {
- });
+ Object out = template.requestBody("direct:start", (String) null);
+ assertEquals("camel rocks!",
context.getTypeConverter().convertTo(String.class, out));
+ }
+
+ @Override
+ protected RoutesBuilder createRouteBuilder() throws Exception {
+ return new RouteBuilder() {
+ @Override
+ public void configure() throws Exception {
+ from("direct:start").streamCaching("false")
+ .to("http://localhost:" + localServer.getLocalPort() +
"/test/?disableStreamCache=true")
+ .process(e -> {
+ InputStream is = (InputStream)
e.getMessage().getBody();
+ assertNotNull(is);
- byte[] arr = assertIsInstanceOf(byte[].class,
exchange.getMessage().getBody());
- assertNotNull(arr);
+ // we can only read the raw http stream once
+ ByteArrayOutputStream bos = new
ByteArrayOutputStream();
+ IOHelper.copy(is, bos);
- assertEquals("camel rocks!",
context.getTypeConverter().convertTo(String.class, arr));
- }
+ e.setVariable("newBody", bos.toString());
+ })
+ .setBody().variable("newBody");
+ }
+ };
+ }
}
diff --git
a/components/camel-jetty/src/generated/resources/org/apache/camel/component/jetty12/jetty.json
b/components/camel-jetty/src/generated/resources/org/apache/camel/component/jetty12/jetty.json
index 8973eb637d4..387d7790096 100644
---
a/components/camel-jetty/src/generated/resources/org/apache/camel/component/jetty12/jetty.json
+++
b/components/camel-jetty/src/generated/resources/org/apache/camel/component/jetty12/jetty.json
@@ -69,7 +69,7 @@
"headerFilterStrategy": { "index": 1, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "common (advanced)", "label":
"common,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter header to and from Camel message." },
"httpBinding": { "index": 2, "kind": "parameter", "displayName": "Http
Binding", "group": "common (advanced)", "label": "common,advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.http.common.HttpBinding", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HttpBinding to control
the mapping between Camel message and HttpClient." },
"chunked": { "index": 3, "kind": "parameter", "displayName": "Chunked",
"group": "consumer", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": true, "description": "If this option is false the
Servlet will disable the HTTP streaming and set the content-length header on
the response" },
- "disableStreamCache": { "index": 4, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream from Servlet is cached or not
(Camel will read the stream into a in memory\/overflow to file, Stream caching)
cache. By default Camel will cache the [...]
+ "disableStreamCache": { "index": 4, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream is cached or not. The Camel
consumer (camel-servlet, camel-jetty etc.) will by default cache the input
stream to support reading it multiple times to [...]
"transferException": { "index": 5, "kind": "parameter", "displayName":
"Transfer Exception", "group": "common", "label": "common", "required": false,
"type": "boolean", "javaType": "boolean", "deprecated": false, "autowired":
false, "secret": false, "defaultValue": false, "description": "If enabled and
an Exchange failed processing on the consumer side, and if the caused Exception
was send back serialized in the response as a
application\/x-java-serialized-object content type. On the [...]
"async": { "index": 6, "kind": "parameter", "displayName": "Async",
"group": "consumer", "label": "consumer", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": false, "description": "Configure the consumer to work in
async mode" },
"continuationTimeout": { "index": 7, "kind": "parameter", "displayName":
"Continuation Timeout", "group": "consumer", "label": "consumer", "required":
false, "type": "integer", "javaType": "java.lang.Long", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": "30000", "description":
"Allows to set a timeout in millis when using Jetty as consumer (server). By
default Jetty uses 30000. You can use a value of = 0 to never expire. If a
timeout occurs then the request [...]
diff --git
a/components/camel-servlet/src/generated/resources/org/apache/camel/component/servlet/servlet.json
b/components/camel-servlet/src/generated/resources/org/apache/camel/component/servlet/servlet.json
index 5b733605d92..f82ea8ea0ad 100644
---
a/components/camel-servlet/src/generated/resources/org/apache/camel/component/servlet/servlet.json
+++
b/components/camel-servlet/src/generated/resources/org/apache/camel/component/servlet/servlet.json
@@ -37,7 +37,7 @@
},
"properties": {
"contextPath": { "index": 0, "kind": "path", "displayName": "Context
Path", "group": "consumer", "label": "consumer", "required": true, "type":
"string", "javaType": "java.lang.String", "deprecated": false,
"deprecationNote": "", "autowired": false, "secret": false, "description": "The
context-path to use" },
- "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream from Servlet is cached or not
(Camel will read the stream into a in memory\/overflow to file, Stream caching)
cache. By default Camel will cache the [...]
+ "disableStreamCache": { "index": 1, "kind": "parameter", "displayName":
"Disable Stream Cache", "group": "common", "label": "common", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": false, "description":
"Determines whether or not the raw input stream is cached or not. The Camel
consumer (camel-servlet, camel-jetty etc.) will by default cache the input
stream to support reading it multiple times to [...]
"headerFilterStrategy": { "index": 2, "kind": "parameter", "displayName":
"Header Filter Strategy", "group": "common (advanced)", "label":
"common,advanced", "required": false, "type": "object", "javaType":
"org.apache.camel.spi.HeaderFilterStrategy", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HeaderFilterStrategy to
filter header to and from Camel message." },
"httpBinding": { "index": 3, "kind": "parameter", "displayName": "Http
Binding", "group": "common (advanced)", "label": "common,advanced", "required":
false, "type": "object", "javaType":
"org.apache.camel.http.common.HttpBinding", "deprecated": false, "autowired":
false, "secret": false, "description": "To use a custom HttpBinding to control
the mapping between Camel message and HttpClient." },
"chunked": { "index": 4, "kind": "parameter", "displayName": "Chunked",
"group": "consumer", "label": "", "required": false, "type": "boolean",
"javaType": "boolean", "deprecated": false, "autowired": false, "secret":
false, "defaultValue": true, "description": "If this option is false the
Servlet will disable the HTTP streaming and set the content-length header on
the response" },
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AtmosphereWebsocketEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AtmosphereWebsocketEndpointBuilderFactory.java
index 534c166e24a..6c3e4b000d4 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AtmosphereWebsocketEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/AtmosphereWebsocketEndpointBuilderFactory.java
@@ -79,22 +79,22 @@ public interface AtmosphereWebsocketEndpointBuilderFactory {
return this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option is a: <code>boolean</code> type.
*
@@ -110,22 +110,22 @@ public interface
AtmosphereWebsocketEndpointBuilderFactory {
return this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option will be converted to a <code>boolean</code>
* type.
@@ -992,22 +992,22 @@ public interface
AtmosphereWebsocketEndpointBuilderFactory {
return this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option is a: <code>boolean</code> type.
*
@@ -1023,22 +1023,22 @@ public interface
AtmosphereWebsocketEndpointBuilderFactory {
return this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option will be converted to a <code>boolean</code>
* type.
@@ -1432,22 +1432,22 @@ public interface
AtmosphereWebsocketEndpointBuilderFactory {
return this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option is a: <code>boolean</code> type.
*
@@ -1463,22 +1463,22 @@ public interface
AtmosphereWebsocketEndpointBuilderFactory {
return this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option will be converted to a <code>boolean</code>
* type.
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HttpEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HttpEndpointBuilderFactory.java
index 6f00dc0eb49..57692791e08 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HttpEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/HttpEndpointBuilderFactory.java
@@ -43,22 +43,22 @@ public interface HttpEndpointBuilderFactory {
return (AdvancedHttpEndpointBuilder) this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option is a: <code>boolean</code> type.
*
@@ -74,22 +74,22 @@ public interface HttpEndpointBuilderFactory {
return this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option will be converted to a <code>boolean</code>
* type.
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JettyHttp12EndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JettyHttp12EndpointBuilderFactory.java
index aa4e3ca4a82..89e5f57f2ad 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JettyHttp12EndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JettyHttp12EndpointBuilderFactory.java
@@ -78,22 +78,22 @@ public interface JettyHttp12EndpointBuilderFactory {
return this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option is a: <code>boolean</code> type.
*
@@ -109,22 +109,22 @@ public interface JettyHttp12EndpointBuilderFactory {
return this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option will be converted to a <code>boolean</code>
* type.
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ServletEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ServletEndpointBuilderFactory.java
index c015e486026..1375d4ddf95 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ServletEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/ServletEndpointBuilderFactory.java
@@ -42,22 +42,22 @@ public interface ServletEndpointBuilderFactory {
return (AdvancedServletEndpointBuilder) this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option is a: <code>boolean</code> type.
*
@@ -73,22 +73,22 @@ public interface ServletEndpointBuilderFactory {
return this;
}
/**
- * Determines whether or not the raw input stream from Servlet is
cached
- * or not (Camel will read the stream into a in memory/overflow to
file,
- * Stream caching) cache. By default Camel will cache the Servlet input
- * stream to support reading it multiple times to ensure it Camel can
- * retrieve all data from the stream. However you can set this option
to
- * true when you for example need to access the raw stream, such as
- * streaming it directly to a file or other persistent store.
- * DefaultHttpBinding will copy the request input stream into a stream
- * cache and put it into message body if this option is false to
support
- * reading the stream multiple times. If you use Servlet to
bridge/proxy
- * an endpoint then consider enabling this option to improve
- * performance, in case you do not need to read the message payload
- * multiple times. The http producer will by default cache the response
- * body stream. If setting this option to true, then the producers will
- * not cache the response body stream but use the response stream as-is
- * as the message body.
+ * Determines whether or not the raw input stream is cached or not. The
+ * Camel consumer (camel-servlet, camel-jetty etc.) will by default
+ * cache the input stream to support reading it multiple times to
ensure
+ * it Camel can retrieve all data from the stream. However you can set
+ * this option to true when you for example need to access the raw
+ * stream, such as streaming it directly to a file or other persistent
+ * store. DefaultHttpBinding will copy the request input stream into a
+ * stream cache and put it into message body if this option is false to
+ * support reading the stream multiple times. If you use Servlet to
+ * bridge/proxy an endpoint then consider enabling this option to
+ * improve performance, in case you do not need to read the message
+ * payload multiple times. The producer (camel-http) will by default
+ * cache the response body stream. If setting this option to true, then
+ * the producers will not cache the response body stream but use the
+ * response stream as-is (the stream can only be read once) as the
+ * message body.
*
* The option will be converted to a <code>boolean</code>
* type.