Review main Abandoned

51318[BUGFIX] Use GeneralUtility::getUrl in ResourceCompressor

Georg Ringer CR 0 V 0 Easy +1 −1 updated 11/29/17, 15:53

Commit message

As file_get_contents can't deal with protocol relative urls,
switch back to getUrl() as Guzzle can fetch the remote content.

Review

  • Code review CR 0
  • Verified V 0

Issues 1

Files 1

Review log 1011

  1. Georg Ringer uploaded patch set 1 01/15/17, 19:48

  2. TYPO3com voted on patch set 1 V +1 01/15/17, 19:52 Completed build in 03m 52s on Sun, 15 Jan, 08:52 PM Test Summary: 54939 passed Find logs and detail information at https://bamboo.typo3.com/browse/CORE-GTC-6669

  3. Markus Klein commented on patch set 1 01/18/17, 12:02

    ResourceCompressor.php:284

    the return value is different maybe in getUrl. there should be more check for all the possible error cases.
  4. Georg Ringer commented on patch set 1 01/23/17, 07:02

    this is just a regression fix, it has been a getUrl before...
  5. Markus Klein commented on patch set 1 01/24/17, 22:28

    If I remember correctly, the discussion was in general, whether we should download external stuff at all to compress it.
  6. Georg Ringer commented on patch set 1 01/26/17, 06:24

    that is a whole different issue I agree on, but let's fix the regression first which is just reverting this one liner
  7. Markus Klein voted on patch set 1 CR +1 V +1 01/26/17, 17:25

  8. Christian Kuhn commented on patch set 1 CR -1 01/27/17, 09:59

    -1 for the time being, imho the patch fixes a symptom but not the reason.

    ResourceCompressor.php:284 Reply

    I don't understand this: The code at this point is for handling local files only, it is sanitized with resolveBackPath() and stripPathSitePrefix() which is clearly local file handling. If this is triggered for external url's, the local / remote detection is wrong, but not this file_get_contents() / getUrl() call here, so that should be changed instead, I'd say. And even if we don't change that now for whatever reason, there should at least be a big fat comment stating this code section may be called for remote files, too, I think.
  9. Markus Klein voted on patch set 1 CR 0 V 0 11/29/17, 15:24

  10. Markus Klein commented on patch set 1 CR -1 11/29/17, 15:51

    will answer in the ticket.
  11. Markus Klein abandoned the change 11/29/17, 15:53