[jetty-dev] non-destructive request body read

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[jetty-dev] non-destructive request body read

Raymond Auge
Is there some trick I could use to read request body in a non-destructive way (for debugging purposes)? I want to dump the request body in a log.

I've got an implementation of org.eclipse.jetty.server.RequestLog going already but I would like to dump the request body which is tricky as you know.

--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] non-destructive request body read

Raymond Auge
nvm, just used a tcp/ip proxy to monitor.

- Ray

On Mon, Sep 16, 2019 at 2:41 PM Raymond Auge <[hidden email]> wrote:
Is there some trick I could use to read request body in a non-destructive way (for debugging purposes)? I want to dump the request body in a log.

I've got an implementation of org.eclipse.jetty.server.RequestLog going already but I would like to dump the request body which is tricky as you know.

--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)


--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] non-destructive request body read

Joakim Erdfelt-8
In reply to this post by Raymond Auge
The classes that could handle this are HttpInput.Interceptor and HttpOutput.Interceptor

Joakim Erdfelt / [hidden email]


On Mon, Sep 16, 2019 at 1:42 PM Raymond Auge <[hidden email]> wrote:
Is there some trick I could use to read request body in a non-destructive way (for debugging purposes)? I want to dump the request body in a log.

I've got an implementation of org.eclipse.jetty.server.RequestLog going already but I would like to dump the request body which is tricky as you know.

--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] non-destructive request body read

Raymond Auge
Thanks Joakim,

that's handy for the future.

- Ray

On Mon, Sep 16, 2019 at 3:26 PM Joakim Erdfelt <[hidden email]> wrote:
The classes that could handle this are HttpInput.Interceptor and HttpOutput.Interceptor

Joakim Erdfelt / [hidden email]


On Mon, Sep 16, 2019 at 1:42 PM Raymond Auge <[hidden email]> wrote:
Is there some trick I could use to read request body in a non-destructive way (for debugging purposes)? I want to dump the request body in a log.

I've got an implementation of org.eclipse.jetty.server.RequestLog going already but I would like to dump the request body which is tricky as you know.

--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev


--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev
Reply | Threaded
Open this post in threaded view
|

Re: [jetty-dev] non-destructive request body read

Greg Wilkins

Note that there is another trick you can do.  You can consume and buffer all the content and then pop it back onto the input queue.

Of course buffering requests means that you are vulnerable to DOS attacks, so not generally a good thing.

cheers





On Tue, 17 Sep 2019 at 05:38, Raymond Auge <[hidden email]> wrote:
Thanks Joakim,

that's handy for the future.

- Ray

On Mon, Sep 16, 2019 at 3:26 PM Joakim Erdfelt <[hidden email]> wrote:
The classes that could handle this are HttpInput.Interceptor and HttpOutput.Interceptor

Joakim Erdfelt / [hidden email]


On Mon, Sep 16, 2019 at 1:42 PM Raymond Auge <[hidden email]> wrote:
Is there some trick I could use to read request body in a non-destructive way (for debugging purposes)? I want to dump the request body in a log.

I've got an implementation of org.eclipse.jetty.server.RequestLog going already but I would like to dump the request body which is tricky as you know.

--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev


--
Raymond Augé (@rotty3000)
Senior Software Architect Liferay, Inc. (@Liferay)
_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev


--

_______________________________________________
jetty-dev mailing list
[hidden email]
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://www.eclipse.org/mailman/listinfo/jetty-dev