Re: implementing request /response filters (was) [Grinder-use] Am I a user or a developer?

View: New views
2 Messages — Rating Filter:   Alert me  

Parent Message unknown Re: implementing request /response filters (was) [Grinder-use] Am I a user or a developer?

by David Taylor-19 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Phil,

Thanks for the prompt reply.

I have tried what you suggest but see the following stack trace. When I
explicitly comment out the line (in TCPProxy.java):

        responseFilterChain.add(HTTPResponseFilter.class);

This stack trace is not generated.  Is there a cleaner way to suppress the
automatic adding of the default HTTPResponseFilter?

Thanks,

David

---------------
run:
9/24/09 10:10:19 AM (tcpproxy): Initialising as an HTTP/HTTPS proxy with the

parameters:

   Request filters:    HTTPRequestFilter, XM_HTTPRequestFilter

   Response filters:   HTTPResponseFilter, XM_HTTPResponseFilter

   Local address:      localhost:8443

   Key store:          testkeys

   Key store password: **********

9/24/09 10:10:19 AM (tcpproxy): Could not initialise:

java.net.BindException: Address already in use: JVM_Bind
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at
net.grinder.tools.tcpproxy.TCPProxySocketFactoryImplementation.createServerS
ocket(TCPProxySocketFactoryImplementation.java:53)
        at
net.grinder.tools.tcpproxy.AbstractTCPProxyEngine.<init>(AbstractTCPProxyEng
ine.java:112)
        at
net.grinder.tools.tcpproxy.HTTPProxyTCPProxyEngine.<init>(HTTPProxyTCPProxyE
ngine.java:119)
        at net.grinder.TCPProxy.<init>(TCPProxy.java:435)
        at net.grinder.TCPProxy.main(TCPProxy.java:158)
Java Result: 2
BUILD SUCCESSFUL (total time: 1 second)

-----Original Message-----
From: Philip Aston [mailto:philip.aston@...]
Sent: Wednesday, September 23, 2009 10:52 PM
To: grinder-use
Subject: Re: [Grinder-use] Am I a user or a developer?

Yes, such use is permitted - see the LICENSE file for details.

There isn't much developer-focussed docs, but the Javadoc is pretty
good. The modification you suggest will work, or you could simple
implement a pair of cooperating TCPProxyFilters, and use the
-requestfilter and -responsefilter switches. In this way, you woudn't
nee to modify the standard code.

The development list is the place to discuss things that aren't of
interest (or yet available) to the average user, so I've set follow-ups
to  there.

- Phil



David Taylor wrote:
> Hi! First post.
>
> I have found and studied the Grinder and am very impressed.
>
> My proposed use of the Grinder is to "borrow" the TCPProxy code for my own
> purposes.  Basically I would like to be able to proxy both HTTP and HTTPS
> and time the sessions.
>
> The content of the requests and responses is not really primary, in fact
the
> messages could be left encrypted if that is possible. The time to initial
> response and repeated replayed responses is what is important.
>
> It seems to me that I can "record" the requests and responses via the
> ConnectionHandler class by bottlenecking at the requestFinished() method.
Is
> there any guide available about how to implement the ConnectionHandler
> class?
>
> I can start by changing the ConnectionHandlerImplementation code but I
would
> like to make sure that such as use is permitted and whether I should
direct

> subsequent messages to this "use" list or the "developer" list.
>
> Thanks.
>
> David
> --
> David W. Taylor
> Developer | SL Corporation | http://www.sl.com
> david.taylor@... | Tel: +1.415.927.8555 | Fax: +1.415.927.8401
>  



----------------------------------------------------------------------------
--
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
grinder-use mailing list
grinder-use@...
https://lists.sourceforge.net/lists/listinfo/grinder-use



------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Grinder-development mailing list
Grinder-development@...
https://lists.sourceforge.net/lists/listinfo/grinder-development

Re: implementing request /response filters (was) [Grinder-use] Am I a user or a developer?

by Philip Aston-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message



David Taylor wrote:
Phil,

Thanks for the prompt reply.

