Yeah, I've disabled fastcgi in my compilation and all the problem has gone! I wonder how the binaries compiled with fcgi will ever work on windows then.<br>As far as I know ms4w uses fcgi enabled in their binaries. Did you mention you or Assefa have managed to run the tests successfully by using ms4w? I'd be curious to krow what setting could also be applied when enabling fastcgi to be compiled in. <br>
<br><br>Best regards,<br><br>Tamas<br><br><br><br><div class="gmail_quote">2009/3/19 Normand Savard <span dir="ltr"><<a href="mailto:nsavard@mapgears.com">nsavard@mapgears.com</a>></span><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div><div></div><div class="h5">Tamas Szekeres wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
2009/3/17 Normand Savard <<a href="mailto:nsavard@mapgears.com" target="_blank">nsavard@mapgears.com</a>><br>
<br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Tamas,<br>
<br>
I checked how the tests works in mstestlib.py and the generated output.<br>
When it's an wxs tests, if the output result is a png file, it's passed<br>
through the demime_file() function. This function is called when<br>
[RESULT_DEMIME] is part of the RUN_PARMS request. It removes the<br>
Content-type.<br>
<br>
For the other tests like the ones in gdal or misc, shp2img is used and<br>
there is no such thing as Content-type in the png generated.<br>
<br>
Maybe I'm missing something so please do not hesitate to comment.<br>
<br>
<br>
<br>
<br>
</blockquote>
<br>
<br>
Uh, that explains many things but not all. It appears that this problem<br>
should be dedicated to the difference of the line ending interpretation of<br>
Windows and the Linux OS. On Windows we actually have 2 bytes to represent<br>
the line endings (0x0D 0x0A) which should also be stripped. So the following<br>
function would yield better results:<br>
<br>
def demime_file( filename ):<br>
print ' demime %s' % filename<br>
data = open(filename,'rb').read()<br>
<br>
for i in range(len(data)-1):<br>
if data[i] == '\n' and data[i+2] == '\n':<br>
open(filename,'wb').write(data[i+3:])<br>
return<br>
return<br>
<br>
But I have further issues with the de-stripped png images. It appears that<br>
the result provides invalid image unless I replace each 0x0D 0x0A with<br>
0x0A in the png image file.<br>
<br>
<br>
</blockquote></div></div>
Tamas,<br>
<br>
I did further investigation by comparing the hexdump of wms_time_pattern13d.png generated on my Windows machine, the Yewondwossen machine and yours (see below). It appears that in your file all carriage return characters (hex0D) have been replaced by carriage return (hex0D) and a line feed characters (0A). I cannot substitute these characters to a carriage returns character because this will break the output file on my machine, on Yewondwossen's one and possibly on many others. For instance if you look to the first line Yewondwossen file, the 'OD OA' characters would be changed to '0A' which will make the file unreadable. The '0D' character before the '0A' character is legitimate at this position and has a specific meaning in this png file.<br>
<br>
<br>
89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52<br>
^^^^<br>
<br>
I discussed with Daniel about this and he told me that the function msIO_needBinaryStdout() should take care of setting output in binary mode on Windows to avoid this CR/LF problem. Since Assefa and I do not have the same problem as you with the MS4W builds, it may be that something is different with your builds that prevents this function from doing its job?<br>
<br>
What do you think?<br>
<br>
Norm<br>
<br>
Yewondwossen and mine:<br>
00000010式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式忖^忙式式式式式式式式式式式式式式式式忖<br>
弛00000000 89 50 4E 47 0D 0A 1A 0A 00 00 00 0D 49 48 44 52 弛﹣弛.PNG........IHDR弛<br>
弛00000010 00 00 01 2C 00 00 01 2C 08 02 00 00 01 81 18 29 弛〤弛...,...,.......)弛<br>
弛00000020 B4 00 00 08 68 49 44 41 54 78 9C ED DD DB 72 9B 弛〤弛....hIDATx....r.弛<br>
弛00000030 4A 14 04 50 50 E5 FF 7F 59 E7 81 98 83 AC 4B 40 弛〤弛J..PP...Y.....K@弛<br>
弛00000040 12 B3 A7 61 AD 87 54 92 72 79 32 69 35 D7 01 8F 弛〤弛...a..T.ry2i5...弛<br>
弛00000050 D7 EB 75 68 EB D2 78 3C 43 1A D2 90 86 EC 64 C8 弛〤弛..uh..x<C.....d.弛<br>
弛00000060 71 6C 3E 64 93 4D FC DD 2C F7 9F E8 E5 EF 48 B3 弛〤弛ql>d.M..,.....H.弛<br>
弛00000070 FD 27 3A 76 B0 BF 6C F4 1F DB D6 DD 90 FB FF 3F 弛〤弛.':v..l........?弛<br>
弛00000080 3F 9A E5 CE 9F DB 3F 0F FE 6E E7 89 F6 90 A5 21 弛〤弛?.....?..n.....!弛<br>
弛00000090 0D 69 48 43 1A D2 90 BD 0F D9 FA 08 AF F5 14 8D 弛〤弛.iHC............弛<br>
弛000000A0 67 3C E3 19 AF CD 78 2D CE 55 9B 5C 51 59 8C 67 弛〤弛g<....x-.U.\QY.g弛<br>
弛000000B0 FF 10 3F DE FC 91 B9 5E F7 FE F8 5C FE 0E 33 DB 弛〤弛..?....^...\..3.弛<br>
弛000000C0 79 C8 1E F2 DB B3 21 3D CC CF 78 C6 33 9E F1 8C 弛〤弛y.....!=..x.3...弛<br>
弛000000D0 67 BC D6 E3 15 DC 81 6A AC E0 A2 4F 63 66 98 CF 弛〤弛g......j...Ocf..弛<br>
弛000000E0 0C F3 99 61 3E 33 CC 77 FC 19 3E 5A F8 31 69 BB 弛〤弛...a>3.w..>Z.1i.弛<br>
弛000000F0 7E 69 3F 77 8B B1 66 D3 AC AE D7 E8 E9 0D 0F AE 弛〤弛~i?w..f.........弛<br>
弛00000100 E4 CD A6 69 B7 BD 0E BD 87 E7 9F D2 21 FB C3 39 弛〤弛...i........!..9弛<br>
弛00000110 7B BE A5 D9 FF 4A 70 1B C7 DF 96 FE CC F0 E1 5A 弛〤弛{....Jp........Z弛<br>
弛00000120 BD 29 C6 F0 24 7F 66 F8 6C 9B 99 5F C5 97 5B 9A 弛〤弛.)..$.f.l.._..[.弛<br>
弛00000130 C9 B2 90 81 13 5E D7 C3 79 DF 18 68 F5 96 26 73 弛〤弛.....^..y..h..&s弛<br>
弛00000140 7A C3 99 B6 A5 C7 65 86 F9 CC 30 9F 19 E6 33 C3 弛〤弛z.....e...0...3.弛<br>
戌式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式戎v戌式式式式式式式式式式式式式式式式戎<br>
Help Save Open Goto Find Hex Addr Hex Edit Quit<br>
<br>
<br>
<br>
Yours:<br>
<br>
00000000式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式忖^忙式式式式式式式式式式式式式式式式忖<br>
弛00000000 89 50 4E 47 0D 0D 0A 1A 0D 0A 00 00 00 0D 49 48 弛﹣弛.PNG..........IH弛<br>
弛00000010 44 52 00 00 01 2C 00 00 01 2C 08 02 00 00 01 81 弛〤弛DR...,...,......弛<br>
弛00000020 18 29 B4 00 00 08 68 49 44 41 54 78 9C ED DD DB 弛〤弛.)....hIDATx....弛<br>
弛00000030 72 9B 4A 14 04 50 50 E5 FF 7F 59 E7 81 98 83 AC 弛〤弛r.J..PP...Y.....弛<br>
弛00000040 4B 40 12 B3 A7 61 AD 87 54 92 72 79 32 69 35 D7 弛〤弛K@...a..T.ry2i5.弛<br>
弛00000050 01 8F D7 EB 75 68 EB D2 78 3C 43 1A D2 90 86 EC 弛〤弛....uh..x<C.....弛<br>
弛00000060 64 C8 71 6C 3E 64 93 4D FC DD 2C F7 9F E8 E5 EF 弛〤弛d.ql>d.M..,.....弛<br>
弛00000070 48 B3 FD 27 3A 76 B0 BF 6C F4 1F DB D6 DD 90 FB 弛〤弛H..':v..l.......弛<br>
弛00000080 FF 3F 3F 9A E5 CE 9F DB 3F 0F FE 6E E7 89 F6 90 弛〤弛.??.....?..n....弛<br>
弛00000090 A5 21 0D 69 48 43 1A D2 90 BD 0F D9 FA 08 AF F5 弛〤弛.!.iHC..........弛<br>
弛000000A0 14 8D 67 3C E3 19 AF CD 78 2D CE 55 9B 5C 51 59 弛〤弛..g<....x-.U.\QY弛<br>
弛000000B0 8C 67 FF 10 3F DE FC 91 B9 5E F7 FE F8 5C FE 0E 弛〤弛.g..?....^...\..弛<br>
弛000000C0 33 DB 79 C8 1E F2 DB B3 21 3D CC CF 78 C6 33 9E 弛〤弛3.y.....!=..x.3.弛<br>
弛000000D0 F1 8C 67 BC D6 E3 15 DC 81 6A AC E0 A2 4F 63 66 弛〤弛..g......j...Ocf弛<br>
弛000000E0 98 CF 0C F3 99 61 3E 33 CC 77 FC 19 3E 5A F8 31 弛〤弛.....a>3.w..>Z.1弛<br>
弛000000F0 69 BB 7E 69 3F 77 8B B1 66 D3 AC AE D7 E8 E9 0D 弛〤弛i.~i?w..f.......弛<br>
弛00000100 0F AE E4 CD A6 69 B7 BD 0E BD 87 E7 9F D2 21 FB 弛〤弛.....i........!.弛<br>
弛00000110 C3 39 7B BE A5 D9 FF 4A 70 1B C7 DF 96 FE CC F0 弛〤弛.9{....Jp.......弛<br>
弛00000120 E1 5A BD 29 C6 F0 24 7F 66 F8 6C 9B 99 5F C5 97 弛〤弛.Z.)..$.f.l.._..弛<br>
弛00000130 5B 9A C9 B2 90 81 13 5E D7 C3 79 DF 18 68 F5 96 弛〤弛[......^..y..h..弛<br>
弛00000140 26 73 7A C3 99 B6 A5 C7 65 86 F9 CC 30 9F 19 E6 弛〤弛&sz.....e...0...弛<br>
戌式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式式戎v戌式式式式式式式式式式式式式式式式戎<br>
Help Save Open Goto Find Hex Addr Hex Edit Quit<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
</blockquote></div><br>