Page MenuHomePhabricator

purgeList.php doesn't purge all URL variants provided in the TitleSquidURLs hook
Closed, ResolvedPublic

Description

There's a hook called TitleSquidURLs used to change / add URL variants of pages, used when sending PURGE requests to squid / varnish. However, the maintenance script purgeList.php only sends PURGE requests to the internal URL.

In fact, when a page is edited, by default it sends PURGE requests to the internal URL and also to the action=history URL. However, purgeList.php doesn't send PURGE request to action=history neither.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 23 2017, 2:58 PM

Tagging as good first task, looks it should take only a few lines of code on the maintenance script itself to fix this.

Restricted Application added a subscriber: TerraCodes. · View Herald TranscriptDec 23 2017, 2:59 PM
Southparkfan added a subscriber: Southparkfan.

@Ciencia_Al_Poder What do you mean with internal URLs? purgeList.php fetches the URLS using Title->getCdnUrls(), which seems to work fine in 1.34.2:

> $titleObj = Title::newFromID( 1 );

> var_dump( $titleObj->getCdnUrls() );
array(2) {
  [0]=>
  string(41) "https://test2.miraheze.org/wiki/Main_Page"
  [1]=>
  string(69) "https://test2.miraheze.org/w/index.php?title=Main_Page&action=history"
}
Ciencia_Al_Poder closed this task as Resolved.Aug 25 2020, 9:22 PM
Ciencia_Al_Poder reassigned this task from Southparkfan to Gilles.

Looks like it was fixed in rMW2501d1dedfbdaba981cea49ff7b67fda0926d822

@Ciencia_Al_Poder What do you mean with internal URLs? purgeList.php fetches the URLS using Title->getCdnUrls(), which seems to work fine in 1.34.2:

Indeed, this was not the case before the change :)