Re: HTTP/2 client and closed connections

2024-03-18 Thread Oleg Kalnichevski
On 18/03/2024 03:01, Jonathan Amir wrote: Thank you again for your detailed answer. I am wondering about the pros and cons of validateAfterInactivity vs. evictIdleConnections. validateAfterInactivity - I am guessing, for lack of any other information, that inactivity here is meant to be the

Re: Connection estabilishment metrics

2024-03-16 Thread Oleg Kalnichevski
codebase, > but also would require either a way to configure > DetachedSocketFactory or > use a custom HttpClientConnectionOperator instance. > > Thanks. > > Richard > > On Sat, Mar 16, 2024 at 11:54 AM Oleg Kalnichevski > wrote: > > > On Fri, 2024-03-15 at 21:56 +0100,

Re: Connection estabilishment metrics

2024-03-16 Thread Oleg Kalnichevski
On Fri, 2024-03-15 at 21:56 +0100, Richard Tippl wrote: > ... > There are 2 issues with this approach, as far as i can tell, I can't > measure these times separately, and in the newest alpha version of > 5.4 the > interface I'm using has been deprecated and replaced by the >

Re: HTTP/2 client and closed connections

2024-03-15 Thread Oleg Kalnichevski
to decide, what is more preferable, a certain performance hit due to the validate-after-inactivity check or an occasional i/o exception due to the connection being stale. What connections are considered idle is entirely up to the caller. Oleg On Wed, Mar 13, 2024 at 5:14 AM Oleg Kalnichevski

Re: HTTP/2 client and closed connections

2024-03-13 Thread Oleg Kalnichevski
On Tue, 2024-03-12 at 21:58 -0400, Jonathan Amir wrote: > Hello, > I am building an HTTP/2 only client for running multiple requests in > parallel. > I understand that there is no connection pool internally, rather > there is > one connection per host. For simplicity, let's say all my requests go

Re: Websocket client using ReactiveResponseConsumer and ReactiveEntityProducer

2024-03-12 Thread Oleg Kalnichevski
On Tue, 2024-03-12 at 10:32 -0400, Sneha Murganoor wrote: > Hi, > > I am writing a websocket client with APIs ReactiveResponseConsumer > and > ReactiveEntityProducer. Once the websocket server completes the > handshake > by upgrading connection and returning 101. We do get Http status code > and

[ANNOUNCEMENT] HttpComponents Client 5.4-alpha2 Released

2024-03-11 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.4-alpha2 release of HttpComponents HttpClient. This is the second and likely the last ALPHA release in the 5.3 release series. It finalizes the new Cache API introduced in the previous ALPHA release and also improves TLS customization for

Re: ErrorStream already closed reading response.getBody using FutureRequestExecutionService

2024-02-26 Thread Oleg Kalnichevski
On Mon, 2024-02-26 at 14:45 +0100, Volker Hochstein wrote: > Hi, > > I am triggering two http requests in parallel using > FutureRequestExecutionService. > I am trying to read response body in Callback completed: > EntityUtils.toString(response.getEntity(), StandardCharsets.UTF_8) > However, I

Re: Missing settings for HttpClient timeouts ?

