Project

General

Profile

Actions

Bug #81644

closed

GeneralUtility::getUrl() socket method doesn't support chunked Content-Encoding

Added by Jigal van Hemert almost 7 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2017-06-21
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

With pageNotFound_handling set to the URL of a page the page not found handler uses GeneralUtility::getUrl() to retrieve the contents of the page. Because it requests the headers too the socket method is used if useCurl is not set.
After reading the headers the rest of the stream is simply read in a single operation. If the server has Content-Encoding set to chunked it will send the content in chunks and put the length of each block in hexadecimal before each chunk (plus a zero after the last chunk).

getUrl() fails to process the chunks correctly and the chunk sizes are simply included in the content.

It doesn't seem that guzzle handles chunked encoded data, but in most cases it will use cUrl internally which handles it. I'll have to test if with disabled cUrl v8/master has the same issue.

We can use a simple function to decode the chunked data.


Files

monitoring.jpg (103 KB) monitoring.jpg After applying the patch Markus Klein, 2020-06-03 20:48

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91582: Fetching an internal page as 404 content breaks browser output and CDNsClosedMarkus Klein2020-06-04

Actions
Actions

Also available in: Atom PDF