On Sun, 2008-12-07 at 11:32 +0800, Eric Abrahamsen wrote:
> I've got a model with a URLField, with verify_exists set to True,  
> which has suddenly started barfing "broken link" on a certain URL. I'm  
> quite sure the URL exists, and can't figure out why it can't get past  
> validation. This is the link:
> 
> http://www.rochester.edu/College/translation/threepercent/index.php?id=1482
> 
> The URLField itself is nothing special (unique=True, that's all). I  
> get the same error in development and production, though using urllib  
> on my production machine opens the URL fine, and I can open it in a  
> browser on my development machine. I started a Python interpreter and  
> manually typed in most of what goes on in  
> forms.fields.URLField.clean() (minus the User Agent stuff, don't know  
> what that is), and it opened with no problem. When the validation  
> error comes back in the Admin interface, the url hasn't been truncated  
> or altered in any way, so I don't think that's it. I've entered URLs  
> with GET parameters before...
> 
> I can't think of anything else! Has someone got a bright idea? I'm  
> running 1.1 pre-alpha SVN-9569.

Verify_exists uses an HTTP HEAD request to check the existence, since it
doesn't need the whole page. Some web browsers are misconfigured and
report 404 for URLS when a HEAD request is made, but not for the same
resource via a GET request.

So have a look at the result of something like "curl -I http://... " (or
equivalent tool if you don't have curl around). Basically, force a HEAD
request and see if that returns something sensible.

Regards,
Malcolm



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

Reply via email to