Code

Opened 7 years ago

Closed 7 years ago

#4618 closed (fixed)

contrib.redirects has a small error in new_path handling

Reported by: cephelo@… Owned by: adrian
Component: Contrib apps Version: master
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

As per http://www.djangoproject.com/documentation/redirects/, contrib.redirects should issue a HTTP GONE response when the new_path is empty. I'm probably the only one that uses this, but there's a small error in the Django code, where the redirect object is compared to an empty string instead of the new_path attribute.

Attached patch fixes it.

Attachments (1)

redirect_patch.patch (501 bytes) - added by cephelo@… 7 years ago.

Download all attachments as: .zip

Change History (3)

Changed 7 years ago by cephelo@…

comment:1 Changed 7 years ago by SmileyChris

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Ready for checkin

comment:2 Changed 7 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [5494]) Fixed #4618 -- Fixed error in django.contrib.redirects new_path handling. Thanks, cephelo@…

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.