First, by default the fossil executable is compiled with <tt>-Os</tt> MinGW gcc option on Windows as I understand. And it fails on conditions described above.

But without <tt>-Os</tt> option it works fine.

Second, here's my debug output of fossil-with-Os http subprocess:
<verbatim>
--systemtrace --sqltrace --httptrace http repo in1.txt out1.txt --nossl --localauth
# cgi: GATEWAY_INTERFACE = [CGI/1.0]
# cgi: REQUEST_METHOD = [GET]
# cgi: REQUEST_URI =
# cgi: PATH_INFO = [/artifact]
# cgi: QUERY_STRING =
# cgi: REMOTE_ADDR =
# cgi: HTTP_HOST =
# cgi: name =
SELECT 1 FROM config WHERE name='aux-schema'   AND value<>'2011-04-25 19:50';
SELECT 0 FROM blob WHERE
SELECT rid FROM blob WHERE
SELECT value FROM config WHERE name='localauth';
SELECT uid FROM user WHERE cap LIKE '%s%';
SELECT login FROM user WHERE uid=1;
# login: [Tsul] with capabilities [sx]
SELECT cap FROM user WHERE login = 'nobody';
SELECT cap FROM user WHERE login = 'anonymous';
SELECT uuid FROM blob WHERE rid=2;
SELECT 1 FROM shun WHERE
SELECT value FROM config WHERE name='header';
SELECT value FROM config WHERE name='project-name';
SELECT value FROM config WHERE name='index-page';
SELECT uuid FROM blob WHERE rid=2;
SELECT uuid FROM blob WHERE rid=2;
SELECT filename.name, datetime(event.mtime),
	coalesce(event.ecomment,event.comment),
	coalesce(event.euser,event.user),
	b.uuid  FROM mlink, filename, event, blob a, blob b
	WHERE filename.fnid=mlink.fnid   AND event.objid=mlink.mid   AND a.rid=mlink.fid   AND b.rid=mlink.mid   AND mlink.fid=2;
SELECT value FROM config WHERE name='wiki-use-html';
SELECT substr(tagname, 6, 10000), datetime(event.mtime),
	coalesce(event.euser, event.user)
	FROM tagxref, tag, event WHERE tagxref.rid=2   AND tag.tagid=tagxref.tagid   AND tag.tagname LIKE 'wiki-%'   AND event.objid=tagxref.rid;
SELECT datetime(mtime), user, comment, type, uuid, tagid  FROM event, blob WHERE event.objid=2   AND blob.rid=2;
SELECT target, filename, datetime(mtime), user, src  FROM attachment WHERE src=(SELECT uuid FROM blob WHERE rid=2) ORDER BY mtime DESC
</verbatim>
And then it's crashed. The input file used was listed above.

Debug output of fossil-without-Os http subprocess differs only in additional lines at the end:
<verbatim>
SELECT srcid FROM delta WHERE rid=2;
SELECT content FROM blob WHERE rid=2 AND size>=0;
SELECT value FROM config WHERE name='footer';
-- LOOKASIDE_USED                 24         95
-- LOOKASIDE_HIT                            728
-- LOOKASIDE_MISS_SIZE                      209
-- LOOKASIDE_MISS_FULL                        0
-- CACHE_USED                  25800
-- SCHEMA_USED                 15608
-- STMT_USED                    3392
-- MEMORY_USED                 94120      99752
-- MALLOC_SIZE                            48000
-- MALLOC_COUNT                  467        479
-- PCACHE_OVFLOW               25384      27568
-- prepared statements            23
</verbatim>

At last, here is the gdb stacktrace of segfault and some other details about fossil-with-Os http subprocess:
<verbatim>
fossil-ggdb-Os.exe
GNU gdb (GDB) 7.2
Copyright (C) 2010 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "mingw32".
For bug reporting instructions, please see:

Reading symbols from
(gdb) run http repo in1.txt out1.txt --nossl --localauth
Starting program: http repo in1.txt out1.txt --nossl --localauth
[New Thread 3792.0xd88]

Program received signal SIGSEGV, Segmentation fault.
0x77c37742 in strcmp () from
(gdb) bt
#0  0x77c37742 in strcmp () from
#1  0x00413a89 in mimetype_from_name (zName=0x6ff440 at wbld/doc_.c:302
#2  0x0041e1af in artifact_page () at wbld/info_.c:1250
#3  0x00423081 in process_one_web_page (zNotFound=0x0) at wbld/main_.c:1057
#4  0x00422a6d in main (argc=<value optimized out>, argv=0x3e4088) at wbld/main_.c:290
(gdb) f 1
#1  0x00413a89 in mimetype_from_name (zName=0x6ff440 at wbld/doc_.c:302
302           c = fossil_strcmp(zSuffix, aMime[i].zSuffix);
(gdb) l
297         first = 0;
298         last = sizeof(aMime)/sizeof(aMime[0]);
299         while( first<=last ){
300           int c;
301           i = (first+last)/2;
302           c = fossil_strcmp(zSuffix, aMime[i].zSuffix);
303           if( c==0 ) return aMime[i].zMimetype;
304           if( c<0 ){
305             last = i-1;
306           }else{
(gdb) p zSuffix
$1 =
(gdb) x/9xb zSuffix
0x22fdac:       0xd1    0x84    0xd1    0x8b    0xd0    0xb2    0xd0    0xb0
0x22fdb4:       0x00
(gdb) p i
$3 = 190
(gdb) p last
$4 = <value optimized out>
(gdb) p aMime[i]
$5 = {zSuffix = 0x38464947 <Address 0x38464947 out of bounds>, size = 1191207223, zMimetype = 0x39384649 <Address 0x39384649 out of bounds>}
(gdb)
</verbatim>
Note that zSuffis = 'фыва' in UTF8, that is the subj. filename.