Add debug support to show if a URL request resulted in a redirect
This commit is contained in:
		
							parent
							
								
									ca2250f700
								
							
						
					
					
						commit
						9ac1091eae
					
				|  | @ -666,6 +666,8 @@ def catch_request(request, opener=None): | ||||||
| 
 | 
 | ||||||
|     try: |     try: | ||||||
|         uh = _open(request) |         uh = _open(request) | ||||||
|  |         if request.get_full_url() != uh.geturl(): | ||||||
|  |             printer('Redirected to %s' % uh.geturl(), debug=True) | ||||||
|         return uh, False |         return uh, False | ||||||
|     except HTTP_ERRORS: |     except HTTP_ERRORS: | ||||||
|         e = get_exception() |         e = get_exception() | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue