Make WordPress Core

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#48025 closed defect (bug) (fixed)

When the permalink structure ends with a slash, a slash is appended to the URL of robots.txt.

Reported by: Toro_Unit Owned by: SergeyBiryukov
Priority: normal Milestone: 5.5
Component: Canonical Version: 5.3
Severity: normal Keywords: has-unit-tests has-patch commit
Cc: Focuses:

Description

When the permalink structure ends with a slash,

The URL is http://example.org/robots.txt/

The trailing slash should be removed.

Attachments (2)

48025.patch​ (854 bytes ) - added by Toro_Unit 7 years ago.
48025.2.patch​ (1.5 KB ) - added by Toro_Unit 7 years ago.
added unit test

Download all attachments as: .zip

Change History (11)

@Toro_Unit
7 years ago

@Toro_Unit
7 years ago

added unit test

#1 @Toro_Unit
7 years ago

  • Keywords has-unit-tests has-patch added

#2 @SergeyBiryukov
7 years ago

  • Milestone Awaiting Review → 5.3
  • Owner set to SergeyBiryukov
  • Status new → reviewing

#3 @marybaum
7 years ago

  • Keywords commit added

#4 @davidbaumwald
7 years ago

  • Milestone 5.3 → Future Release

With 5.3 RC1 releasing today, this ticket is being moved to Future Release. If any committer feels this can be worked in to 5.3 before the deadline or can assume ownership in the 5.4 cycle, feel free to move it back up.

#5 @joostdevalk
6 years ago

We should really fix this. @SergeyBiryukov can you get this in?

#6 @SergeyBiryukov
6 years ago

  • Milestone Future Release → 5.5

#7 @whyisjake
6 years ago

  • Resolution → fixed
  • Status reviewing → closed

In 48153:

Canonical: Ensure that when permalinks are set to a trailing slash, that robots.txt doesn't.

Fixes #48025.

Props Toro_Unit, joostdevalk, SergeyBiryukov.

#8 @whyisjake
6 years ago

In 48155:

Canonical: Add tests for trailing slashes for robots.txt.

See #48025.

Props Toro_Unit, joostdevalk, SergeyBiryukov.

#9 @SergeyBiryukov
6 years ago

In 48166:

Canonical: Move trailing slash handling for robots.txt and sitemaps to a single condition.

Give the unit test a more descriptive name.

Follow-up to [48153], [48155].

See #48025.

Note: See TracTickets for help on using tickets.