#13804: URLField validation fails with "://" on the path and no scheme
--------------------+-------------------------------------------------------
 Reporter:  Samus_  |       Owner:  nobody    
   Status:  new     |   Milestone:            
Component:  Forms   |     Version:  SVN       
 Keywords:          |       Stage:  Unreviewed
Has_patch:  1       |  
--------------------+-------------------------------------------------------
 according to RFC3986[1] urls containing colons on the path are valid but
 the current validation fails when the scheme is missing and there's an
 empty path:

 {{{
 Python 2.6.4rc2 (r264rc2:75497, Oct 20 2009, 02:55:11)
 [GCC 4.4.1] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> import django
 >>> django.VERSION
 (1, 3, 0, 'alpha', 0)
 >>> from django.forms import URLField
 >>> f = URLField()
 >>> f.clean('www.example.com/://')
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
   File "/home/samus/django-trunk/django/forms/fields.py", line 164, in
 clean
     self.run_validators(value)
   File "/home/samus/django-trunk/django/forms/fields.py", line 153, in
 run_validators
     raise ValidationError(errors)
 django.core.exceptions.ValidationError: [u'Enter a valid URL.']
 }}}

 discussion: http://groups.google.com/group/django-
 developers/browse_thread/thread/7b6780645ac882a7

 [1] http://www.rfc-ref.org/RFC-TEXTS/3986/chapter3.html#sub3

-- 
Ticket URL: <http://code.djangoproject.com/ticket/13804>
Django <http://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.

Reply via email to