From 8279c861fafb34404c57ae8e92b8ce737e6daf75 Mon Sep 17 00:00:00 2001 From: rustfix <771054535@qq.com> Date: Mon, 15 Apr 2024 12:13:42 +0800 Subject: [PATCH] chore: fix some typos in comments Signed-off-by: rustfix <771054535@qq.com> --- docs/Request-rewriting.md | 2 +- examples/middleware/token_modifier.go | 2 +- internal/tcp/tcp_message.go | 2 +- internal/tcp/tcp_packet.go | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/Request-rewriting.md b/docs/Request-rewriting.md index fb378b78..54ac8799 100644 --- a/docs/Request-rewriting.md +++ b/docs/Request-rewriting.md @@ -28,7 +28,7 @@ gor --input-raw :80 --output-http "http://staging.server" \ ``` #### Host header -Host header gets special treatment. By default Host get set to the value specified in --output-http. If you manually set --http-set-header "Host: anonther.com", Gor will not override Host value. +Host header gets special treatment. By default Host get set to the value specified in --output-http. If you manually set --http-set-header "Host: another.com", Gor will not override Host value. If you app accepts traffic from multiple domains, and you want to keep original headers, there is specific `--http-original-host` with tells Gor do not touch Host header at all. diff --git a/examples/middleware/token_modifier.go b/examples/middleware/token_modifier.go index b623483e..0013a6e9 100644 --- a/examples/middleware/token_modifier.go +++ b/examples/middleware/token_modifier.go @@ -92,7 +92,7 @@ func process(buf []byte) { // Token is inside response body secureToken := proto.Body(payload) originalTokens[reqID] = secureToken - Debug("Remember origial token:", string(secureToken)) + Debug("Remember original token:", string(secureToken)) } case '3': // Replayed response if originalToken, ok := originalTokens[reqID]; ok { diff --git a/internal/tcp/tcp_message.go b/internal/tcp/tcp_message.go index e2a2188a..0aac062f 100644 --- a/internal/tcp/tcp_message.go +++ b/internal/tcp/tcp_message.go @@ -384,7 +384,7 @@ func (parser *MessageParser) Fix100Continue(m *Message) { p.Ack += 25 } - // If next section was aready approved and received, merge messages + // If next section was already approved and received, merge messages if next, found := parser.m[m.packets[0].MessageID()]; found { for _, p := range next.packets { parser.addPacket(m, p) diff --git a/internal/tcp/tcp_packet.go b/internal/tcp/tcp_packet.go index 43fb9942..43c2f3ac 100644 --- a/internal/tcp/tcp_packet.go +++ b/internal/tcp/tcp_packet.go @@ -53,7 +53,7 @@ const ( /* Packet represent data and layers of packet. parser extracts information from pcap Packet. functions of *Packet doesn't validate if packet is nil, -calllers must make sure that ParsePacket has'nt returned any error before calling any other +calllers must make sure that ParsePacket hasn't returned any error before calling any other function. */ type Packet struct {