def blosxom_process_path_info(args):
    """Process HTTP ``PATH_INFO`` for URI according to path
    specifications, fill in data dict accordingly.

    The paths specification looks like this:

    - ``/foo.html`` and ``/cat/foo.html`` - file foo.* in / and /cat
    - ``/cat`` - category
    - ``/2002`` - category (if that's a directory)
    - ``/2002`` - year index
    - ``/2002/02`` - year/month index
    - ``/2002/02/04`` - year/month/day index

    :param args: dict containing the incoming Request object

    """
    request = args['request']
    cfg = request.get_configuration()
    data = request.get_data()
    pyhttp = request.get_http()

    # Populate with default values
    new_data = {
        'path_info': pyhttp.get('PATH_INFO', ''),
        'pi_yr': '',
        'pi_mo': '',
        'pi_da': '',
        'pi_bl': pyhttp.get('PATH_INFO', ''),
        'bl_type': '',
        'theme': request.get_theme(),
        'root_datadir': cfg['datadir']
    }

    routed_data = ROUTER.match(cfg, new_data['path_info'])

    if not routed_data:
        # If we have no idea what this is, then treat it like a file.
        routed_data = {
            'bl_type': '',
            'root_datadir': os.path.join(cfg['datadir'].rstrip(),
                                         pyhttp.get('PATH_INFO', '').lstrip())
        }

    new_data.update(routed_data)

    # Construct final URL
    new_data['url'] = '/'.join([
        cfg['base_url'].rstrip('/\\'), new_data['pi_bl'].lstrip('/\\')])

    # Figure out whether to truncate the entry list
    truncate = False
    if new_data.get('pi_yr'):
        truncate = cfg['truncate_date']
    elif new_data.get('bl_type') == 'entry_list':
        if new_data['path_info'] in ([''], ['index']):
            truncate = cfg['truncate_frontpage']
        else:
            truncate = cfg['truncate_category']
    new_data['truncate'] = truncate

    # Update the data dict in-place
    data.update(new_data)
    return data