fix:更新已知bug,优化代码
This commit is contained in:
1
vendor/guzzlehttp/psr7/src/AppendStream.php
vendored
1
vendor/guzzlehttp/psr7/src/AppendStream.php
vendored
@@ -191,7 +191,6 @@ final class AppendStream implements StreamInterface
|
||||
$progressToNext = false;
|
||||
|
||||
while ($remaining > 0) {
|
||||
|
||||
// Progress to the next stream if needed.
|
||||
if ($progressToNext || $this->streams[$this->current]->eof()) {
|
||||
$progressToNext = false;
|
||||
|
||||
2
vendor/guzzlehttp/psr7/src/Header.php
vendored
2
vendor/guzzlehttp/psr7/src/Header.php
vendored
@@ -62,7 +62,7 @@ final class Header
|
||||
}
|
||||
|
||||
/**
|
||||
* Splits a HTTP header defined to contain comma-separated list into
|
||||
* Splits a HTTP header defined to contain a comma-separated list into
|
||||
* each individual value. Empty values will be removed.
|
||||
*
|
||||
* Example headers include 'accept', 'cache-control' and 'if-none-match'.
|
||||
|
||||
1
vendor/guzzlehttp/psr7/src/Message.php
vendored
1
vendor/guzzlehttp/psr7/src/Message.php
vendored
@@ -67,6 +67,7 @@ final class Message
|
||||
return null;
|
||||
}
|
||||
|
||||
$body->rewind();
|
||||
$summary = $body->read($truncateAt);
|
||||
$body->rewind();
|
||||
|
||||
|
||||
@@ -34,7 +34,7 @@ final class MultipartStream implements StreamInterface
|
||||
*/
|
||||
public function __construct(array $elements = [], string $boundary = null)
|
||||
{
|
||||
$this->boundary = $boundary ?: sha1(uniqid('', true));
|
||||
$this->boundary = $boundary ?: bin2hex(random_bytes(20));
|
||||
$this->stream = $this->createStream($elements);
|
||||
}
|
||||
|
||||
|
||||
8
vendor/guzzlehttp/psr7/src/Uri.php
vendored
8
vendor/guzzlehttp/psr7/src/Uri.php
vendored
@@ -172,10 +172,14 @@ class Uri implements UriInterface, \JsonSerializable
|
||||
$uri .= $scheme . ':';
|
||||
}
|
||||
|
||||
if ($authority != ''|| $scheme === 'file') {
|
||||
if ($authority != '' || $scheme === 'file') {
|
||||
$uri .= '//' . $authority;
|
||||
}
|
||||
|
||||
if ($authority != '' && $path != '' && $path[0] != '/') {
|
||||
$path = '/' . $path;
|
||||
}
|
||||
|
||||
$uri .= $path;
|
||||
|
||||
if ($query != '') {
|
||||
@@ -731,8 +735,6 @@ class Uri implements UriInterface, \JsonSerializable
|
||||
if ($this->scheme === '' && false !== strpos(explode('/', $this->path, 2)[0], ':')) {
|
||||
throw new MalformedUriException('A relative URI must not have a path beginning with a segment containing a colon');
|
||||
}
|
||||
} elseif (isset($this->path[0]) && $this->path[0] !== '/') {
|
||||
throw new MalformedUriException('The path of a URI with an authority must start with a slash "/" or be empty');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user