Opened 16 years ago

Closed 16 years ago

Last modified 12 years ago

#7345 closed (fixed)

URLField should append / if no path is specified.

Reported by: Joel Watts Owned by: Malcolm Tredinnick
Component: Forms Version: dev
Severity: Keywords: newforms urlfield
Cc: joel@…, Florian Apolloner Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

The equivalent URLs http://example.com and http://example.com/ are not being normalized to the same value by URLField.

Attachments (1)

urlfield.diff (3.8 KB ) - added by Joel Watts 16 years ago.
Patch to normalize path to / if none is specified (includes tests).

Download all attachments as: .zip

Change History (8)

by Joel Watts, 16 years ago

Attachment: urlfield.diff added

Patch to normalize path to / if none is specified (includes tests).

comment:1 by Simon Greenhill, 16 years ago

milestone: 1.0 beta
Triage Stage: UnreviewedReady for checkin

comment:2 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [8089]) Fixed #7345 -- When normalising the URLField form field, attach a trailing
slash when only a host (no path) is given. Thanks, jpwatts.

comment:3 by Honza Král, 16 years ago

Resolution: fixed
Status: closedreopened

urlparse.urlsplit(value) returns a tuple in python 2.4 urlparse.urlsplit(value)[2] works as supposed to.

I have no access to test on other versions.

comment:4 by Malcolm Tredinnick, 16 years ago

Owner: changed from nobody to Malcolm Tredinnick
Status: reopenednew
Triage Stage: Ready for checkinAccepted

comment:5 by anonymous, 16 years ago

Cc: Florian Apolloner added

comment:6 by Malcolm Tredinnick, 16 years ago

Resolution: fixed
Status: newclosed

(In [8093]) Fixed #7345 -- In [8089], I'd forgotten that urlparse.urlsplit() didn't return
something with attributes until Python 2.5. Thanks, Honza Kral and apollo13.

comment:7 by Jacob, 12 years ago

milestone: 1.0 beta

Milestone 1.0 beta deleted

Note: See TracTickets for help on using tickets.
Back to Top