in libraries/src/Http/Transport/SocketTransport.php -> request(...)
the loop at #123
while (!feof($connection)) {
$content .= fgets($connection, 4096);
}
does not finish at the end of the xml-document, but loops forever, continuing over any number of timeouts
if, however, the socket closes, you get an xml parse error, because before and after the xml, there are some strange characters.
does not finish at the end of the xml-document, but loops forever, continuing over any number of timeouts
if, however, the socket closes, you get an xml parse error, because before and after the xml, there are some strange characters.
it took me a very long time to debug the problem, as there was not response from the system and I couldn't find any hint in the logs or the web....
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Title |
|
thanx for the analysis.
for me the solution was to install php-curl - which I think is acceptable and makes more sense than switch to HTTP 1.0
the problem was (and still might be for other users), that no hint what so ever was given, that this could help
It would be helpfull in the loop in /SocketTransport.php -> request mentioned above
Labels |
Added:
bug
|
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-03-11 19:43:07 |
Closed_By | ⇒ | SniperSister |
This seems happening because on some server (ie https://update.joomla.org) the answer is chunked.
https://en.wikipedia.org/wiki/Chunked_transfer_encoding
Then the connection is always up and never closes.
Each chunk starts with the number of octets of the data it embeds expressed as a hexadecimal number in ASCII followed by optional parameters (chunk extension) and a terminating CRLF sequence, followed by the chunk data.
The only solution I found is to force HTTP 1.0
request[] = strtoupper($method) . ' ' . ((empty($path)) ? '/' : $path) . ' HTTP/1.0';
This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/38963.