Mimsy Were the Borogoves

Hacks: Articles about programming in Python, Perl, Swift, BASIC, and whatever else I happen to feel like hacking at.

Bug in parseResponse fixed

Jerry Stratton, August 15, 2008

There was a bug in the way that the parseResponse function counted through chunks; under some circumstances it would count wrong. In the process of fixing it, I also made parseResponse return a status code when it runs into problems. It’s always a good idea to not trust even your own servers. If if they aren’t subject to hacking attempts, error checking helps keeps bugs on one server from cascading down through other servers.

Since it was taking me too much time to get around to writing about the change, I just replaced the code in the parent article and in the archive with the new, good code.

In response to Brigades and HTTP 1.1 in an Apache module: In the previous installment, I used a bucket to fill up a single request for data from an external server. In this installment, I’ll use an entire brigade to fill up on a chunked response from an HTTP 1.1 server.