AMG: This page lists detailed change information for Wibble implementation. See also Wibble news for higher-level announcements. Discussion can be in-line here, on the Wibble discussion page if it's lengthy, or on Wibble bugs if you want to report a problem.
2010-11-06 - Header and POST parsing
Line difference: [L1 ]; word difference: [L2 ].
AMG: I've been holding on to these changes for far too long, and I'm glad to finally publish them.
- Added separator comments delimiting major sections of the code.
- Changed usage of [dict with request] to cut down on indenting.
- Added many conversion routines:
- [enhtml]: Encode for HTML.
- [enattr]: Encode for HTML tag attribute.
- [enpre]: Encode for HTML <pre>.
- [enquery]: Encode a query string.
- [dequery]: Decode a query string into a list.
- [enhex]: Encode most non-alphanumerics with hexadecimal codes.
- [dehex]: Decode hexadecimal encoding.
- [enurl]: Encode for URLs.
- [deurl]: Decode URL encoding.
- [delist]: Decode header list encoding.
- [dequote]: Decode header quoting.
- [deheader]: Decode HTTP headers. (!!!)
- Actually, [dehex] already existed, named [unhex]. Renamed because [enhex] and [unhex] are too similar.
- Modified zone handlers to use new conversion routines, e.g. [enhtml].
- Replaced <td><b> with <th> in [vars].
- Simplified the way [dirlist] adds .. to the directory listing.
- Changed [applytemplate] to [compiletemplate], which returns the script instead of running it.
- Made [template] cache the result of [compiletemplate].
- Simplified append's arguments in [compiletemplate].
- Added channel closure detection to [getline] and [getblock].
- Reverted second-chance [chan gets] in [getline], since I'm not convinced it's necessary.
- Changed the way [nexthandler] and [sendresponse] pass control back to [getresponse].
- Added accept, post, and rawpost to the request dictionary.
- Added Accept*: header handling.
- Added POST handling.
- Unset request dictionary after sending the response to avoid stale data.
- Correct error report charset.
- Incorporated APN's [accept] fix (see [L3 ]).
The channel closure detection makes it possible to close connections due to timeouts. This isn't implemented yet, but it would be nice to harden Wibble against basic DoS attacks.