improved efficiency and readability

decided against the following DRY, but also more obscure variant:

    render, fat = [query.get(param, [False])[0] for param in
            ('render', 'fat')]
updated pytest usage

cf.
http://pytest.org/latest/getting-started.html#asserting-that-a-certain-exception-is-raised
added option to retrieve rendered tiddler body without also getting text

we still require both `fat` and `render` to be provided (cf.
3e170e848414201f4ae4cec3c360d591c8718f30), but the former may now be 0
replaced with statement to retain backwards compatibility

Python 2.4 doesn't do `with`

This partially reverts commit 29f761c9019b31b648cb88de8f1ba1e46e86493c.
Merge pull request #47 from FND/skinny_render

skinny render
release 1.2.56
Data in query strings must be treated as strings.

Thus the test which provided ints was not properly testing
the logic in the JSON serializer.

Should be better now.
release 1.2.57
Establish TypeError as the exception when unable to store.

At various levels of the stack, an incoming representation may
not be able to be stored. This is most common with tiddlers,
in particular tags in JSON. If we assume this badness will cause
a TypeError, we can catch that higher up, and deal with it
appropriately.

For now this change only traps tiddler PUT. Waiting on real
world data to properly correct bags and recipes.
release 1.2.58
simplified import
simplified import, fixed CherryPy spelling
fixed typo
Only send the no-transform cache header on 200

This is a follow up to 111250a3318be278c01063c6d192af61e66b0e25

In that, the header was being added to all responses. It turns out
this may cause a bit of a problem for browser caches:

When tiddlyweb sends a 304 it is done as a raised exception from deep
in the bowels of the code. Few headers are set.

The no-transform header is middleware so runs after the exception.

So while a GET for /foo might

   200
   Cache-Control: no-cache, no-transform

A subsequent GET for /foo would

   304
   Cache-Control: no-transform

It appears that webkit updates it's own handling of the cache to no
longer have no-cache, thus meaning that the browser can do what it
like in terms of validating or not validating the resource in cache.

The most visible effect of this is (hopefully was with this change) is
that a resource once loaded as text but then subsequently requested as
HTML would not get validated against the server, and you'd see text
where you expect HTML.

It will take a while for this to entirely clean up as some cached in
browser resources will be stale, but not be validated.
release 1.2.59
Extract processing of CONTENT_LENGTH to a util method.

This centralizes the error handling so we don't have to duplicate
raising a 400 across the several entities.

In the process fix a bug in the handling of bag and recipe PUT.
removed optional trailing slash for bag and recipe URIs

two URIs for the same resource is bad, mmkay

tiddlyspace.com logs suggest hardly anyone relies on these URIs
Properly report the details of a 400 when decoding routing args

Apparently there was confusion between logging's style of a
argument handing and, well, every single other thing that does
string formatting...
release 1.2.60
renamed Environator to RequestLogger

since a8c08d270828dfa4ab95498edf13b8272fb30ba8, this middleware does not
modify the WSGI environment anymore - so the original name (and
docstring) seemed misleading

in the process, replaced single-use temporary variables, as they obscure
rather than help readability