﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
17684	URLValidator: Validation fails when URL requires User-Agent header	Raymond Penners	nobody	"The following example shows a link that returns a 403 in case no user agent is passed. When passed, a proper 200 is returned. However, this does not seem to work with the URLValidator. The ValidationError is unexpected here...

{{{
>>> import django
>>> django.VERSION
(1, 3, 1, 'final', 0)
>>> import requests
>>> from django.core.validators import URLValidator
>>> ua = 'foobar'
>>> requests.get('http://www.autoedizione.nl/feed/')
<Response [403]>
>>> requests.get('http://www.autoedizione.nl/feed/', headers={ 'User-Agent': ua})
<Response [200]>
>>> URLValidator(verify_exists=True, validator_user_agent=ua)('http://www.autoedizione.nl/feed/')
Traceback (most recent call last):
  File ""<console>"", line 1, in <module>
  File ""...HIDDEN.../django/django/core/validators.py"", line 121, in __call__
    raise broken_error
ValidationError: [u'This URL appears to be a broken link.']
}}}

(Python 2.6.5)
"	Bug	closed	Core (URLs)	1.3	Normal	wontfix			Unreviewed	0	0	0	0	0	0
