servlet image retrieval problem

I have a servlet that retrieves arbitrary URLs. It is part of my
infamous attempt to add a servlet to a proxy configured jigsaw server. I
never got the two to work together. So I added a second jigsaw server to
bypass this obstacle.

Now I have a new problem.

The problem concerns a servlet that creates a HttpURLConnection to a
remote image URL and reads in the incoming stream, then copies the
stream into the ServletResponse output stream.

Many URLs seem to work fine. But gif and jpg URLs appear to be garbled.
Is there any additional formating Jigsaw performs on the response stream
after the servlet closes?


my architecture:

browser requests a URL from proxy
jigsaw "I" proxy-configured
  customized proxy-frame redirects to jigsaw "II" servlet 
jigsaw "II" servlet "A"-configured
  servlet "A" extracts desired URL to retrieve
  servlet "A" opens HttpURLConnection to jigsaw "III"
  servlet "A" forwards desired URL to jigsaw "III"
jigsaw "III" servlet "B"-configured
  servlet "B" extracts URL to retrieve
  servlet "B" opens HttpURLConnection to origin server
  servlet "B" extracts & wraps headers
  servlet "B" downloads the headers & contents of URL
  servlet "B" dumps content ->ServletResponse Outputstream.
jigsaw "II" servlet "A" 
  reads data from it's HttpURLConnection to "B"
  unwraps headers
  dumps content ->ServletResponse Outputstream
jigsaw "I" Proxy
  caches response
  forwards content to user's browser



Received on Monday, 21 June 1999 03:29:38 UTC