You totally did Oleg, I’m sorry. I apparently didn’t get the reply because I had unsubscribed from the list, oddly enough, it still let me post to it.
Apologies for the noise, - Rafael > On Jan 9, 2020, at 9:32 AM, Oleg Kalnichevski <[email protected]> wrote: > > On Thu, 2020-01-09 at 09:08 -0700, Rafael Ferreira wrote: >> Hello folks, I’m trying to get a sense of the correct way to handle a >> couple corner cases while using httpcommons-core 5.x as a generic H2 >> server framework. >> >> First, I would like idle connections to timeout (ie, client >> initiates a socket connection to a IO reactor and does nothing). I >> would assume this would be part of the IORector config but I couldn’t >> find anything in there related to idle connections. >> >> Second, I’m trying to write an AsyncEntityConsumer that limits the >> amount of data it will accept (to limit the max POST body allowed), >> stops processing once a limit is reached and sends back an sensible >> HTTP response, here’s my latest failed attempt: >> >> > https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/internal/MultipartEntityConsumer.java#L76 >> < >> https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/internal/MultipartEntityConsumer.java#L76 >> >> <https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/internal/MultipartEntityConsumer.java#L76> >>> >> >> And >> >> > https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/internal/JujubeServerExchangeHandler.java#L70 > > <https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/internal/JujubeServerExchangeHandler.java#L70> >> < >> https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/internal/JujubeServerExchangeHandler.java#L70 >> >> <https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/internal/JujubeServerExchangeHandler.java#L70> >>> >> >> Needless to say, the above doesn’t work since it doesn’t tell the >> underlying IO handler to stop reading bytes off the stream. >> >> Lastly, I’m confused what types of exception in the H2ServerBootstrap >> are supposed to trigger the callback method ( >> https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/Jujube.java#L55 >> >> <https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/Jujube.java#L55> >> < >> https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/Jujube.java#L55 >> >> <https://github.com/rferreira/jujube/blob/master/jujube-core/src/main/java/org/ophion/jujube/Jujube.java#L55> >>> ) - in my testing, I haven’t seen that callback method being called >> even once. >> >> Big thanks and if anything I’m asking for above requires changes to >> httpcommons-core itself, I’m happy to submit patches with some minor >> guidance. >> >> Happy new year, >> >> - Rafael >> > > Did not I answer all your questions a few days back? My response is in > the project archive: > > https://lists.apache.org/thread.html/r32574d53137714ddf12f65f124e3bcae337c7c436300ecbfd82e3a3c%40%3Cdev.hc.apache.org%3E > > <https://lists.apache.org/thread.html/r32574d53137714ddf12f65f124e3bcae337c7c436300ecbfd82e3a3c%40%3Cdev.hc.apache.org%3E> > > Oleg > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > <mailto:[email protected]> > For additional commands, e-mail: [email protected] > <mailto:[email protected]>
