servlets - Strangeness with Jetty serving images -
I'm completely stumped I'll give the background for the sake of perfection, but I'm not sure whether it will help or not. I'm running a lift project on a standard jetty set-up that is running a lift example. Mac OS X
I have a snippet that replaces XML input, gives an image, saves disk in the disc with the filename of the content from the MD5 of the content under the webtruth / images / directory, such as "c5669d3eedcf7d305dcf9f88a61b3ee0 .png ". The snippet then returns an IMG tag with reference to the generated image to be included in the output.
Most of the pictures work most, but most of them do not take time, and some images are not provided by the browser. No problem attempting to see an image in the browser (Camino and Firefox): The image is not displayed, suggesting that something is wrong.
Seeing it in another browser (with Safari and QuickTime), the image works properly Downloading and opening the image works fine with camino (i.e. file: // ...) Looking at the file, the image looks ok: The file itself is not clearly contaminated
This file may not be the length of the file, because all the file names are only 37 characters.
I can only assume that when the service is done then there is something wrong with the transport of the image through Jetti.
URIs who fail, are constantly unsuccessful, it is not intermittent. There is no difference in restarting JetT, so I do not think the file was created after the server started. Also, render is a blocked call, so there is no chance that the file is still open / HTML has not been saved before sending and the browser requests images.
The only thing I can imagine is that the mime type is messy, so I put the appropriate mapping in web.xml but there is still no cigar. The mime type looks fine and I It has verified that the number of bytes is correct.
For the problem image:
HTTP / 1.1 200 OK: Thursday, January 01 19 00 00 GMT Set cookies: JSESSIONID = 1dbeh8eq4mtu0; Path = / Content Type: Image / PNG Content-Length: 25488 Last-Modified: Saturn, 25 July 2009 15:38:19 GMT Server: JT (6.1.16)
For perfection, an image Header that loads well:
HTTP / 1.1 200 OK: Thursday, 01 January 1970 00:00:00 GMT Set-Cookie: JSESSIONID = 15dt649lzovc4; Path = / Content Type: Image / png Content-Length: 18657 Last-Modified: Saturn, 25 July 2009 15:41:35 GMT Server: JT (6.1.16)
Very shocked about this any clue?
Cheers
I'm not sure That you are later testing the URL with curl / wgt or using the packet sniffer to get the titles, but only in the past i will try to use a tool as it is to verify That actual data sent to Firefox fits in with the expected data.
The only thing that kills me is the difference in size. Is this usually big picture that fails? If so, then I can say that some type of buffering / flushing of the file.
Comments
Post a Comment