Skip to content

Commit 2ce93c4

Browse files
Replaced all insecure/redirecting links
1 parent be45764 commit 2ce93c4

File tree

9 files changed

+36
-36
lines changed

9 files changed

+36
-36
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -637,7 +637,7 @@ this library also provides additional functionality when working with URIs as st
637637
An instance of `Psr\Http\Message\UriInterface` can either be an absolute URI or a relative reference.
638638
An absolute URI has a scheme. A relative reference is used to express a URI relative to another URI,
639639
the base URI. Relative references can be divided into several forms according to
640-
[RFC 3986 Section 4.2](https://tools.ietf.org/html/rfc3986#section-4.2):
640+
[RFC 3986 Section 4.2](https://datatracker.ietf.org/doc/html/rfc3986#section-4.2):
641641

642642
- network-path references, e.g. `//example.com/path`
643643
- absolute-path references, e.g. `/path`
@@ -696,8 +696,8 @@ or the standard port. This method can be used independently of the implementatio
696696
`public static function composeComponents($scheme, $authority, $path, $query, $fragment): string`
697697

698698
Composes a URI reference string from its various components according to
699-
[RFC 3986 Section 5.3](https://tools.ietf.org/html/rfc3986#section-5.3). Usually this method does not need to be called
700-
manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`.
699+
[RFC 3986 Section 5.3](https://datatracker.ietf.org/doc/html/rfc3986#section-5.3). Usually this method does not need
700+
to be called manually but instead is used indirectly via `Psr\Http\Message\UriInterface::__toString`.
701701

702702
### `GuzzleHttp\Psr7\Uri::fromParts`
703703

@@ -741,8 +741,8 @@ Determines if a modified URL should be considered cross-origin with respect to a
741741
## Reference Resolution
742742

743743
`GuzzleHttp\Psr7\UriResolver` provides methods to resolve a URI reference in the context of a base URI according
744-
to [RFC 3986 Section 5](https://tools.ietf.org/html/rfc3986#section-5). This is for example also what web browsers
745-
do when resolving a link in a website based on the current request URI.
744+
to [RFC 3986 Section 5](https://datatracker.ietf.org/doc/html/rfc3986#section-5). This is for example also what web
745+
browsers do when resolving a link in a website based on the current request URI.
746746

747747
### `GuzzleHttp\Psr7\UriResolver::resolve`
748748

@@ -755,7 +755,7 @@ Converts the relative URI into a new URI that is resolved against the base URI.
755755
`public static function removeDotSegments(string $path): string`
756756

757757
Removes dot segments from a path and returns the new path according to
758-
[RFC 3986 Section 5.2.4](https://tools.ietf.org/html/rfc3986#section-5.2.4).
758+
[RFC 3986 Section 5.2.4](https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4).
759759

760760
### `GuzzleHttp\Psr7\UriResolver::relativize`
761761

@@ -781,7 +781,7 @@ echo UriResolver::relativize($base, new Uri('http://example.org/a/b/')); // pr
781781
## Normalization and Comparison
782782

783783
`GuzzleHttp\Psr7\UriNormalizer` provides methods to normalize and compare URIs according to
784-
[RFC 3986 Section 6](https://tools.ietf.org/html/rfc3986#section-6).
784+
[RFC 3986 Section 6](https://datatracker.ietf.org/doc/html/rfc3986#section-6).
785785

786786
### `GuzzleHttp\Psr7\UriNormalizer::normalize`
787787

src/InflateStream.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313
* then appends the zlib.inflate filter. The stream is then converted back
1414
* to a Guzzle stream resource to be used as a Guzzle stream.
1515
*
16-
* @see http://tools.ietf.org/html/rfc1950
17-
* @see http://tools.ietf.org/html/rfc1952
18-
* @see http://php.net/manual/en/filters.compression.php
16+
* @see https://datatracker.ietf.org/doc/html/rfc1950
17+
* @see https://datatracker.ietf.org/doc/html/rfc1952
18+
* @see https://www.php.net/manual/en/filters.compression.php
1919
*/
2020
final class InflateStream implements StreamInterface
2121
{
@@ -28,7 +28,7 @@ public function __construct(StreamInterface $stream)
2828
{
2929
$resource = StreamWrapper::getResource($stream);
3030
// Specify window=15+32, so zlib will use header detection to both gzip (with header) and zlib data
31-
// See http://www.zlib.net/manual.html#Advanced definition of inflateInit2
31+
// See https://www.zlib.net/manual.html#Advanced definition of inflateInit2
3232
// "Add 32 to windowBits to enable zlib and gzip decoding with automatic header detection"
3333
// Default window size is 15.
3434
stream_filter_append($resource, 'zlib.inflate', STREAM_FILTER_READ, ['window' => 15 + 32]);

src/Message.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ public static function parseMessage(string $message): array
146146

147147
// If these aren't the same, then one line didn't match and there's an invalid header.
148148
if ($count !== substr_count($rawHeaders, "\n")) {
149-
// Folding is deprecated, see https://tools.ietf.org/html/rfc7230#section-3.2.4
149+
// Folding is deprecated, see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4
150150
if (preg_match(Rfc7230::HEADER_FOLD_REGEX, $rawHeaders)) {
151151
throw new \InvalidArgumentException('Invalid header syntax: Obsolete line folding');
152152
}
@@ -227,9 +227,9 @@ public static function parseRequest(string $message): RequestInterface
227227
public static function parseResponse(string $message): ResponseInterface
228228
{
229229
$data = self::parseMessage($message);
230-
// According to https://tools.ietf.org/html/rfc7230#section-3.1.2 the space
231-
// between status-code and reason-phrase is required. But browsers accept
232-
// responses without space and reason as well.
230+
// According to https://datatracker.ietf.org/doc/html/rfc7230#section-3.1.2
231+
// the space between status-code and reason-phrase is required. But
232+
// browsers accept responses without space and reason as well.
233233
if (!preg_match('/^HTTP\/.* [0-9]{3}( .*|$)/', $data['start-line'])) {
234234
throw new \InvalidArgumentException('Invalid response string: '.$data['start-line']);
235235
}

src/MessageTrait.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ private function normalizeHeaderValue($value): array
193193
*
194194
* @return string[] Trimmed header values
195195
*
196-
* @see https://tools.ietf.org/html/rfc7230#section-3.2.4
196+
* @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4
197197
*/
198198
private function trimAndValidateHeaderValues(array $values): array
199199
{
@@ -213,7 +213,7 @@ private function trimAndValidateHeaderValues(array $values): array
213213
}
214214

215215
/**
216-
* @see https://tools.ietf.org/html/rfc7230#section-3.2
216+
* @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2
217217
*
218218
* @param mixed $header
219219
*/
@@ -234,7 +234,7 @@ private function assertHeader($header): void
234234
}
235235

236236
/**
237-
* @see https://tools.ietf.org/html/rfc7230#section-3.2
237+
* @see https://datatracker.ietf.org/doc/html/rfc7230#section-3.2
238238
*
239239
* field-value = *( field-content / obs-fold )
240240
* field-content = field-vchar [ 1*( SP / HTAB ) field-vchar ]

src/Request.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ private function updateHostFromUri(): void
143143
$this->headerNames['host'] = 'Host';
144144
}
145145
// Ensure Host is the first header.
146-
// See: http://tools.ietf.org/html/rfc7230#section-5.4
146+
// See: https://datatracker.ietf.org/doc/html/rfc7230#section-5.4
147147
$this->headers = [$header => [$host]] + $this->headers;
148148
}
149149

src/Stream.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
class Stream implements StreamInterface
1313
{
1414
/**
15-
* @see http://php.net/manual/function.fopen.php
16-
* @see http://php.net/manual/en/function.gzopen.php
15+
* @see https://www.php.net/manual/en/function.fopen.php
16+
* @see https://www.php.net/manual/en/function.gzopen.php
1717
*/
1818
private const READABLE_MODES = '/r|a\+|ab\+|w\+|wb\+|x\+|xb\+|c\+|cb\+/';
1919
private const WRITABLE_MODES = '/a|w|r\+|rb\+|rw|x|c/';

src/Uri.php

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -41,14 +41,14 @@ class Uri implements UriInterface, \JsonSerializable
4141
/**
4242
* Unreserved characters for use in a regex.
4343
*
44-
* @see https://tools.ietf.org/html/rfc3986#section-2.3
44+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.3
4545
*/
4646
private const CHAR_UNRESERVED = 'a-zA-Z0-9_\-\.~';
4747

4848
/**
4949
* Sub-delims for use in a regex.
5050
*
51-
* @see https://tools.ietf.org/html/rfc3986#section-2.2
51+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-2.2
5252
*/
5353
private const CHAR_SUB_DELIMS = '!\$&\'\(\)\*\+,;=';
5454
private const QUERY_SEPARATORS_REPLACEMENT = ['=' => '%3D', '&' => '%26'];
@@ -162,7 +162,7 @@ public function __toString(): string
162162
* `file:///` is the more common syntax for the file scheme anyway (Chrome for example redirects to
163163
* that format).
164164
*
165-
* @see https://tools.ietf.org/html/rfc3986#section-5.3
165+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.3
166166
*/
167167
public static function composeComponents(?string $scheme, ?string $authority, string $path, ?string $query, ?string $fragment): string
168168
{
@@ -219,7 +219,7 @@ public static function isDefaultPort(UriInterface $uri): bool
219219
* @see Uri::isNetworkPathReference
220220
* @see Uri::isAbsolutePathReference
221221
* @see Uri::isRelativePathReference
222-
* @see https://tools.ietf.org/html/rfc3986#section-4
222+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-4
223223
*/
224224
public static function isAbsolute(UriInterface $uri): bool
225225
{
@@ -231,7 +231,7 @@ public static function isAbsolute(UriInterface $uri): bool
231231
*
232232
* A relative reference that begins with two slash characters is termed an network-path reference.
233233
*
234-
* @see https://tools.ietf.org/html/rfc3986#section-4.2
234+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
235235
*/
236236
public static function isNetworkPathReference(UriInterface $uri): bool
237237
{
@@ -243,7 +243,7 @@ public static function isNetworkPathReference(UriInterface $uri): bool
243243
*
244244
* A relative reference that begins with a single slash character is termed an absolute-path reference.
245245
*
246-
* @see https://tools.ietf.org/html/rfc3986#section-4.2
246+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
247247
*/
248248
public static function isAbsolutePathReference(UriInterface $uri): bool
249249
{
@@ -258,7 +258,7 @@ public static function isAbsolutePathReference(UriInterface $uri): bool
258258
*
259259
* A relative reference that does not begin with a slash character is termed a relative-path reference.
260260
*
261-
* @see https://tools.ietf.org/html/rfc3986#section-4.2
261+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.2
262262
*/
263263
public static function isRelativePathReference(UriInterface $uri): bool
264264
{
@@ -277,7 +277,7 @@ public static function isRelativePathReference(UriInterface $uri): bool
277277
* @param UriInterface $uri The URI to check
278278
* @param UriInterface|null $base An optional base URI to compare against
279279
*
280-
* @see https://tools.ietf.org/html/rfc3986#section-4.4
280+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-4.4
281281
*/
282282
public static function isSameDocumentReference(UriInterface $uri, UriInterface $base = null): bool
283283
{
@@ -353,7 +353,7 @@ public static function withQueryValues(UriInterface $uri, array $keyValueArray):
353353
/**
354354
* Creates a URI from a hash of `parse_url` components.
355355
*
356-
* @see http://php.net/manual/en/function.parse-url.php
356+
* @see https://www.php.net/manual/en/function.parse-url.php
357357
*
358358
* @throws MalformedUriException If the components do not form a valid URI.
359359
*/

src/UriNormalizer.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
*
1212
* @author Tobias Schultze
1313
*
14-
* @see https://tools.ietf.org/html/rfc3986#section-6
14+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-6
1515
*/
1616
final class UriNormalizer
1717
{
@@ -119,7 +119,7 @@ final class UriNormalizer
119119
* @param UriInterface $uri The URI to normalize
120120
* @param int $flags A bitmask of normalizations to apply, see constants
121121
*
122-
* @see https://tools.ietf.org/html/rfc3986#section-6.2
122+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.2
123123
*/
124124
public static function normalize(UriInterface $uri, int $flags = self::PRESERVING_NORMALIZATIONS): UriInterface
125125
{
@@ -174,7 +174,7 @@ public static function normalize(UriInterface $uri, int $flags = self::PRESERVIN
174174
* @param UriInterface $uri2 An URI to compare
175175
* @param int $normalizations A bitmask of normalizations to apply, see constants
176176
*
177-
* @see https://tools.ietf.org/html/rfc3986#section-6.1
177+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-6.1
178178
*/
179179
public static function isEquivalent(UriInterface $uri1, UriInterface $uri2, int $normalizations = self::PRESERVING_NORMALIZATIONS): bool
180180
{

src/UriResolver.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,14 +11,14 @@
1111
*
1212
* @author Tobias Schultze
1313
*
14-
* @see https://tools.ietf.org/html/rfc3986#section-5
14+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5
1515
*/
1616
final class UriResolver
1717
{
1818
/**
1919
* Removes dot segments from a path and returns the new path.
2020
*
21-
* @see http://tools.ietf.org/html/rfc3986#section-5.2.4
21+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2.4
2222
*/
2323
public static function removeDotSegments(string $path): string
2424
{
@@ -53,7 +53,7 @@ public static function removeDotSegments(string $path): string
5353
/**
5454
* Converts the relative URI into a new URI that is resolved against the base URI.
5555
*
56-
* @see http://tools.ietf.org/html/rfc3986#section-5.2
56+
* @see https://datatracker.ietf.org/doc/html/rfc3986#section-5.2
5757
*/
5858
public static function resolve(UriInterface $base, UriInterface $rel): UriInterface
5959
{

0 commit comments

Comments
 (0)