From 9efcf0b079e6267a098974fab2cc5c2d2fda87d4 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Sat, 20 Apr 2024 09:10:14 +0000 Subject: [PATCH 1/6] build(deps): bump rustls from 0.21.10 to 0.21.11 (#554) --- Cargo.lock | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index faa6084..2f34153 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3116,9 +3116,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.21.10" +version = "0.21.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" +checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" dependencies = [ "log", "ring", From 93fd8f8565fc7f0334917b3ff3012972ce68cea7 Mon Sep 17 00:00:00 2001 From: Todor Todorov Date: Thu, 25 Apr 2024 20:31:47 +0300 Subject: [PATCH 2/6] =?UTF-8?q?=F0=9F=8E=A8=20style:=20change=20`http/http?= =?UTF-8?q?s`=20header=20word/sentence=20casing=20(#555)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Currently all HTTP request headers are in snake case and upper case. The adopted standard is kebab case and title case. Here you will find more details: https://en.wikipedia.org/wiki/List_of_HTTP_header_fields#Standard_request_fields --- src/engines/bing.rs | 8 ++++---- src/engines/brave.rs | 8 ++++---- src/engines/duckduckgo.rs | 8 ++++---- src/engines/librex.rs | 8 ++++---- src/engines/mojeek.rs | 8 ++++---- src/engines/searx.rs | 8 ++++---- src/engines/startpage.rs | 8 ++++---- 7 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/engines/bing.rs b/src/engines/bing.rs index ec582e4..50cf048 100644 --- a/src/engines/bing.rs +++ b/src/engines/bing.rs @@ -79,13 +79,13 @@ impl SearchEngine for Bing { } let header_map = HeaderMap::try_from(&HashMap::from([ - ("USER_AGENT".to_string(), user_agent.to_string()), - ("REFERER".to_string(), "https://google.com/".to_string()), + ("User-Agent".to_string(), user_agent.to_string()), + ("Referer".to_string(), "https://google.com/".to_string()), ( - "CONTENT_TYPE".to_string(), + "Content-Type".to_string(), "application/x-www-form-urlencoded".to_string(), ), - ("COOKIE".to_string(), cookie_string), + ("Cookie".to_string(), cookie_string), ])) .change_context(EngineError::UnexpectedError)?; diff --git a/src/engines/brave.rs b/src/engines/brave.rs index 65067fc..e135c36 100644 --- a/src/engines/brave.rs +++ b/src/engines/brave.rs @@ -54,14 +54,14 @@ impl SearchEngine for Brave { }; let header_map = HeaderMap::try_from(&HashMap::from([ - ("USER_AGENT".to_string(), user_agent.to_string()), + ("User-Agent".to_string(), user_agent.to_string()), ( - "CONTENT_TYPE".to_string(), + "Content-Type".to_string(), "application/x-www-form-urlencoded".to_string(), ), - ("REFERER".to_string(), "https://google.com/".to_string()), + ("Referer".to_string(), "https://google.com/".to_string()), ( - "COOKIE".to_string(), + "Cookie".to_string(), format!("safe_search={safe_search_level}"), ), ])) diff --git a/src/engines/duckduckgo.rs b/src/engines/duckduckgo.rs index 02ee481..b109624 100644 --- a/src/engines/duckduckgo.rs +++ b/src/engines/duckduckgo.rs @@ -65,13 +65,13 @@ impl SearchEngine for DuckDuckGo { // initializing HeaderMap and adding appropriate headers. let header_map = HeaderMap::try_from(&HashMap::from([ - ("USER_AGENT".to_string(), user_agent.to_string()), - ("REFERER".to_string(), "https://google.com/".to_string()), + ("User-Agent".to_string(), user_agent.to_string()), + ("Referer".to_string(), "https://google.com/".to_string()), ( - "CONTENT_TYPE".to_string(), + "Content-Type".to_string(), "application/x-www-form-urlencoded".to_string(), ), - ("COOKIE".to_string(), "kl=wt-wt".to_string()), + ("Cookie".to_string(), "kl=wt-wt".to_string()), ])) .change_context(EngineError::UnexpectedError)?; diff --git a/src/engines/librex.rs b/src/engines/librex.rs index 69e4611..840e8f4 100644 --- a/src/engines/librex.rs +++ b/src/engines/librex.rs @@ -72,11 +72,11 @@ impl SearchEngine for LibreX { // initializing HeaderMap and adding appropriate headers. let header_map = HeaderMap::try_from(&HashMap::from([ - ("USER_AGENT".to_string(), user_agent.to_string()), - ("REFERER".to_string(), "https://google.com/".to_string()), - ("CONTENT_TYPE".to_string(), "application/x-www-form-urlencoded".to_string()), + ("User-Agent".to_string(), user_agent.to_string()), + ("Referer".to_string(), "https://google.com/".to_string()), + ("Content-Type".to_string(), "application/x-www-form-urlencoded".to_string()), ( - "COOKIE".to_string(), + "Cookie".to_string(), "theme=amoled; disable_special=on; disable_frontends=on; language=en; number_of_results=10; safe_search=on; save=1".to_string(), ), ])) diff --git a/src/engines/mojeek.rs b/src/engines/mojeek.rs index e376828..d3b13b6 100644 --- a/src/engines/mojeek.rs +++ b/src/engines/mojeek.rs @@ -129,13 +129,13 @@ impl SearchEngine for Mojeek { } let header_map = HeaderMap::try_from(&HashMap::from([ - ("USER_AGENT".to_string(), user_agent.to_string()), - ("REFERER".to_string(), "https://google.com/".to_string()), + ("User-Agent".to_string(), user_agent.to_string()), + ("Referer".to_string(), "https://google.com/".to_string()), ( - "CONTENT_TYPE".to_string(), + "Content-Type".to_string(), "application/x-www-form-urlencoded".to_string(), ), - ("COOKIE".to_string(), cookie_string), + ("Cookie".to_string(), cookie_string), ])) .change_context(EngineError::UnexpectedError)?; diff --git a/src/engines/searx.rs b/src/engines/searx.rs index df96857..a1fb6c7 100644 --- a/src/engines/searx.rs +++ b/src/engines/searx.rs @@ -66,10 +66,10 @@ impl SearchEngine for Searx { // initializing headers and adding appropriate headers. let header_map = HeaderMap::try_from(&HashMap::from([ - ("USER_AGENT".to_string(), user_agent.to_string()), - ("REFERER".to_string(), "https://google.com/".to_string()), - ("CONTENT_TYPE".to_string(), "application/x-www-form-urlencoded".to_string()), - ("COOKIE".to_string(), "categories=general; language=auto; locale=en; autocomplete=duckduckgo; image_proxy=1; method=POST; safesearch=2; theme=simple; results_on_new_tab=1; doi_resolver=oadoi.org; simple_style=auto; center_alignment=1; query_in_title=1; infinite_scroll=0; disabled_engines=; enabled_engines=\"archive is__general\\054yep__general\\054curlie__general\\054currency__general\\054ddg definitions__general\\054wikidata__general\\054duckduckgo__general\\054tineye__general\\054lingva__general\\054startpage__general\\054yahoo__general\\054wiby__general\\054marginalia__general\\054alexandria__general\\054wikibooks__general\\054wikiquote__general\\054wikisource__general\\054wikiversity__general\\054wikivoyage__general\\054dictzone__general\\054seznam__general\\054mojeek__general\\054naver__general\\054wikimini__general\\054brave__general\\054petalsearch__general\\054goo__general\"; disabled_plugins=; enabled_plugins=\"searx.plugins.hostname_replace\\054searx.plugins.oa_doi_rewrite\\054searx.plugins.vim_hotkeys\"; tokens=; maintab=on; enginetab=on".to_string()) + ("User-Agent".to_string(), user_agent.to_string()), + ("Referer".to_string(), "https://google.com/".to_string()), + ("Content-Type".to_string(), "application/x-www-form-urlencoded".to_string()), + ("Cookie".to_string(), "categories=general; language=auto; locale=en; autocomplete=duckduckgo; image_proxy=1; method=POST; safesearch=2; theme=simple; results_on_new_tab=1; doi_resolver=oadoi.org; simple_style=auto; center_alignment=1; query_in_title=1; infinite_scroll=0; disabled_engines=; enabled_engines=\"archive is__general\\054yep__general\\054curlie__general\\054currency__general\\054ddg definitions__general\\054wikidata__general\\054duckduckgo__general\\054tineye__general\\054lingva__general\\054startpage__general\\054yahoo__general\\054wiby__general\\054marginalia__general\\054alexandria__general\\054wikibooks__general\\054wikiquote__general\\054wikisource__general\\054wikiversity__general\\054wikivoyage__general\\054dictzone__general\\054seznam__general\\054mojeek__general\\054naver__general\\054wikimini__general\\054brave__general\\054petalsearch__general\\054goo__general\"; disabled_plugins=; enabled_plugins=\"searx.plugins.hostname_replace\\054searx.plugins.oa_doi_rewrite\\054searx.plugins.vim_hotkeys\"; tokens=; maintab=on; enginetab=on".to_string()) ])) .change_context(EngineError::UnexpectedError)?; diff --git a/src/engines/startpage.rs b/src/engines/startpage.rs index 97b7a40..b3a28d0 100644 --- a/src/engines/startpage.rs +++ b/src/engines/startpage.rs @@ -57,13 +57,13 @@ impl SearchEngine for Startpage { // initializing HeaderMap and adding appropriate headers. let header_map = HeaderMap::try_from(&HashMap::from([ - ("USER_AGENT".to_string(), user_agent.to_string()), - ("REFERER".to_string(), "https://google.com/".to_string()), + ("User-Agent".to_string(), user_agent.to_string()), + ("Referer".to_string(), "https://google.com/".to_string()), ( - "CONTENT_TYPE".to_string(), + "Content-Type".to_string(), "application/x-www-form-urlencoded".to_string(), ), - ("COOKIE".to_string(), "preferences=connect_to_serverEEE0N1Ndate_timeEEEworldN1Ndisable_family_filterEEE0N1Ndisable_open_in_new_windowEEE0N1Nenable_post_methodEEE1N1Nenable_proxy_safety_suggestEEE1N1Nenable_stay_controlEEE0N1Ninstant_answersEEE1N1Nlang_homepageEEEs%2Fnight%2FenN1NlanguageEEEenglishN1Nlanguage_uiEEEenglishN1Nnum_of_resultsEEE10N1Nsearch_results_regionEEEallN1NsuggestionsEEE1N1Nwt_unitEEEcelsius".to_string()), + ("Cookie".to_string(), "preferences=connect_to_serverEEE0N1Ndate_timeEEEworldN1Ndisable_family_filterEEE0N1Ndisable_open_in_new_windowEEE0N1Nenable_post_methodEEE1N1Nenable_proxy_safety_suggestEEE1N1Nenable_stay_controlEEE0N1Ninstant_answersEEE1N1Nlang_homepageEEEs%2Fnight%2FenN1NlanguageEEEenglishN1Nlanguage_uiEEEenglishN1Nnum_of_resultsEEE10N1Nsearch_results_regionEEEallN1NsuggestionsEEE1N1Nwt_unitEEEcelsius".to_string()), ])) .change_context(EngineError::UnexpectedError)?; From 5b6afb0b670931ad7d6ab14c68ccbfdef3e68fa9 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 13:54:52 +0000 Subject: [PATCH 3/6] build(deps): bump maud from 0.25.0 to 0.26.0 (#559) --- Cargo.lock | 11 +++++------ Cargo.toml | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 2f34153..c44f8b4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2037,9 +2037,9 @@ checksum = "2532096657941c2fea9c289d370a250971c689d4f143798ff67113ec042024a5" [[package]] name = "maud" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0bab19cef8a7fe1c18a43e881793bfc9d4ea984befec3ae5bd0415abf3ecf00" +checksum = "df518b75016b4289cdddffa1b01f2122f4a49802c93191f3133f6dc2472ebcaa" dependencies = [ "actix-web", "futures-util", @@ -2049,14 +2049,14 @@ dependencies = [ [[package]] name = "maud_macros" -version = "0.25.0" +version = "0.26.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0be95d66c3024ffce639216058e5bae17a83ecaf266ffc6e4d060ad447c9eed2" +checksum = "fa453238ec218da0af6b11fc5978d3b5c3a45ed97b722391a2a11f3306274e18" dependencies = [ "proc-macro-error", "proc-macro2 1.0.78", "quote 1.0.35", - "syn 1.0.109", + "syn 2.0.52", ] [[package]] @@ -2666,7 +2666,6 @@ dependencies = [ "proc-macro-error-attr", "proc-macro2 1.0.78", "quote 1.0.35", - "syn 1.0.109", "version_check", ] diff --git a/Cargo.toml b/Cargo.toml index fd6e873..7584f59 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -26,7 +26,7 @@ tokio = { version = "1.32.0", features = [ ], default-features = false } serde = { version = "1.0.196", default-features = false, features = ["derive"] } serde_json = { version = "1.0.109", default-features = false } -maud = { version = "0.25.0", default-features = false, features = [ +maud = { version = "0.26.0", default-features = false, features = [ "actix-web", ] } scraper = { version = "0.18.1", default-features = false } From fe959efd0e236aa3bba069eb716a20a70987eab0 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 13:59:45 +0000 Subject: [PATCH 4/6] build(deps): bump async-trait from 0.1.77 to 0.1.80 (#560) --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index c44f8b4..1f53d3f 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -365,9 +365,9 @@ checksum = "9338790e78aa95a416786ec8389546c4b6a1dfc3dc36071ed9518a9413a542eb" [[package]] name = "async-trait" -version = "0.1.77" +version = "0.1.80" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" +checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" dependencies = [ "proc-macro2 1.0.78", "quote 1.0.35", diff --git a/Cargo.toml b/Cargo.toml index 7584f59..1a5f1b3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -52,7 +52,7 @@ blake3 = { version = "1.5.0", default-features = false } error-stack = { version = "0.4.0", default-features = false, features = [ "std", ] } -async-trait = { version = "0.1.76", default-features = false } +async-trait = { version = "0.1.80", default-features = false } regex = { version = "1.9.4", features = ["perf"], default-features = false } smallvec = { version = "1.13.1", features = [ "union", From 1386cd673986c3d163ddddb85a730cceb7f4a568 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 14:06:17 +0000 Subject: [PATCH 5/6] build(deps): bump serde_json from 1.0.114 to 1.0.116 (#561) --- Cargo.lock | 4 ++-- Cargo.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 1f53d3f..f43fb69 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3315,9 +3315,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.114" +version = "1.0.116" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" +checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" dependencies = [ "itoa 1.0.10", "ryu", diff --git a/Cargo.toml b/Cargo.toml index 1a5f1b3..0bd11a7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -25,7 +25,7 @@ tokio = { version = "1.32.0", features = [ "io-util", ], default-features = false } serde = { version = "1.0.196", default-features = false, features = ["derive"] } -serde_json = { version = "1.0.109", default-features = false } +serde_json = { version = "1.0.116", default-features = false } maud = { version = "0.26.0", default-features = false, features = [ "actix-web", ] } From 9f90caf262c15dda952c92d0dc3d471ba8d3473b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 2 May 2024 14:11:45 +0000 Subject: [PATCH 6/6] build(deps): bump keyword_extraction from 1.3.0 to 1.4.3 (#562) --- Cargo.lock | 8 ++++---- Cargo.toml | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index f43fb69..4edf9a4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1848,9 +1848,9 @@ dependencies = [ [[package]] name = "keyword_extraction" -version = "1.3.0" +version = "1.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c25710ba2c50e4762b267b7387a989d8d1a8235f5cf26cd84e34aac30b263140" +checksum = "f0efa28e79b3a5f72586318c07c24477a169c688e5065fde647c71b3952a2d42" dependencies = [ "regex", "unicode-segmentation", @@ -2945,9 +2945,9 @@ dependencies = [ [[package]] name = "regex" -version = "1.10.3" +version = "1.10.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" +checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" dependencies = [ "aho-corasick 1.1.2", "memchr", diff --git a/Cargo.toml b/Cargo.toml index 0bd11a7..4bf5ce5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -79,7 +79,7 @@ base64 = { version = "0.21.5", default-features = false, features = [ "std", ], optional = true } cfg-if = { version = "1.0.0", default-features = false, optional = true } -keyword_extraction = { version = "1.3.0", default-features = false, features = [ +keyword_extraction = { version = "1.4.3", default-features = false, features = [ "tf_idf",