Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] Modifying the HTTP/1.1 Response Status Line's HTTP Version indicator

Hi,

On Fri, Nov 8, 2019 at 10:03 AM Karel Goderis <karel.goderis@xxxxxx> wrote:
>
> Hi Simone
>
> Since these events are in fact normal HTTP messages,

Well, they are not, otherwise there would be nothing to modify :)

> with a different version string, is there a way to leverage the built-in jetty classes to create, … these messages, before they are fed to the Enpoint?

Not right now, but the relevant classes may be modified to accommodate
that. PR from you?

> The Enpoint is a very low-level class, and I do not want to “craft” bytebyffer by hand for these messages

Why not? The textual format of HTTP/1.1 would make this really easy.
You concatenate a String, get the bytes, then EndPoint.write().

> I also noticed that the methods in the interface that are used to add listeners are depreciated in 9.4.x. So, how to go around that?  The other thing I am not quite sure about is how to get hold of the right HttpChannel that goes with the intended remote end
>
> Any pointer to an example of HttpChannel.Listener would be helpful. Google is not my best friend with respect to this…

https://github.com/eclipse/jetty.project/blob/jetty-9.4.22.v20191022/jetty-server/src/test/java/org/eclipse/jetty/server/HttpChannelEventTest.java

-- 
Simone Bordet
----
http://cometd.org
http://webtide.com
Developer advice, training, services and support
from the Jetty & CometD experts.


Back to the top