misc: update copyright years
[rb-79.git] / FAQ
blobb212aee86092ba2beff5af6acae55faf03a78d1b
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
5     the database(s).
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>?
17  A: Yeah.
20  Q: I want to run valgrind on this, do you have a suppression file
21     for the GMime stuff?
23  A: --suppressions=./v.supp .  Also, you'll probably have to launch
24     it like this:
26         spawn-fcgi -n -a 127.0.0.1 -p 9000 -- \
27             $(which valgrind) \
28             --tool=memcheck --leak-check=full \
29             --suppressions=./v.supp \
30             ./rb79-server
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
72     EPUB.
74 [0] http://www.unicode.org/Public/security/latest/confusables.txt
75 [1] http://validator.idpf.org/