Hello Doug,

> What I want to do is this:
> 
> HttpEntity entity = response1.getEntity();
> modifyResponseContent( entity ); // this will get the content and change 
it
> response2.setEntity( entity );
> 
> Where response1 is the response from the webserver and response2 is the
> response from the proxyserver back to the client.
> 
> Why is this restriction in place and how can I go about doing this a
> different way?

The restriction is in place because "content" may be a stream that
creates data on the fly and is not repeatable. In particular, neither
client nor server will send the message body twice. If you want to
modify content, you can either wrap a stream that modifies on the fly,
or you can use a BufferedEntity that will keep the content in memory
all at once. The latter will cause problems if content is large.

hope that helps,
  Roland


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to