<$BlogRSDUrl$>

Internal Server Error

what the voices in my head tell me to write

Wednesday, May 04, 2005

One of the gnarliest bugs I have had to fix 

<boast>

IngentaConnect LightweightBranding is basically an easy way for libraries to slap a bit of branding on the 'connect site.

One of the people who had paid for it was complaining that the logo he had uploaded was not displaying at all in IE but was ok in other browsers.

I checked through all the html etc and all seemed well. The images are uploaded to a directory and given the name format >client's name<.>10digit time stamp<.

At first I checked to see if IE could handle such a different "extension" with a little test page and that was ok. I had used a "copy" of the uploaded image sent attached to the Bugzilla report which seemed to be a jpg for this. I had saved it as a gif as well and that worked.

This led me to suspect the file that had been uploaded. I got it back from the server and had a look at it in a hex editor. It looked like a gif to me but some of the header information was garbled.

I managed to get hold of a "clean" copy of the file from the client. Lo and behold it was a gif and the header was ok. I uploaded it and all was well.

It turns out that IE converts all images to BMP's before it renders them on the screen (just one more reason why its slow and bloated). It doesnt pay any attention to the file extension (It might be .asp, .php or whatever if its a script generating the image after all) but looks at the header of the file. As this file was garbled just in the wrong place it couldn't work out what it was so didn't display an image at all.

</boast>

Tags:

Permanent link and Comments posted by Rob Cornelius @ Wednesday, May 04, 2005

Comments: Post a Comment


    follow me on Twitter

    My recent photos

    Archives

    Creative Commons License
    This work is licensed under a Creative Commons License.

    RSS feeds and things

    Feed Button Help

    This page is powered by Blogger. Isn't yours?

    contact the author

    rob cornelius can be contacted by email use his name with an dot and googles web based email domain