1 Q: What about multithreading?
3 A: You can do sexier stuff with ‘spawn-fcgi -F 99’. There should
4 be inter-process locks in place to make sure they don't clobber
8 Q: What about the things which are normally done with javascript?
10 A: There's a userscript at examples/rb-79.user.js which
11 you might find helpful. Make sure to change the header if you
12 intend to deploy it as a userscript.
15 Q: Do I really have to recompile the server just to change <trivial thing>?
20 Q: I want to run valgrind on this, do you have a suppression file
23 A: --suppressions=./v.supp . Also, you'll probably have to launch
26 spawn-fcgi -n -a 127.0.0.1 -p 9000 -- \
28 --tool=memcheck --leak-check=full \
29 --suppressions=./v.supp \
32 and add a break in the while-loop in main().
35 Q: Why did you do all the locking with lockf()? Doesn't
36 sqlite3_mutex_enter() do everything you need?
38 A: The locking is for the filesystem, not really for the db. Plus,
39 the answer to that is “I'm not sure”, which is close enough to
40 “no” that I'll not risk it.
43 Q: How does the spamchecking and wordfiltering work?
45 A: When a comment is submitted (which fcgi should turn to UTF-8),
46 a copy is made. The confusable transformation of UTR39[0] is
47 run, and several character classes are stripped out. Wordfiltering
48 and spamchecking is done on that copy, and substitution is
49 performed on the corresponding parts of the original.
51 This means that you cannot wordfilter U+2001 to anything - it
52 doesn't exist by the time the wordfilter runs. On the plus side,
53 you shouldn't have to worry about someone bypassing the wordfilter
54 by writing ᴺᴵᴺᴬ ᴾᵁᴿᴾᴸᴱᵀᴼᴺ.
57 Q: How do I adjust that Unicode transformation thingy?
59 A: You're probably looking for tools/gen-unicode-transforms.pl .
62 Q: File uploads for <type> are broken: I keep getting “Malformed
63 request: Unsupported file type”
65 A: An apology: Internally, libmagic is used to check the MIME
66 type of file uploads. It's possible that your magic database
67 is out of date, or the file type is obscure enough that it's
68 not detectable reliably. It could also be that your file is,
69 in fact, malformed. For example, EPUB documents are rather
70 tricky to get right [1]. Even though most readers will accept
71 a bunch of XHTML in a .zip archive, this is not technically an
74 [0] http://www.unicode.org/Public/security/latest/confusables.txt
75 [1] http://validator.idpf.org/