2024-02-22 Thread Oleg Kalnichevski
On 22/02/2024 13:16, Óscar Frías Barranco wrote: Thanks for your reply. I have activated HttpClient logs and it looks like, at least in this case, time is spent in DNS resolution. Is there a way to set a timeout for this (at the HttpClient level if that's possible, or at the OS level

Re: Missing settings for HttpClient timeouts ?

2024-02-22 Thread Oleg Kalnichevski
On 22/02/2024 11:53, Óscar Frías Barranco wrote: Hello. I am trying to configure HttpClient to validate a list of URLs and I don't want it to take longer than 10 seconds for each URL. I have been searching for all available timeout settings in HttpClient but, even after setting them all to 2

[ANNOUNCEMENT] HttpComponents Core 5.3-alpha2 released

2024-02-14 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.3-alpha2 release of HttpComponents Core. This is the second and likely the last ALPHA release in the 5.3 release series. It finalizes the API changes introduced in the previous ALPHA release and also improves Message Parsing APIs and

Re: How to Send a Post Request with Plaintext Password without Retaining the Password in Memory

2024-02-13 Thread Oleg Kalnichevski
On Tue, 2024-02-13 at 09:52 +, Theodore Tan wrote: > Hello, >   > I’m using HttpClient 5.2.1 for my application, specifically the > HttpPost object to send a POST request and authenticate to an > OAuth2.0 server using grant_type=password. > Since grant_type=password requires a plaintext

[ANNOUNCEMENT] HttpComponents Client 5.3.1 GA Released

2024-01-25 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.3.1 GA release of HttpComponents HttpClient. This is a maintenance release that fixes several minor defects and a regression in the Fluent module causing the response body truncation discovered since release 5.3. Download -

[ANNOUNCEMENT] HttpComponents Client 5.4-alpha1 Released

2023-12-29 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.4-alpha1 release of HttpComponents HttpClient. This is the first ALPHA release in the 5.4 release series that improves HTTP protocol support by ensuring conformance to the latest HTTP specification (RFC 9110, RFC 9111, RFC 7616, RFC

[ANNOUNCEMENT] HttpComponents Core 5.3-alpha1 released

2023-12-26 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.3-alpha1 release of HttpComponents Core. This is the first ALPHA release in the 5.3 release series that improves HTTP protocol support by ensuring conformance to the latest HTTP specification (RFC 9110 and RFC 9112) and also ensuring

[ANNOUNCEMENT] HttpComponents Client 5.3 GA Released

2023-12-07 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.3 GA release of HttpComponents HttpClient. This is the first GA release in the 5.3 release series. This release finalizes the 5.3 APIs and also includes all bug fixes from the 5.2 release branch. The 5.3 release series introduces

[ANNOUNCEMENT] HttpComponents Client 5.2.3 GA Released

2023-12-04 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.2.3 GA release of HttpComponents HttpClient. This is a maintenance release that fixes a regression introduced in 5.2.2 that causes all requests over a TLS connection fail with a runtime exception and upgrades HttpCore to version

[ANNOUNCEMENT] HttpComponents Core 5.2.4 GA released

2023-12-04 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.2.4 GA release of HttpComponents Core. This is a maintenance release that corrects a major defect discovered since release 5.2.3 that can lead to an H2 connection failing at runtime with the message "Frame size exceeds maximum" when

Re: Authentication headers are not dropped on redirects

2023-11-28 Thread Oleg Kalnichevski
On Mon, 2023-11-27 at 18:32 +, Maksim Chernyshenko wrote: > Good day, everyone! > > Me and my team are in the process of migration to httpclient v5.2 > from v4.5 and we are currently hindered by the following issue: > httpclient5 is not dropping Authentication headers when following >

Re: DefaultCacheInvalidator Mistake

2023-11-14 Thread Oleg Kalnichevski
On 14/11/2023 10:28, Naber, Peter wrote: Hi, I get this WARN Message by using the org.apache.hc.client5.http.impl.cache.DefaultCacheInvalidator 14 Nov. 2023 09:17:06.445- DefaultCacheInvalidator [ips2edition-pages-article] WARN org.apache.hc.client5.http.impl.cache.DefaultCacheInvalidator

Re: Fluent API: Retries for specific HTTP status codes

2023-11-13 Thread Oleg Kalnichevski
On 13/11/2023 10:06, Konrad Windszus wrote: On 13. Nov 2023, at 09:43, Oleg Kalnichevski wrote: The response body processing takes place outside the protocol handling chain and there is nothing we can do about it. IIRC this isn’t the case with https://hc.apache.org/httpcomponents-client

Re: Fluent API: Retries for specific HTTP status codes

2023-11-13 Thread Oleg Kalnichevski
On 10/11/2023 15:31, Konrad Windszus wrote: HI, I am using the Fluent API with HttpClient 4.5 like this: Executor.newInstance(myClient).execute(myRequest).handleResponse(myResponseHandler) [1] Although “myClient" is setup with the default HttpRequestRetryHandler this isn’t triggered when

Re: RevalidateCacheEntry merges headers from cache which do not exist any more

2023-11-09 Thread Oleg Kalnichevski
Responses upon Validation) Oleg Thank you for clarifying doubts, Sneha On Wed, Nov 8, 2023 at 11:54 AM Oleg Kalnichevski wrote: On 08/11/2023 15:58, Sneha Murganoor wrote: Thanks for the reply. Yes we understand that when an entry in cache is stale, we make conditional get requests. We

Re: RevalidateCacheEntry merges headers from cache which do not exist any more

2023-11-08 Thread Oleg Kalnichevski
/CachingExec.java#L317 and decide that i build unconditional get request. Thanks Sneha On Tue, Nov 7, 2023 at 2:18 PM Oleg Kalnichevski wrote: On 07/11/2023 17:27, Sneha Murganoor wrote: Use case: We have Caching Apache Http Client calling s3 backend. When metadata (http headers) changes

Re: RevalidateCacheEntry merges headers from cache which do not exist any more

2023-11-07 Thread Oleg Kalnichevski
On 07/11/2023 17:27, Sneha Murganoor wrote: Use case: We have Caching Apache Http Client calling s3 backend. When metadata (http headers) changes with no changes in payload, s3 sends us "304 NOT Modified" status code with current modified headers. But apache reading 304 merges previous headers

Re: protocol problem in MultiPartAsyncEntityProducer implementation

2023-10-19 Thread Oleg Kalnichevski
On 19/10/2023 13:30, vostinar laurian wrote: Hi, I implemented a MultiPartAsyncEntityProducer, my code is: here | | | servoy-extensions/com.servoy.extensions... | My code is based on FileEntityProducer , just that instead of writing just a file content, it writes more stuff. It seems

[ANNOUNCEMENT] HttpComponents Core 5.2.3 GA released

2023-09-25 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.2.3 GA release of HttpComponents Core. This is a maintenance release that corrects several defects discovered since release 5.2.2 including a major defect that can cause non- blocking character-based consumers to enter an invalid state

Re: Question about usage with Server-Sent events

2023-09-24 Thread Oleg Kalnichevski
On Tue, 2023-09-19 at 22:17 +0200, Oleg Kalnichevski wrote: > On Tue, 2023-09-19 at 18:31 +0200, Damien Urruty wrote: > > Hello, > > > > We are using Apache HttpClient 5.2.1 to connect to potentially > > different > > servers, and for each of them, we can have a m

Re: Question about usage with Server-Sent events

2023-09-19 Thread Oleg Kalnichevski
On Tue, 2023-09-19 at 18:31 +0200, Damien Urruty wrote: > Hello, > > We are using Apache HttpClient 5.2.1 to connect to potentially > different > servers, and for each of them, we can have a mix of "classic" HTTP > requests > and long connections to receive Server-Sent Events. In some cases, we >

Re: How to enable TLS 1.3 post-handshake authentication with HTTP 1.1

2023-09-12 Thread Oleg Kalnichevski
On Tue, 2023-09-12 at 18:00 +0200, Torsten Krah wrote: > Am Dienstag, dem 12.09.2023 um 17:54 +0200 schrieb Oleg Kalnichevski: > > Confirms how? HttpClient has always been using JSSE APIs and > > nothing > > else. Like it does now. > > I said the old HttpComponents

Re: How to enable TLS 1.3 post-handshake authentication with HTTP 1.1

2023-09-12 Thread Oleg Kalnichevski
On Tue, 2023-09-12 at 17:51 +0200, Torsten Krah wrote: > Am Dienstag, dem 12.09.2023 um 17:42 +0200 schrieb Oleg Kalnichevski: > > http://svn.apache.org/viewvc/httpcomponents/oac.hc3x/trunk/src/java/org/apache/commons/httpclient/protocol/SSLProtocolSocketFactory.java?revision=14225

Re: How to enable TLS 1.3 post-handshake authentication with HTTP 1.1

2023-09-12 Thread Oleg Kalnichevski
On Tue, 2023-09-12 at 17:36 +0200, Torsten Krah wrote: > > > > You do not. > > Looking at [1] the http classes (e.g. [2]) do not leverage the > java.net.http classes, so at least on that part I do remember right, > imho. >

Re: How to enable TLS 1.3 post-handshake authentication with HTTP 1.1

2023-09-12 Thread Oleg Kalnichevski
On Tue, 2023-09-12 at 15:06 +, Michael Osipov wrote: > On 2023/09/12 14:53:52 Torsten Krah wrote: > > Am Dienstag, dem 12.09.2023 um 14:39 + schrieb Michael Osipov: > > > How, did you expect us to write an custom JSSE provider? > > > > The old pre 4.x http components had their own http

Re: org.apache.http.concurrent.FutureCallback: Exception handling

2023-08-31 Thread Oleg Kalnichevski
On Thu, 2023-08-31 at 11:32 +0200, Konrad Windszus wrote: > Hi Oleg, > Thanks for the input. > > > On 31. Aug 2023, at 11:17, Oleg Kalnichevski > > wrote: > > > > On Thu, 2023-08-31 at 10:08 +0200, Konrad Windszus wrote: > > > Hi, > &

Re: org.apache.http.concurrent.FutureCallback: Exception handling

2023-08-31 Thread Oleg Kalnichevski
On Thu, 2023-08-31 at 10:08 +0200, Konrad Windszus wrote: > Hi, > I can pass a FutureCallback implementation to > HttpAsyncClient.execute(…). > However the javadoc at > https://hc.apache.org/httpcomponents-core-5.1.x/current/httpcore5/apidocs/org/apache/hc/core5/concurrent/FutureCallback.html >  

Re: HttpEntity cleanup - possible bugs?

2023-08-31 Thread Oleg Kalnichevski
On Wed, 2023-08-30 at 16:33 -0400, Brent Putman wrote: > > On 8/30/23 5:00 AM, Oleg Kalnichevski wrote: > > > > Again. It is called to make sure the entity has been fully consumed > > and > > the underlying connection the entity has been streaming its conte

Re: HttpEntity cleanup - possible bugs?

2023-08-30 Thread Oleg Kalnichevski
On Tue, 2023-08-29 at 18:55 -0400, Brent Putman wrote: > > On 8/29/23 3:48 AM, Oleg Kalnichevski wrote: > > > > This code is not about connection clean-up, this code is about > > connection re-use. The resource clean-up is ensured by closing out > > the > >

Re: HttpEntity cleanup - possible bugs?

2023-08-29 Thread Oleg Kalnichevski
On Mon, 2023-08-28 at 16:48 -0400, Brent Putman wrote: > Hi, > > Our project was reviewing a reported resource cleanup issue for > leaks, > and we came across a couple of possibly questionable things in the > way > things are handled in CloseableHttpClient for the response handler > variant

[ANNOUNCEMENT] HttpComponents Client 5.3-alpha1 Released (corrected)

2023-08-21 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.3-alpha1 release of HttpComponents HttpClient. This is the first release in the 5.3 release series that introduces support for the Bearer authentication scheme (RFC 6750) and deprecates NTLM and GSS based experimental authentication

[ANNOUNCEMENT] HttpComponents Client 5.2.1 GA Released

2023-08-21 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.3-alpha1 release of HttpComponents HttpClient. This is the first release in the 5.3 release series that introduces support for the Bearer authentication scheme (RFC 6750) and deprecates NTLM and GSS based experimental authentication

Re: How Do I Set SNI(Server Name Indentification)

2023-08-12 Thread Oleg Kalnichevski
On Sat, 2023-08-12 at 12:27 +0300, Petar Tahchiev wrote: > Yes, > like I already mentioned it is not a SNI problem. > > Because I was using PoolingAsyncClientConnectionManager I decided to > replace it with PoolingHttpClientConnectionManager and it worked. So > the > problem is not in the SNI but

Re: How Do I Set SNI(Server Name Indentification)

2023-08-12 Thread Oleg Kalnichevski
I see no evidence of SNI not working: try (final CloseableHttpAsyncClient client = HttpAsyncClients.custom() .build()) { client.start(); final HttpHost endpoint = new HttpHost("https", InetAddress.getByName("www.google.com"), "www.google.ch", 443); final HttpClientContext

Re: How Do I Set SNI(Server Name Indentification)

2023-08-11 Thread Oleg Kalnichevski
.core.ApplicationFilterChain.doFilter(ApplicationF > ilterChain.java:162) > at > org.springframework.web.filter.CharacterEncodingFilter.doFilterIntern > al(CharacterEncodingFilter.java:201) > at > org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerR > equestFilter.java:117) &g

Re: How Do I Set SNI(Server Name Indentification)

2023-08-11 Thread Oleg Kalnichevski
On Thu, 2023-08-10 at 22:40 +0300, Petar Tahchiev wrote: > Hmm, > > I tried now setting the Host header: > > > httpGet.setHeader("Host", "localhost"); > > This is wrong. You should not be doing that. You should let HttpClient generate the Host header when appropriate. HttpClient will also

Re: HTTP/2 Support with HttpClient Classic API

2023-07-22 Thread Oleg Kalnichevski
tation would be. > > > > In order to track this, I have opened > > https://issues.apache.org/jira/browse/HTTPCLIENT-2286. > > > > Thanks, > > Konrad > > > > > On 20. Jul 2023, at 20:59, Oleg Kalnichevski >

Re: HTTP/2 Support with HttpClient Classic API

2023-07-20 Thread Oleg Kalnichevski
On Thu, 2023-07-20 at 15:13 +0200, Konrad Windszus wrote: > Hi, > Currently from reading > https://hc.apache.org/httpcomponents-client-5.2.x/ it seems that > there are no limitations with support of HTTP/2, on the other hand > only Async API has explicit HTTP/2 examples mentioned in >

HttpClient 5.2.2 release plans; Re: [ANNOUNCEMENT] HttpComponents Core 5.2.2 GA released

2023-07-18 Thread Oleg Kalnichevski
On Tue, 2023-07-18 at 10:22 +0530, Sandeep Gaur wrote: > Hi All, > > We need to update httpclient with the fix of > https://issues.apache.org/jira/browse/HTTPCORE-751, can someone > please > confirm the release plan of httpclient 5.2.2. > There are no immediate plans to release HttpClient

Re: Preemptive Basic auth with Apache HttpClient 5.2

2023-07-14 Thread Oleg Kalnichevski
httpget.getUri()); for (int i = 0; i < 3; i++) { httpclient.execute(httpget, response -> { System.out.println(""); System.out.println(httpget + "->" + new StatusLine(response)); Entity

Re: Preemptive Basic auth with Apache HttpClient 5.2

2023-07-13 Thread Oleg Kalnichevski
HttpClient.execute() directly. > And why? What stops you from manipulating the execution context from an interceptor? Oleg > Giovanni > > From: Oleg Kalnichevski > Date: Thursday, 13 July 2023 at 17:03 > To: HttpClient User Discussion > Subject: Re: Preemptive Basic a

Re: Preemptive Basic auth with Apache HttpClient 5.2

2023-07-13 Thread Oleg Kalnichevski
On Thu, 2023-07-13 at 15:27 +, D'Ascola, Giovanni wrote: >  Is there a way to implement preemptive basic authentication with > Apache HttpClient 5.2 using a HttpRequestInterceptor similar to how > it's done here (accepted > response)

Re: Seeing randomly DeadlineTimeoutException exception

2023-06-29 Thread Oleg Kalnichevski
On Thu, 2023-06-29 at 15:29 +0530, sreenivas somavarapu wrote: > Hi Oleg, > > The error message is misleading (See below). It looks like Actual > error is because it is unable to acquire lock (From the exception > provided earlier Line 27 of StrictConnPool.java). Timeout of 0 means > don't wait

Re: Seeing randomly DeadlineTimeoutException exception

2023-06-28 Thread Oleg Kalnichevski
    .disableRedirectHandling() >     .disableAuthCaching() >     .evictExpiredConnections() >     > .evictIdleConnections(TimeValue.ofMilliseconds(6)); > >     httpClient = hacBuilder.build(); >     httpClient.start(); > >

Re: Seeing randomly DeadlineTimeoutException exception

2023-06-27 Thread Oleg Kalnichevski
ager] ex-02 endpoint lease failed httpclient.log.06-27-23.1:2023-06-27 14:38:04,091 DEBUG [org.apache.hc.client5.http.impl.async.InternalAbstractHttpAsyncClient] ex-02 request failed: Deadline: +292278994-08-17T07:12:55.807+, 9223370348978091716 MILLISECONDS overdue

Re: Seeing randomly DeadlineTimeoutException exception

2023-06-27 Thread Oleg Kalnichevski
or any exception of any kind in the logs. What am I supposed to do with these logs? oleg@ok2c:~/src/misc/httpclienttracelogs$ grep -i Timeout * oleg@ok2c:~/src/misc/httpclienttracelogs$ grep -i exception * oleg@ok2c:~/src/misc/httpclienttracelogs$ Oleg > > On Mon, Jun 26, 2023 at 9:58 P

Re: Seeing randomly DeadlineTimeoutException exception

2023-06-26 Thread Oleg Kalnichevski
On Mon, 2023-06-26 at 18:20 +0530, sreenivas somavarapu wrote: > Hi Oleg, > > > > Hope you were able to access logs provided and in the process of > analyzing > them.  No, I was not. The URL was access protected. I requested access but no one reacted. Anyway, it is irrelevant now. Please

Re: Question about max connections

2023-06-26 Thread Oleg Kalnichevski
On Mon, 2023-06-26 at 11:13 +0200, Joan grupoventus wrote: > Hi Oleg, > > > > So it works perfectly, 1 request sent OK and the another fails > because max_connections was exceeded. > > It seems that changing the maxConnectionPerRoute does not work on > runtime ONLY when the concurrency policy

Re: Question about max connections

2023-06-23 Thread Oleg Kalnichevski
max is > always 0. > > But the question is if I can modify the per route max limit on the > fly, or after modifying it I need to restart the pool to apply the > new value. > One can modify the per route max at runtime. Oleg > Thanks, > > Joan. > > -Original Mess

Re: Question about max connections

2023-06-23 Thread Oleg Kalnichevski
On Fri, 2023-06-23 at 11:23 +0200, Joan grupoventus wrote: > Hello, > > We have an async http pool with LAX concurrency (httpclient 5.2.1): > this.phccm = > PoolingAsyncClientConnectionManagerBuilder.create().setPoolConcurrenc > yPolicy(PoolConcurrencyPolicy.LAX).build(); > > We set the max

Re: Seeing randomly DeadlineTimeoutException exception

2023-06-23 Thread Oleg Kalnichevski
On Thu, 2023-06-22 at 22:46 +0530, sreenivas somavarapu wrote: > Hi Oleg, > > PFA httpclient logs attached. I have provided 4 instances of errors > along > with a time stamp (due to file sizes attached to respective log files > in zip file) which are below during our load test. Please let me know

[ANNOUNCEMENT] HttpComponents Core 5.2.2 GA released

2023-06-21 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.2.2 GA release of HttpComponents Core. This is a maintenance release that corrects several defects discovered since release 5.2.1 including a major defect that can cause HTTP/2 connections allocate excessive amount of memory for their

Re: Seeing randomly DeadlineTimeoutException exception

2023-06-20 Thread Oleg Kalnichevski
On Tue, 2023-06-20 at 22:12 +0530, sreenivas somavarapu wrote: > Hi Team, > > I am running a lod test using an Async HTTPClient. Even within 1 > minutes of > load test randomly getting below exception causing transaction to > fail. > Using most of the defaults for HTTPClient with below

Re: Httpclient issue with https "org.apache.hc.core5.http2.impl.nio.ClientH2StreamMultiplexer"

2023-05-12 Thread Oleg Kalnichevski
On Fri, 2023-05-12 at 15:25 +0100, thc...@gmail.com wrote: > > > On 12/05/2023 14:47, Oleg Kalnichevski wrote: > > On Fri, 2023-05-12 at 14:17 +0100, thc...@gmail.com wrote: > > > > > > > > > On 12/05/2023 13:27, Oleg Kalnichevski wrote: >

Re: Httpclient issue with https "org.apache.hc.core5.http2.impl.nio.ClientH2StreamMultiplexer"

2023-05-12 Thread Oleg Kalnichevski
On Fri, 2023-05-12 at 14:17 +0100, thc...@gmail.com wrote: > > > On 12/05/2023 13:27, Oleg Kalnichevski wrote: > > On Fri, 2023-05-12 at 11:48 +0200, Joan grupoventus wrote: > > > Hi Oleg, > > > > > > After changing this method from: > > > pr

Re: Httpclient issue with https "org.apache.hc.core5.http2.impl.nio.ClientH2StreamMultiplexer"

2023-05-12 Thread Oleg Kalnichevski
g forward: 1. You manage to reproduce the issue in an isolated environment that I can replicate locally (Docker image or a unit test).  2. You manage to find out the cause of FrameOutputBuffer growing past the max frame length in your local environment and propose a fix, which I can review a

Re: Httpclient issue with https "org.apache.hc.core5.http2.impl.nio.ClientH2StreamMultiplexer"

2023-05-12 Thread Oleg Kalnichevski
On Thu, 2023-05-11 at 19:17 +0200, Joan grupoventus wrote: > Hello Oleg, > > We are finding an issue in a new installation of our app that is > using httpclient5-5.2.1 and httpcore5-5.2. > > Our app is a proxy that receives protobuf requests that are sent to > an amazon endpoint that is

Re: Problem with SharedOutputBuffer while inserting data chunck of 1024 bytes

2023-03-30 Thread Oleg Kalnichevski
hangs. > *Note*: I have used testcode present in *testBasis* function > All right. Given that you refuses to listen I do not think I can help you any further. Oleg > > Regards, > Sreenivas > > > On Thu, Mar 30, 2023, 10:48 PM Oleg Kalnichevski > wrote: > >

Re: Problem with SharedOutputBuffer while inserting data chunck of 1024 bytes

2023-03-30 Thread Oleg Kalnichevski
o less that 1024 (I.e., 1023 or smaller > > and no > > flush call used). > > > > This implies that even tough enough capacity is there buffer is > > unable to > > take data of chuncks 1024 or above bytes. > > > > Regards > > Sreenivas > >

Re: Problem with SharedOutputBuffer while inserting data chunck of 1024 bytes

2023-03-30 Thread Oleg Kalnichevski
ty we will not be able to write data into > buffer > if data we are trying to write is of 1024 bytes and less that buffer > capacity available. > > Regards, > Sreenivas > > > On Thu, Mar 30, 2023, 3:01 PM Oleg Kalnichevski > wrote: > > > I already answ

Re: Problem with SharedOutputBuffer while inserting data chunck of 1024 bytes

2023-03-30 Thread Oleg Kalnichevski
I already answered your question some while ago and explained what you were doing incorrectly. You basically dismissed my answer and keep on posting the same query over and over again. This is not going to help. Oleg On Thu, 2023-03-30 at 14:39 +0530, sreenivas somavarapu wrote: > Hi Team, >

Re: Questions for migration of httpclient-win to httpclient5-win

2023-03-11 Thread Oleg Kalnichevski
On Sat, 2023-03-11 at 19:18 +0530, Sandeep Kulkarni wrote: > Hi Oleg, > > Thanks for the explanation. From it I understand that earlier code > did not > do anything and it was a mistake to include it. > > NTLM authentication is not used anymore, so it can be safely removed. > However, I don't

Re: Questions for migration of httpclient-win to httpclient5-win

2023-03-11 Thread Oleg Kalnichevski
On Fri, 2023-03-10 at 21:23 +0530, Sandeep Kulkarni wrote: > Hi, > > I am looking for a migration guide for httpclient-win to httpclient5- > win. I > could not find one at > https://hc.apache.org/httpcomponents-client-5.2.x/migration-guide/index.html > > Also I am looking for any reason(s) for

Re: AbstractClassicEntityProducer usage and big POST data around 64kb seems hanging

2023-03-06 Thread Oleg Kalnichevski
ocks if it is unable to store input data until the internal buffer gets flushed and space in it frees up, which is what is it supposed to do. If you think SharedOutputBuffer is wrong, please just use your own custom buffer implementation. Oleg > Regards, > Sreenivas > > On Mon, Mar

Re: AbstractClassicEntityProducer usage and big POST data around 64kb seems hanging

2023-03-06 Thread Oleg Kalnichevski
= -1; >     while ((l = inputStream.read(tmp)) != -1) { >     System.out.println("Writing Data"); >     System.out.println(l); >     outputStream.write(tmp, 0, l); >     System.out.println("Wrote Data"); >     } > >

Re: AbstractClassicEntityProducer usage and big POST data around 64kb seems hanging

2023-03-06 Thread Oleg Kalnichevski
On Mon, 2023-03-06 at 16:26 +0530, sreenivas somavarapu wrote: > Hi Team, > > We are using AbstractClassicEntityProducer with a customization of > storing > / computing contentLength as well which works fine if we have small > POST > data, but when POST data is big (for example 64 KB), it seems >

Re: Connection: Close header in response and Async HTTPClient api behaviour

2023-02-24 Thread Oleg Kalnichevski
ero length request body. Oleg > Earlier in 4.x we had HttpEntityEnclosingRequestBase based on which > we > could determine what method accepts body and what method doesn't, but > with > 5.x (Both Synchronous and Asynchronous) I am unable to find any way. > > Regards, > Sreenivas

Re: Connection: Close header in response and Async HTTPClient api behaviour

2023-02-22 Thread Oleg Kalnichevski
On Thu, 2023-02-23 at 02:11 +0530, sreenivas somavarapu wrote: > Hi Oleg, > > Real problem was in our customized AbstractClassicEntityProducer > class produce method, buffer flush was missing which was causing the > issue (*Connection > Closed* in case of GET requests and *Connection forcibly

Re: Connection: Close header in response and Async HTTPClient api behaviour

2023-02-22 Thread Oleg Kalnichevski
ere a message body makes no sense. Oleg > Regards, > Sreenivas > > On Wed, Feb 22, 2023 at 2:38 AM Oleg Kalnichevski > wrote: > > > On Wed, 2023-02-22 at 01:27 +0530, sreenivas somavarapu wrote: > > > Hi Team, > > > > > > > > > I have

Re: Connection: Close header in response and Async HTTPClient api behaviour

2023-02-21 Thread Oleg Kalnichevski
On Wed, 2023-02-22 at 01:27 +0530, sreenivas somavarapu wrote: > Hi Team, > > > I have a perl script deployed on IIS server. When accessing this perl > script we are getting *Connection closed* error (see below for stack > trace) > from Async HTTPClient 5.2.x future callback. When further

Re: stackoverflow returns 0 hits when you try the topics [apache-httpcomponents] [javascript] . . .

2023-02-16 Thread Oleg Kalnichevski
On Thu, 2023-02-16 at 22:17 +, Albretch Mueller wrote: >  at least such "examples" would invite people into working with HC > within the GraalVM >  lbrtchx > I am not aware of any high profile project using HttpCore on JVM either. After so many years HttpComponents is still mainly seen by

Re: stackoverflow returns 0 hits when you try the topics [apache-httpcomponents] [javascript] . . .

2023-02-16 Thread Oleg Kalnichevski
On Thu, 2023-02-16 at 19:40 +, Albretch Mueller wrote: > https://stackoverflow.com/questions/tagged/apache-httpcomponents+javascript > Perhaps, partially the reason why people are not even trying is > because there is Selenium for that, but has anyone tried running HC > within the GRAALVM

Re: HC being used as poor man HTTP proxy to any extent? . . .

2023-02-16 Thread Oleg Kalnichevski
On Thu, 2023-02-16 at 19:21 +, Albretch Mueller wrote: >  Here are some examples {ClassicReverseProxyExample.html, > ProxyTunnelDemo.html} >  Has anyone attempted to extend HC anywhere near a full blown HTTP > proxy like squid. >  Could you share with me any documentation you would deem

Re: Chunked encoding header being ser when using AbstractClassicEntityConsumer / AbstractClassicEntityProducer causing POST data loss

2023-02-11 Thread Oleg Kalnichevski
On Sat, 2023-02-11 at 23:05 +0530, sreenivas somavarapu wrote: > Hi Oleg, > > Thank you for your reply. > > Just fyi. We were following the migration guide list on hc.apache.org > website > https://hc.apache.org/httpcomponents-client-5.2.x/migration-guide/migration-to-async-streaming.html > . >

Re: Chunked encoding header being ser when using AbstractClassicEntityConsumer / AbstractClassicEntityProducer causing POST data loss

2023-02-11 Thread Oleg Kalnichevski
On Sat, 2023-02-11 at 22:21 +0530, sreenivas somavarapu wrote: > Hi Oleg, > > There is a *getContentLength* method in > *AbstractClassicEntityProducer* which > is final and can’t be overwritten (see below) and always return -1 > and also > there is no variable which holds content length to

Re: Chunked encoding header being ser when using AbstractClassicEntityConsumer / AbstractClassicEntityProducer causing POST data loss

2023-02-11 Thread Oleg Kalnichevski
On Sat, 2023-02-11 at 11:13 +0530, sreenivas somavarapu wrote: > Hi Team, > > We are currently trying to implement Apache HTTP Async Client API for > handling HTTP 1.1 and HTTP 2.0 request (Using Servlet request and > response). We have implemented classes using > *AbstractClassicEntityConsumer*

Re: 5.2 ClassicHttpRequest getVersion() always returns null?

2023-02-04 Thread Oleg Kalnichevski
On Fri, 2023-02-03 at 23:09 -0500, Brent Putman wrote: > > On 2/3/23 4:37 PM, Oleg Kalnichevski wrote: > > > > This is intentional. It is the responsibility of the caller to > > populate > > that attribute. If the caller does not set the preferred protocol &g

Re: 5.2 ClassicHttpRequest getVersion() always returns null?

2023-02-03 Thread Oleg Kalnichevski
On Fri, 2023-02-03 at 15:53 -0500, Brent Putman wrote: > Hi, > > I'm working on porting our project from 4.5.x to 5.2.x.  This is the > classic client. We have an HttpRequestInterceptor that does basically > this: > > public void process(final HttpRequest request, ... ) { >   if

[ANNOUNCEMENT] HttpComponents Core 5.2.1 GA released

2023-01-12 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.2.1 GA release of HttpComponents Core. This is a maintenance release that corrects several minor defects discovered since release 5.2 and fixes SOCKS proxy protocol support in the async transport. Download -

Re: Problems with (most probably) usage of stale connections after update to hc-core 5.2 and hc-client 5.2

2023-01-04 Thread Oleg Kalnichevski
On Wed, 2023-01-04 at 15:47 +, Stankov. Yavor wrote: > Hi all, > > I'm having some issues after I updated to the latest versions of hc- > core(5.2) and hc-client (5.2). > > It all started with a NPE that I started receiving in the automation > tests that we have. The NPE appeared when I try

Re: Query regarding ContentType API's

2023-01-04 Thread Oleg Kalnichevski
On Wed, 2023-01-04 at 15:21 +0530, Nitish Chitta wrote: > Hello, > May I know the difference between ContentType.create() and > ContentType.parse() API's? I want the object to be returned after > parsing > the content type along with the parameters. > The create() API fails to do the same. Can

Re: Kerberos proxy auth in 5.x and post-deprecation handling

2022-12-08 Thread Oleg Kalnichevski
On Wed, 2022-12-07 at 22:34 +0100, Michael Osipov wrote: > Am 2022-12-07 um 21:34 schrieb Luis Gabriel Gomez: > > Hi > > > > I'm trying to establish a connection via a Kerberos authenticated > > proxy; I > > have a working code based on the 4.x client which works with > > minimal setup > > using

[ANNOUNCEMENT] HttpComponents Client 5.2.1 GA Released

2022-12-08 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.2.1 GA release of HttpComponents HttpClient. This is a maintenance release that fixes several regressions found in release 5.2. Download - Release notes -

[ANNOUNCEMENT] HttpComponents Client 4.5.14 GA Released

2022-12-05 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 4.5.14 GA release of HttpComponents HttpClient. This is a maintenance release that fixes several minor bugs reported discovered since the 4.5.13 release. Download - Release notes -

[ANNOUNCEMENT] HttpComponents Core 4.4.16 Released

2022-11-30 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 4.4.16 GA release of HttpComponents Core. This is a maintenance release that corrects several defects discovered since release 4.4.15. Download - Release notes -<

Re: Increased new connection rate

2022-11-29 Thread Oleg Kalnichevski
On Tue, 2022-11-29 at 16:22 +, john.e.gr...@wellsfargo.com.INVALID wrote: > All, > > I'm using 4.5.12. > > I'm trying to reproduce a problem where it appears we're creating a > lot more new backend connections than we expect even though incoming > request volume stays about the same. > > I

[ANNOUNCEMENT] HttpComponents Client 5.1.4 GA Released

2022-11-21 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.1.4 GA release of HttpComponents HttpClient. This release upgrades HttpCore to the latest 5.1 version and fixes several issues found since release 5.1.3. This is likely to be the last release in the 5.1 release series. Users of

Re: Regarding HTTP2 support for classic 5.x httpclient

2022-11-19 Thread Oleg Kalnichevski
ng to control it with below option but > httpclient is itself throwing error. > > *AsyncRequestBuilder* APIs *setVersion* method by using > *HttpVersion.HTTP_2* > or  *HttpVersion.HTTP_2_0* argument request is failing with > *Unsupported > version* error for a https url. > &

Re: Regarding HTTP2 support for classic 5.x httpclient

2022-11-19 Thread Oleg Kalnichevski
gt; implementations to see if I could achieve that using same httpclient > method. > > Regards, > Sreenivas > I am still confused. If you do not want protocol negotiation, just do not use it. If can force the desired protocol version. Oleg > On Sat, Nov 19, 2022, 11:13 PM Oleg

Re: Regarding HTTP2 support for classic 5.x httpclient

2022-11-19 Thread Oleg Kalnichevski
respective of backend server enablement of that > respective protocol. This makes no sense. If the opposite endpoint does not support H2 HttpClient will not be able to execute request with that protocol. Oleg > Regards, > Sreenivas > > On Sat, Nov 19, 2022, 3:47 PM Oleg Kalnichev

Re: Regarding HTTP2 support for classic 5.x httpclient

2022-11-19 Thread Oleg Kalnichevski
On Fri, 2022-11-18 at 13:45 +0530, sreenivas somavarapu wrote: > Hi Oleg, > > Thank you for your reply and conformation. > > I was looking at async APIs on how to achieve both HTTP 1.x and HTTP > 2 > support using same HttpAsyncClients builder but initial glance at > APIs > looks like it is not

[ANNOUNCEMENT] HttpComponents Core 5.1.5 GA released

2022-11-14 Thread Oleg Kalnichevski
The Apache HttpComponents project is pleased to announce 5.1.5 GA release of HttpComponents Core. This is a maintenance release that corrects several minor defects discovered since release 5.1.4. This is likely to be the last release in the 5.1 release series. Users of HttpCore 5.1 are advised

  1   2   3   4   5   6   7   8   9   10   >