I am trying to pass the response from an incomming stream through a Transforer (to convert href’s)
This fails because the response comes from a “Proxy.to”
I have a suggestion to improve the IllegalStateException 10 grams.
I have added the request.getRequestURI() to a formatted string.
public void addContentInterceptor(ResponseContentInterceptor stage) throws IllegalStateException
throw new IllegalStateException(
"Cannot add output buffers to Response %s once request processing has been passed to the application."
My code is: (dmi is just a sample, I have nothing to do with that company)
I have made a pull request with the change.
I made in “master” branch the sender is “anderskristian”
it is a small thing, but it was nice to try this pull thing out…
Maybe I get the HrefTransformer working… so I can make pull request for that one…
Yes swapping the Transform and Proxy did work !!!
I made an internal test with own “sub-web” that worked fine 🙂
But http://www.dmi.com does not work, seems to send compressed….
The StringTransformer cannot handle dmi.com as well.
Maybe I will ignore that problem, I am not going to proxy to external pages anyway. But understanding the problem could be nice.
Yeah. I’m not really sure that you want to be using the Transformer API if you have any binary content. It was really intended for rendering documents from markdown, or changing text formats. The ResponseContentInterceptor or ResponseStreamInterceptor might be more what you are looking for?
Viewing 4 posts - 1 through 4 (of 4 total)
You must be logged in to reply to this topic.
Comments are closed.
Get updates from OCPSoft
If you find our tools useful, please consider making a donation to help us stay online and building software!