View Ticket
Not logged in
Ticket UUID: 82067d99225350060802d33f450b1c7539af58b9
Title: Partial logo when using CGI
Status: Closed Type: Code_Defect
Severity: Cosmetic Priority:
Subsystem: Resolution: Not_A_Bug
Last Modified: 2011-04-01 21:00:30
Version Found In: 1d93222627
Description & Comments:
I only get a partial logo when using the CGI interface (just the tip of the nose). It works using the Fossil ui or server so I know the repository is not corrupted. To simplify troubleshooting, I requested just the logo.

Using a new, empty repository, I captured the HTTP request/response packets:

GOOD LOGO (using fossil server)
http://myserver:8080/logo

REQUEST:

GET /logo HTTP/1.1
Host: myserver:8080
Connection: keep-alive
Cache-Control: max-age=0
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3

RESPONSE:

HTTP/1.0 200 OK
Date: Thu, 17 Mar 2011 17:50:20 GMT
Connection: close
Expires: Thu, 24 Mar 2011 17:50:20 GMT
Content-Type: image/gif; charset=utf-8
Content-Length: 866
Version: GIF87a
Screen width: 62
Screen height: 71
Global settings: (Global color table present) (7 bits per color) (5 bits per pixel)
Background color index: 0
Global color map: 5581955F889B638B9D6A90A27196A67498A87FA0AF8AA8B6...
Image left position: 0
Image top position: 0
Image width: 62
Image height: 71
Local settings: (1 bit per color) (1 bit per pixel)
LZW minimum code size: 5
Data block (length = 255)
 0000   ff 60 64 8d 64 69 9e a8 25 29 84 c0 a4 70 2c cf
 0010   66 63 00 38 10 54 74 ef c7 8d 41 6e e8 f8 19 8d
 0020   c1 a1 52 71 6c ca 20 37 e5 d2 49 3d 29 a4 58 66
 0030   b5 0a 29 60 b3 5b 6a 23 f0 05 87 8f 89 f2 57 7b
 0040   f6 21 be 51 6c a3 ed c6 0e 1e 71 e9 83 4e 73 48
 0050   0b 73 57 65 13 7c 33 42 4a 08 13 10 43 64 4a 85
 0060   32 0f 65 87 38 0b 4a 06 8f 31 7e 6a 38 08 91 43
 0070   09 98 30 8b 9b 05 16 0d 4a 73 a1 29 93 65 0d 82
 0080   39 84 aa 28 a7 9b 00 5e 39 03 b2 30 b7 b5 39 a0
 0090   ba 28 13 8d bd 00 45 c0 28 10 c3 9b b9 c7 29 c9
 00a0   bd bf cd c1 bc 83 d2 31 af 58 d1 d6 26 13 03 0b
 00b0   13 6f 7f 3c db 27 37 cc 13 0b 06 64 05 0a e3 e4
 00c0   25 a3 00 ef 75 38 ee f3 31 c3 b1 f7 30 9e 38 fb
 00d0   32 d8 fe c5 38 80 6b 9e 02 7d ab 72 5c da f6 60
 00e0   42 03 04 32 86 b0 91 06 61 40 90 18 13 88 6c 5b
 00f0   b1 a0 00 c2 13 fd 00 d8 6b d6 e0 c0 81 05 10 53
Data block (length = 255)
Data block (length = 231)
Data block (length = 0)
Trailer (End of the GIF stream)

BAD LOGO (using CGI):
http://myserver/cgi-bin/Fossil.pl?repository=/Projects/Test/Test.fossil

Fossil.pl is a Perl script that takes the query string and creates a cookie that used for subsequent requests, creates the a Fossil.cgi file:

   #!Fossil
   repository: \Projects\Test\Test.fossil

Next, it invokes Fossil, captures the output, logs it then sends it to stdout for the web browser.

http://myserver/cgi-bin/Fossil.pl/logo (uses cookie created above)

REQUEST:

GET /cgi-bin/Fossil.pl/logo HTTP/1.1
Host: vserver1
Connection: keep-alive
Cache-Control: max-age=0
Accept: application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.3
Cookie: repository=\Projects\Test\Test.fossil
RESPONSE:
HTTP/1.1 200 OK
Content-Length: 866
Content-Type: image/gif; charset=utf-8
Expires: Thu, 24 Mar 2011 17:54:13 GMT
Server: Microsoft-IIS/6.0
Date: Thu, 17 Mar 2011 17:54:13 GMT
Version: GIF87a
Screen width: 62
Screen height: 71
Global settings: (Global color table present) (7 bits per color) (5 bits per pixel)
LZW minimum code size: 5
Data block (length = 255)
 0000   ff 60 64 8d 64 69 9e a8 25 29 84 c0 a4 70 2c cf
 0010   66 63 00 38 10 54 74 ef c7 8d 41 6e e8 f8 19 8d
 0020   c1 a1 52 71 6c ca 20 37 e5 d2 49 3d 29 a4 58 66
 0030   b5 0d 0a 29 60 b3 5b 6a 23 f0 05 87 8f 89 f2 57
 0040   7b f6 21 be 51 6c a3 ed c6 0e 1e 71 e9 83 4e 73
 0050   48 0b 73 57 65 13 7c 33 42 4a 08 13 10 43 64 4a
 0060   85 32 0f 65 87 38 0b 4a 06 8f 31 7e 6a 38 08 91
 0070   43 09 98 30 8b 9b 05 16 0d 4a 73 a1 29 93 65 0d
 0080   82 39 84 aa 28 a7 9b 00 5e 39 03 b2 30 b7 b5 39
 0090   a0 ba 28 13 8d bd 00 45 c0 28 10 c3 9b b9 c7 29
 00a0   c9 bd bf cd c1 bc 83 d2 31 af 58 d1 d6 26 13 03
 00b0   0b 13 6f 7f 3c db 27 37 cc 13 0b 06 64 05 0d 0a
 00c0   e3 e4 25 a3 00 ef 75 38 ee f3 31 c3 b1 f7 30 9e
 00d0   38 fb 32 d8 fe c5 38 80 6b 9e 02 7d ab 72 5c da
 00e0   f6 60 42 03 04 32 86 b0 91 06 61 40 90 18 13 88
 00f0   6c 5b b1 a0 00 c2 13 fd 00 d8 6b d6 e0 c0 81 05
Data block (length = 16)
Data block (length = 182)
Data block (length = 65)
Data block (length = 201)
Data block (length = 10)
Data block (length = 213
[Malformed Packet: GIF image])

The bold data bytes exist in the bad image data but not in the good image data.

I only checked the first data block but my guess is that all the \n were converted into \r\n in the image data.


anonymous added on 2011-04-01 21:00:30 UTC:
It was IIS!!!