Add ability to bypass ETag support
Add the ":force" argument over http to bypass ETag support, which is convenient to debug code
This commit is contained in:
		
							
								
								
									
										2
									
								
								morss.py
									
									
									
									
									
								
							
							
						
						
									
										2
									
								
								morss.py
									
									
									
									
									
								
							@@ -410,7 +410,7 @@ if __name__ == '__main__':
 | 
			
		||||
	DEBUG = 'debug' in options
 | 
			
		||||
 | 
			
		||||
	if 'REQUEST_URI' in os.environ:
 | 
			
		||||
		if 'HTTP_IF_NONE_MATCH' in os.environ:
 | 
			
		||||
		if 'HTTP_IF_NONE_MATCH' in os.environ and 'force' not in options:
 | 
			
		||||
			if time.time() - int(os.environ['HTTP_IF_NONE_MATCH'][1:-1]) < DELAY:
 | 
			
		||||
				print 'Status: 304'
 | 
			
		||||
				print
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user