Skip to content

Commit e8f535e

Browse files
committed
fix typo
1 parent be8b2a7 commit e8f535e

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

src/http/client.mbt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ pub async fn Client::connect(
6868
try {
6969
let response = proxy..request(Connect, path).end_request()
7070
guard response.code is (200..<300) else { raise ProxyError(response) }
71-
proxy..skip_response_body()..entre_passthrough_mode()
71+
proxy..skip_response_body()..enter_passthrough_mode()
7272
} catch {
7373
err => {
7474
proxy.close()
@@ -293,7 +293,7 @@ pub async fn Client::post(
293293
/// the client must be in a clean state
294294
/// (i.e. not in the middle of sending a request).
295295
/// Unread data from the body of the last response will be discarded.
296-
pub async fn Client::entre_passthrough_mode(self : Client) -> Unit {
296+
pub async fn Client::enter_passthrough_mode(self : Client) -> Unit {
297297
guard self.sender.mode is SendingHeader
298298
self.reader.enter_passthrough_mode()
299299
self.sender.enter_passthrough_mode()

src/http/pkg.generated.mbti

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ fn Client::close(Self) -> Unit
5454
#deprecated
5555
async fn Client::connect(String, headers? : Map[String, String], protocol? : Protocol, port? : Int, proxy? : Self) -> Self
5656
async fn Client::end_request(Self) -> Response
57-
async fn Client::entre_passthrough_mode(Self) -> Unit
57+
async fn Client::enter_passthrough_mode(Self) -> Unit
5858
async fn Client::flush(Self) -> Unit
5959
async fn Client::get(Self, String, extra_headers? : Map[String, String], body? : &@io.Data) -> Response
6060
async fn Client::new(String, headers? : Map[String, String], proxy? : Self) -> Self
@@ -120,7 +120,7 @@ type ServerConnection
120120
fn ServerConnection::client_addr(Self) -> @socket.Addr
121121
fn ServerConnection::close(Self) -> Unit
122122
async fn ServerConnection::end_response(Self) -> Unit
123-
async fn ServerConnection::entre_passthrough_mode(Self) -> Unit
123+
async fn ServerConnection::enter_passthrough_mode(Self) -> Unit
124124
async fn ServerConnection::flush(Self) -> Unit
125125
fn ServerConnection::new(@socket.Tcp, headers? : Map[String, String]) -> Self
126126
async fn ServerConnection::read_request(Self) -> Request

src/http/proxy_test.mbt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ async test "passthrough mode" {
2727
inspect(request.meth, content="Connect")
2828
inspect(request.path, content="/path")
2929
conn..send_response(200, "OK")..end_response()
30-
conn.entre_passthrough_mode()
30+
conn.enter_passthrough_mode()
3131
while conn.read_some() is Some(packet) {
3232
let packet = @encoding/utf8.decode(packet)
3333
log.push("server received: \{packet}")
@@ -37,7 +37,7 @@ async test "passthrough mode" {
3737
defer client.close()
3838
let response = client..request(Connect, "/path").end_request()
3939
inspect(response.code, content="200")
40-
client.entre_passthrough_mode()
40+
client.enter_passthrough_mode()
4141
for packet in ["abcd", "efgh", "ijkl"] {
4242
log.push("client sending: \{packet}")
4343
client.write(packet)
@@ -78,7 +78,7 @@ async fn handle_connect(
7878
defer client.close()
7979
log.push("proxy server: connected to \{request.path} successfully")
8080
conn..send_response(200, "OK")..end_response()
81-
conn.entre_passthrough_mode()
81+
conn.enter_passthrough_mode()
8282
@async.with_task_group(group => {
8383
group.spawn_bg(() => conn.write_reader(client))
8484
group.spawn_bg(() => client.write_reader(conn))

src/http/server.mbt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -276,7 +276,7 @@ pub async fn Server::run_forever(
276276
/// the server must be in a clean state
277277
/// (i.e. not in the middle of sending a response).
278278
/// Unread data from the body of the last request will be discarded.
279-
pub async fn ServerConnection::entre_passthrough_mode(self : Self) -> Unit {
279+
pub async fn ServerConnection::enter_passthrough_mode(self : Self) -> Unit {
280280
guard self.sender.mode is SendingHeader
281281
self.reader.enter_passthrough_mode()
282282
self.sender.enter_passthrough_mode()

0 commit comments

Comments
 (0)