-
Notifications
You must be signed in to change notification settings - Fork 614
[client-v2] Send parameters in request body #2713
New issue
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -182,6 +182,13 @@ public Object parseValue(String value) { | |
| * SNI SSL parameter that will be set for each outbound SSL socket. | ||
| */ | ||
| SSL_SOCKET_SNI("ssl_socket_sni", String.class,""), | ||
|
|
||
| /** | ||
| * If parameters should be sent in request body. | ||
| * Note: work only with HTTP Compression | ||
| */ | ||
| USE_HTTP_FORM_REQUEST_FOR_QUERY("client.http.use_form_request_for_query", Boolean.class, "false"), | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. suggestion: Can we name the config or |
||
|
|
||
| ; | ||
|
|
||
| private static final Logger LOG = LoggerFactory.getLogger(ClientConfigProperties.class); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,8 +51,8 @@ public void writeTo(OutputStream outStream) throws IOException { | |
| throw new UnsupportedOperationException("Unsupported: writing compressed response to elsewhere"); | ||
| } | ||
|
|
||
| try { | ||
| httpEntity.writeTo(compressorStreamFactory.createCompressorOutputStream(compressionAlgo, outStream)); | ||
| try (OutputStream compressingStream = compressorStreamFactory.createCompressorOutputStream(compressionAlgo, outStream)){ | ||
| httpEntity.writeTo(compressingStream); | ||
| } catch (CompressorException e) { | ||
| throw new IOException("Failed to create compressing output stream", e); | ||
| } | ||
|
|
@@ -75,7 +75,8 @@ public void close() throws IOException { | |
|
|
||
| @Override | ||
| public long getContentLength() { | ||
| return httpEntity.getContentLength(); | ||
| // compressed request length is unknown event if it is a byte[] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think it should be |
||
| return isResponse ? httpEntity.getContentLength() : -1; | ||
| } | ||
|
|
||
| @Override | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it works with both HTTP compression and block level compression?