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.
We should really have an accept header in there. Something along the lines of application/rss+xml, application/rdf+xml, */*;q=0.1. Add in application/xml and text/xml with a lower q value too. This is Section 14.1 of RFC 2616. When the new smart feed making things come we will be ready. (virtuelv of #rss1.1 on freenode told me about this).
Comment | File | Size | Author |
---|---|---|---|
#4 | aggregator_accept_header_4.patch | 727 bytes | mustafau |
#2 | aggregator_accept_header.patch | 696 bytes | mustafau |
Comments
Comment #1
ricabrantes CreditAttribution: ricabrantes commentedAny activity??
Comment #2
mustafau CreditAttribution: mustafau commentedHere's the first patch. Needs some testing.
Comment #3
cburschkaIs it possible to test for outgoing HTTP headers with SimpleTest? If so, perhaps this can be unit-tested.
Also, don't you need the */*;q=0.1 there to act as a fallback for other types like text/xml?
Comment #4
mustafau CreditAttribution: mustafau commentedReroll.
The parser's capabilities are very limited. I don't know if "*/*;q=0.1" makes sense for this.
Comment #5
cburschkatext/xml
is considered bad form and in the process of being deprecated, but that doesn't mean we can refuse to accept it when it might still be sent for valid RSS content.So even if we don't add */* at the end, text/xml should be in there.
Comment #6
cburschkaAlso, test case...
Comment #7
jrbeemanHopping on this for the DrupalCon Thursday code sprint
Comment #8
jrbeemanI'd like to add a test for this, but I believe that the current module architecture doesn't allow a test to be written that adequately tests the headers. The function aggregator_aggregator_fetch($feed) is the API method that retrieves a feed. However, it constructs the headers, sends the drupal_http_request() and returns a boolean value. From what I can see, it looks like the intent of hook_aggregator_fetch() is to pass the $feed variable by reference, because several values in the $feed object are being set during aggregator_aggregator_fetch() that wouldn't otherwise be worth setting.
While trying to dig deeper into this issue, I've found that aggregator module simply isn't parsing items at the moment (i.e. add the RSS URL http://drupal.org/rss.xml and attempt to fetch items). Gotta run to catch my plane home, but I'll try to dig into this more over the coming days.
Comment #9
Jody LynnComment #10
Anonymous (not verified) CreditAttribution: Anonymous commentedThis should be easier once #1606794: Implement new routing system and #1505080: [META] Content Negotiation for Accept Headers are in.
Comment #14
sarmiliboyz CreditAttribution: sarmiliboyz commentedComment #24
quietone CreditAttribution: quietone at PreviousNext commentedThe
aggregator
module has been removed from Core in10.0.x-dev
and now lives on as a contrib module. Issues in the Core queue about theaggregator
module, like this one, have been moved to the contrib module queue.Comment #25
larowlanNeeds reroll for contrib
This would live in \Drupal\aggregator\Plugin\aggregator\fetcher\DefaultFetcher now