兼容qBittorrent v4.1.5【小钢炮等】

This commit is contained in:
iyuu.cn 2020-08-02 15:38:33 +08:00
parent 1f4da154fb
commit fdd5475e37

View File

@ -236,7 +236,8 @@ class qBittorrent extends AbstractClient
// Find authentication cookie and set in curl connection // Find authentication cookie and set in curl connection
foreach ($this->curl->response_headers as $header) { foreach ($this->curl->response_headers as $header) {
if (preg_match('/SID=(\S[^;]+)/', $header, $matches)) { if (preg_match('/SID=(\S[^;]+)/', $header, $matches)) {
$this->curl->setHeader('Cookie', $matches[0]); $qb415 = '; QB_'.$matches[0]; // 兼容qBittorrent v4.1.5[小钢炮等]
$this->curl->setHeader('Cookie', $matches[0].$qb415);
return true; return true;
} }
}; };