I have tried what you suggest but see the following stack trace. When I
explicitly comment out the line (in TCPProxy.java):

	responseFilterChain.add(HTTPResponseFilter.class);
  

I can't immediately spot why this should help avoid the stack below.

This stack trace is not generated.  Is there a cleaner way to suppress the
automatic adding of the default HTTPResponseFilter?
  

Sure, leave "-http" off your command line. "-http" is simply a convenience that adds the HTTP Plugin filters, you usually don't want them if you are using -requestfilter/-responsfilter.

- Phil


Thanks,

David

---------------
run:
9/24/09 10:10:19 AM (tcpproxy): Initialising as an HTTP/HTTPS proxy with the

parameters:

   Request filters:    HTTPRequestFilter, XM_HTTPRequestFilter

   Response filters:   HTTPResponseFilter, XM_HTTPResponseFilter

   Local address:      localhost:8443

   Key store:          testkeys

   Key store password: **********

9/24/09 10:10:19 AM (tcpproxy): Could not initialise:

java.net.BindException: Address already in use: JVM_Bind
        at java.net.PlainSocketImpl.socketBind(Native Method)
        at java.net.PlainSocketImpl.bind(PlainSocketImpl.java:359)
        at java.net.ServerSocket.bind(ServerSocket.java:319)
        at java.net.ServerSocket.<init>(ServerSocket.java:185)
        at
net.grinder.tools.tcpproxy.TCPProxySocketFactoryImplementation.createServerS
ocket(TCPProxySocketFactoryImplementation.java:53)
        at
net.grinder.tools.tcpproxy.AbstractTCPProxyEngine.<init>(AbstractTCPProxyEng
ine.java:112)
        at
net.grinder.tools.tcpproxy.HTTPProxyTCPProxyEngine.<init>(HTTPProxyTCPProxyE
ngine.java:119)
        at net.grinder.TCPProxy.<init>(TCPProxy.java:435)
        at net.grinder.TCPProxy.main(TCPProxy.java:158)
Java Result: 2
BUILD SUCCESSFUL (total time: 1 second)

-----Original Message-----
From: Philip Aston [philip.aston@...] 
Sent: Wednesday, September 23, 2009 10:52 PM
To: grinder-use
Subject: Re: [Grinder-use] Am I a user or a developer?

Yes, such use is permitted - see the LICENSE file for details.

There isn't much developer-focussed docs, but the Javadoc is pretty
good. The modification you suggest will work, or you could simple
implement a pair of cooperating TCPProxyFilters, and use the
-requestfilter and -responsefilter switches. In this way, you woudn't
nee to modify the standard code.

The development list is the place to discuss things that aren't of
interest (or yet available) to the average user, so I've set follow-ups
to  there.

- Phil



David Taylor wrote:
  
Hi! First post.

I have found and studied the Grinder and am very impressed.

My proposed use of the Grinder is to "borrow" the TCPProxy code for my own
purposes.  Basically I would like to be able to proxy both HTTP and HTTPS
and time the sessions.

The content of the requests and responses is not really primary, in fact
    
the
  
messages could be left encrypted if that is possible. The time to initial
response and repeated replayed responses is what is important.

It seems to me that I can "record" the requests and responses via the
ConnectionHandler class by bottlenecking at the requestFinished() method.
    
Is
  
there any guide available about how to implement the ConnectionHandler
class?

I can start by changing the ConnectionHandlerImplementation code but I
    
would
  
like to make sure that such as use is permitted and whether I should
    
direct
  
subsequent messages to this "use" list or the "developer" list.

Thanks.

David
--
David W. Taylor
Developer | SL Corporation | http://www.sl.com
david.taylor@... | Tel: +1.415.927.8555 | Fax: +1.415.927.8401
  
    


------------------------------------------------------------------------------
Come build with us! The BlackBerry® Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9-12, 2009. Register now!
http://p.sf.net/sfu/devconf
_______________________________________________
Grinder-development mailing list
Grinder-development@...
https://lists.sourceforge.net/lists/listinfo/grinder-development