Changeset 2521

Show
Ignore:
Timestamp:
02/03/10 07:33:43 (6 weeks ago)
Author:
JensDiemer
Message:

Don't add headline anchors if response status code isn't 200

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/0.9/pylucid_project/middlewares/headline_anchor.py

    r2501 r2521  
    3636            return response 
    3737 
     38        if response.status_code != 200: 
     39            # do nothing on e.g. permission deny or not found or redirects etc. 
     40            return response 
     41 
    3842        try: 
    3943            pagemeta = request.PYLUCID.pagemeta