#!/usr/bin/env python3 import os import sys cache_control = os.environ.get('HTTP_CACHE_CONTROL', '') pragma = os.environ.get('HTTP_PRAGMA', '') sys.stdout.write('Content-Type: text/html\r\n\r\n') if cache_control.lower() == 'no-cache' or pragma.lower() == 'no-cache': sys.stdout.write( '

Got a no-cache directive; FAILURE!

' '' ) elif cache_control.lower() == 'max-age=0': sys.stdout.write( '

SUCCESS

' '' ) else: sys.stdout.write( '' '

No cache control headers, reloading...

' '' '' ) sys.stdout.write( '' '

Test for bug 5499: Page reload does not send any cache control headers.

' )