Cloning works if I run Fossil in server mode:
Server: Fossil server myrepository.fossil
Workstation: Fossil clone
http://myserver:8080<http://myserver:8080/> myclone.fossil
It also works using IIS/CGI if I clone a new, empty repository. However, if I
try to clone a repository that contains artifacts using IIS/CGI then I get
errors:
C:\Program Files\Fossil\Fossil.exe: malformed file line.
Comparing the data packets I can see the problem:
Fossil server response:
HTTP/1.0 200 OK
Date: Tue, 19 Apr 2011 20:34:30 GMT
Connection: close
Cache-control: no-cache, no-store
Content-Type: application/x-fossil-uncompressed; charset=utf-8
Content-Length: 793430
0000: 63 66 69 6C 65 20 65 37 64 34 34 63 34 65 61 64
.....
2E4C0: 33 F2 2C F4 AE CC B2 06 00 65 91 08 0D 0A 63 66
Fossil/IIS/CGI response:
Status: 200 OK
Date: Tue, 19 Apr 2011 20:34:30 GMT
Connection: close
Cache-control: no-cache, no-store
Content-Type: application/x-fossil-uncompressed; charset=utf-8
Content-Length: 793430
0000: 63 66 69 6C 65 20 65 37 64 34 34 63 34 65 61 64
.....
2E4C0: 33 F2 2C F4 AE CC B2 06 00 65 91 08 0A 63 66 69
All the 0D/0A pairs got replaced with 0A. Text mode converts \n to \r\n but
what the hell is converting \r\n to \n ???!?!?!??!
The Perl code that handles CGI requests, in part, looks like this:
$fossil = "C:\Program Files\Fossil\Fossil.exe"
$cgifile = <full path to CGI file>
$output = `\"$fossil\" \"$cgifile\"`; # Execute Fossil, capture output
$eoh = index($output,"\n\n"); # Find end-of-header
$header = substr($output,0,$index); # Just the HTTP header
if ($header =~ m/Content-Type: text/) { # text or binary?
print $output; # Everything is text mode
}
else {
print "$header\n\n"; # Header is text
binmode stdout; # The rest is binary
print substr($output,$eoh + 2);
}
Any chance that Fossil is doing this?
[cid:[email protected]]
TONY PEROVIC
[email protected]<mailto:[email protected]>
www.compumation.com
205 W. Grand Ave., Ste. 121
Bensenville, IL 60106
630-860-1921 Phone
630-860-1928 Fax
<<inline: image001.jpg>>
_______________________________________________ fossil-users mailing list [email protected] http://lists.fossil-scm.org:8080/cgi-bin/mailman/listinfo/fossil-users

