Apache Log Parsing

How much do I love Python? Consider this little snippet that parses Apache logs.

import re
from collections import defaultdict, named tuple

format_pat= re.compile(
   r"(?P<host>[\d\.]+)\s"
   r"(?P<identity>\S*)\s"
   r"(?P<user>\S*)\s"
   r"\[(?P<time>.*?)\]\s"
   r'"(?P<request>.*?)"\s'
   r"(?P …
more ...

REST and HTTP Digest Authentication

It seems so simple: use the HTTP Digest Authorization with the Quality of Protection set to "auth".

It's an easy algorithm. A nonce that encodes a timestamp can be used to be sure no one is attempting to cache credentials. It's potentially very, very nice.

Except for one thing: Apache …

more ...