Apache Tutor is companion site for Application Development with Apache - The Apache Modules Book, and presents supplementary material.
Most of the examples used in the book are taken from the author's company's work published at apache.webthing.com and from the Apache sources at svn.apache.org (and in the download packages from httpd.apache.org).
Modules developed for the book and/or ApacheTutor are:
Other modules quoted extensively include:
There are a number of problems with alignment of example code listings, particularly in Chapter 5. These are tagged "alignment" in the table. Other errata are simple corrections.
Chapter 2 has some remaining inelegant wording and repetition, but that falls outside the scope of this errata note.
Chapter | Page | Correction |
---|---|---|
Preface | xxiii | add comma |
1 | 11 | svn -diff should read svn diff |
3 | 81 | Alignment |
4 | 120 | How did "programming" as a noun get in there? |
5 | 135,136,137,139,141,143,145 | Alignment |
6 | 170 | Alignment |
8 | 207 | Missing close bracket |
10 | 271 | authz_dbd_hook_client_session should read authz_dbd_hook_client_login |
10 | 275 | Remove line that depends on other omitted lines |
10 | 280 | Alignment |
11 | 306 | Alignment |
12 | 326 | Alignment |
Readers have drawn my attention to two serious errors, on pages 141 and 195. The first involves a classic loop over a bucket brigade:
for (b = APR_BRIGADE_FIRST(bbin);
b != APR_BRIGADE_SENTINEL(bbin);
b = APR_BUCKET_NEXT(b)) {
/* do things with b that will clobber the APR_BUCKET_NEXT
* pointer within the loop. Like APR_BUCKET_REMOVE.
*/
}
That won't work at all. A simple fix is to save the next pointer at the start of the loop, before doing anything that might clobber it:
for (b = APR_BRIGADE_FIRST(bbin);
b != APR_BRIGADE_SENTINEL(bbin);
b = nextb) {
nextb = APR_BUCKET_NEXT(b);
/* now it's safe to clobber b's pointers */
}
The second is in mod_authnz_day, where the wrong form of the MD5 hash
is generated: the binary data returned by apr_md5
needs to be encoded
to a string, as in htdigest. This is accomplished very simply by using ap_md5
to
compute the MD5 string. The code downloadable from this page has been corrected.