Hi,

The attached patch fixes typos in code comment of the http subsystem.
Note that I included the changes for those 4 files in it as I think
they probably belong to the same subsystem, let me know if it's not
the case:
* src/flt_http_comp.c
* src/http.c
* src/http_conv.c
* src/http_fetch.c

Thanks,
Joseph
From 9bc05798774992521c1135e4409a9a7c9c46d516 Mon Sep 17 00:00:00 2001
From: Joseph Herlant <[email protected]>
Date: Thu, 15 Nov 2018 13:57:22 -0800
Subject: [PATCH] CLEANUP: Fix typos in the http subsystem

Fix typos in code comment of the http subsystem.
---
 src/flt_http_comp.c | 4 ++--
 src/http.c          | 4 ++--
 src/http_conv.c     | 2 +-
 src/http_fetch.c    | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c
index 6092dfc7..b4f093c2 100644
--- a/src/flt_http_comp.c
+++ b/src/flt_http_comp.c
@@ -269,7 +269,7 @@ comp_http_forward_data(struct stream *s, struct filter *filter,
 
 	if (!st->initialized) {
 		if (!len) {
-			/* Nothing to foward */
+			/* Nothing to forward */
 			ret = len;
 		}
 		else if (st->hdrs_len > len) {
@@ -715,7 +715,7 @@ http_compression_buffer_end(struct comp_state *st, struct stream *s,
 	 * (chunk size, trailers, ...).
 	 */
 
-	/* Write real size at the begining of the chunk, no need of wrapping.
+	/* Write real size at the beginning of the chunk, no need of wrapping.
 	 * We write the chunk using a dynamic length and adjust out->p and out->i
 	 * accordingly afterwards. That will move <out> away from <data>.
 	 */
diff --git a/src/http.c b/src/http.c
index 30d349a4..64e93d66 100644
--- a/src/http.c
+++ b/src/http.c
@@ -699,7 +699,7 @@ char *http_extract_cookie_value(char *hdr, const char *hdr_end,
 	return NULL;
 }
 
-/* Parses a qvalue and returns it multipled by 1000, from 0 to 1000. If the
+/* Parses a qvalue and returns it multiplied by 1000, from 0 to 1000. If the
  * value is larger than 1000, it is bound to 1000. The parser consumes up to
  * 1 digit, one dot and 3 digits and stops on the first invalid character.
  * Unparsable qvalues return 1000 as "q=1.000".
@@ -735,7 +735,7 @@ int http_parse_qvalue(const char *qvalue, const char **end)
 }
 
 /*
- * Given a url parameter, find the starting position of the first occurence,
+ * Given a url parameter, find the starting position of the first occurrence,
  * or NULL if the parameter is not found.
  *
  * Example: if query_string is "yo=mama;ye=daddy" and url_param_name is "ye",
diff --git a/src/http_conv.c b/src/http_conv.c
index 42a7616b..c6cfdab3 100644
--- a/src/http_conv.c
+++ b/src/http_conv.c
@@ -218,7 +218,7 @@ static int sample_conv_url_dec(const struct arg *args, struct sample *smp, void
 {
 	int len;
 
-	/* If the constant flag is set or if not size is avalaible at
+	/* If the constant flag is set or if not size is available at
 	 * the end of the buffer, copy the string in other buffer
 	  * before decoding.
 	 */
diff --git a/src/http_fetch.c b/src/http_fetch.c
index 40381ccb..a1bed3ae 100644
--- a/src/http_fetch.c
+++ b/src/http_fetch.c
@@ -355,8 +355,8 @@ static int smp_fetch_uniqueid(const struct arg *args, struct sample *smp, const
 }
 
 /* Returns a string block containing all headers including the
- * empty line wich separes headers from the body. This is useful
- * form some headers analysis.
+ * empty line which separes headers from the body. This is useful
+ * for some headers analysis.
  */
 static int smp_fetch_hdrs(const struct arg *args, struct sample *smp, const char *kw, void *private)
 {
-- 
2.19.1

Reply via email to