From 2b15c05bcc8eec1b061faae0728244392b10b7ee Mon Sep 17 00:00:00 2001
From: Lann
Date: Thu, 25 Jul 2024 10:15:57 -0400
Subject: [PATCH] Update request authority documentation
The existing wording refers to a "request's authority", which is not
well-defined. This rewords it to refer to the "request's target URI
authority" - the "authority" part of the "target URI" of the request,
which is well-defined.
---
proxy.md | 12 ++++++------
wit-0.3.0-draft/types.wit | 10 +++++-----
wit/types.wit | 12 ++++++------
3 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/proxy.md b/proxy.md
index 528ba1c..6b0de97 100644
--- a/proxy.md
+++ b/proxy.md
@@ -888,7 +888,7 @@ list with the same key.
option<scheme
>
[method]incoming-request.authority: func
-Returns the authority from the request, if it was present.
+Returns the authority of the Request's target URI, if present.
Params
self
: borrow<incoming-request
>
@@ -1027,8 +1027,8 @@ string given is not a syntactically valid uri scheme.
- result
[method]outgoing-request.authority: func
-Get the HTTP Authority for the Request. A value of none
may be used
-with Related Schemes which do not require an Authority. The HTTP and
+
Get the authority of the Request's target URI. A value of none
may be used
+with Related Schemes which do not require an authority. The HTTP and
HTTPS schemes always require an authority.
Params
@@ -1039,10 +1039,10 @@ HTTPS schemes always require an authority.
- option<
string
>
[method]outgoing-request.set-authority: func
-Set the HTTP Authority for the Request. A value of none
may be used
-with Related Schemes which do not require an Authority. The HTTP and
+
Set the authority of the Request's target URI. A value of none
may be used
+with Related Schemes which do not require an authority. The HTTP and
HTTPS schemes always require an authority. Fails if the string given is
-not a syntactically valid uri authority.
+not a syntactically valid URI authority.
Params
self
: borrow<outgoing-request
>
diff --git a/wit-0.3.0-draft/types.wit b/wit-0.3.0-draft/types.wit
index 58c655c..58854b6 100644
--- a/wit-0.3.0-draft/types.wit
+++ b/wit-0.3.0-draft/types.wit
@@ -304,14 +304,14 @@ interface types {
/// string given is not a syntactically valid uri scheme.
set-scheme: func(scheme: option) -> result;
- /// Get the HTTP Authority for the Request. A value of `none` may be used
- /// with Related Schemes which do not require an Authority. The HTTP and
+ /// Get the authority of the Request's target URI. A value of `none` may be used
+ /// with Related Schemes which do not require an authority. The HTTP and
/// HTTPS schemes always require an authority.
authority: func() -> option;
- /// Set the HTTP Authority for the Request. A value of `none` may be used
- /// with Related Schemes which do not require an Authority. The HTTP and
+ /// Set the authority of the Request's target URI. A value of `none` may be used
+ /// with Related Schemes which do not require an authority. The HTTP and
/// HTTPS schemes always require an authority. Fails if the string given is
- /// not a syntactically valid uri authority.
+ /// not a syntactically valid URI authority.
set-authority: func(authority: option) -> result;
/// Get the `request-options` to be associated with this request
diff --git a/wit/types.wit b/wit/types.wit
index 981c110..f2ce846 100644
--- a/wit/types.wit
+++ b/wit/types.wit
@@ -267,7 +267,7 @@ interface types {
@since(version = 0.2.0)
scheme: func() -> option;
- /// Returns the authority from the request, if it was present.
+ /// Returns the authority of the Request's target URI, if present.
@since(version = 0.2.0)
authority: func() -> option;
@@ -344,15 +344,15 @@ interface types {
@since(version = 0.2.0)
set-scheme: func(scheme: option) -> result;
- /// Get the HTTP Authority for the Request. A value of `none` may be used
- /// with Related Schemes which do not require an Authority. The HTTP and
+ /// Get the authority of the Request's target URI. A value of `none` may be used
+ /// with Related Schemes which do not require an authority. The HTTP and
/// HTTPS schemes always require an authority.
@since(version = 0.2.0)
authority: func() -> option;
- /// Set the HTTP Authority for the Request. A value of `none` may be used
- /// with Related Schemes which do not require an Authority. The HTTP and
+ /// Set the authority of the Request's target URI. A value of `none` may be used
+ /// with Related Schemes which do not require an authority. The HTTP and
/// HTTPS schemes always require an authority. Fails if the string given is
- /// not a syntactically valid uri authority.
+ /// not a syntactically valid URI authority.
@since(version = 0.2.0)
set-authority: func(authority: option) -> result;