WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 8 months ago

#18505 closed defect (bug) (fixed)

http 404 sent for the RSS feed when there are no posts - should be 200

Reported by: mark-k Owned by: SergeyBiryukov
Milestone: 4.0 Priority: normal
Severity: normal Version: 3.2.1
Component: Feeds Keywords: has-patch commit
Focuses: Cc:

Description

for sites with no posts, the HTTP status code returned for the RSS feed is 404, but since the address was a valid address and it just happens that the content is empty, a 200 status should be sent.

(It annoys link checkers which then report that there are broken link at the site because by default for most themes there is a link to the RSS feed in the header)

Attachments (2)

18505.patch (772 bytes) - added by SergeyBiryukov 4 years ago.
18505.2.patch (413 bytes) - added by SergeyBiryukov 8 months ago.

Download all attachments as: .zip

Change History (8)

comment:1 @johnbillion4 years ago

Related: #17316 and its subsequent changeset at [18192].

I wonder if including is_feed() in that conditional block will fix this issue?

@SergeyBiryukov4 years ago

comment:2 @SergeyBiryukov4 years ago

  • Keywords has-patch added

comment:3 @SergeyBiryukov13 months ago

#27146 was marked as a duplicate.

comment:4 @SergeyBiryukov8 months ago

#28508 was marked as a duplicate.

@SergeyBiryukov8 months ago

comment:5 @SergeyBiryukov8 months ago

  • Keywords commit added
  • Milestone changed from Awaiting Review to 4.0

comment:6 @SergeyBiryukov8 months ago

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

In 29216:

Don't 404 for empty feeds.

fixes #18505.

Note: See TracTickets for help on using tickets.