Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Drupal\aggregator\Plugin\aggregator\fetcher\DefaultFetcher
doesn't handle 304's correctly, making the parser throw an error, "Invalid document end" on line 1.
Comments
Comment #1
twistor CreditAttribution: twistor commentedComment #3
twistor CreditAttribution: twistor commentedI am awesome. sigh
Comment #4
twistor CreditAttribution: twistor commentedDarn, that test should fail.
I was having this problem while writing the test.
Apache is setting its own If-Modified-Since, and If-None-Match headers. Guzzle will then happily concatenate them. The feed ends up with an etag header like,
h__lfVU1SyY-w28Xq0pfxb8gcBNeuD-43cpt_zIe98w, 12345678
.This means they will never match in aggregator_test_feed() and there's no way to test this. I worked around it locally by hardcoding the If-None-Match header.Not sure how to proceed from here.
Comment #7
mgiffordThis still a concern in D8? Unassigned issue too.
Comment #16
quietone CreditAttribution: quietone as a volunteer commentedThe fix suggested in the latest patch was added to Drupal 8 in #1987598: Convert aggregator_test_feed() and aggregator_test_redirect() to a new style controller, so I think this is outdated. This is supported by the fact that way back in 2015 mgifford asked if this was still a problem and there has been not response.
Therefore, closing as outdated. If this is incorrect reopen the issue, by setting the status to 'Active', and add a comment explaining what still needs to be done.
Thanks!