[elinks/f18] add default "ddg" dumb/smart rewrite prefixes for DuckDuckGo (#856348)
Kamil Dudka
kdudka at fedoraproject.org
Fri Jan 4 12:52:13 UTC 2013
commit 38aca9582d2796bea1e0a3b8cdc8a32d0ec2201b
Author: Kamil Dudka <kdudka at redhat.com>
Date: Mon Oct 8 12:53:12 2012 +0200
add default "ddg" dumb/smart rewrite prefixes for DuckDuckGo (#856348)
elinks-0.12pre5-ddg-search.patch | 51 ++++++++++++++++++++++++++++++++++++++
elinks.spec | 9 ++++++-
2 files changed, 59 insertions(+), 1 deletions(-)
---
diff --git a/elinks-0.12pre5-ddg-search.patch b/elinks-0.12pre5-ddg-search.patch
new file mode 100644
index 0000000..32b1158
--- /dev/null
+++ b/elinks-0.12pre5-ddg-search.patch
@@ -0,0 +1,51 @@
+From a96d8a17e57343ff29736a2f8d0c954f2c4ba02a Mon Sep 17 00:00:00 2001
+From: Kamil Dudka <kdudka at redhat.com>
+Date: Tue, 18 Sep 2012 15:32:31 +0200
+Subject: [PATCH] rewrite: add default "ddg" dumb/smart prefixes for DuckDuckGo
+
+... and mention that URI rewriting rules may leak ELinks' identity
+in the documentation of protocol.http.user_agent.
+
+Originally requested at <https://bugzilla.redhat.com/856348>.
+---
+ src/protocol/http/http.c | 3 ++-
+ src/protocol/rewrite/rewrite.c | 2 ++
+ 2 files changed, 4 insertions(+), 1 deletions(-)
+
+diff --git a/src/protocol/http/http.c b/src/protocol/http/http.c
+index ce14031..98053c0 100644
+--- a/src/protocol/http/http.c
++++ b/src/protocol/http/http.c
+@@ -227,7 +227,8 @@ static struct option_info http_options[] = {
+ "pushing some lite version to them automagically.\n"
+ "\n"
+ "Use \" \" if you don't want any User-Agent header to be sent "
+- "at all.\n"
++ "at all. URI rewriting rules may still include parameters "
++ "that reveal you are using ELinks.\n"
+ "\n"
+ "%v in the string means ELinks version,\n"
+ "%s in the string means system identification,\n"
+diff --git a/src/protocol/rewrite/rewrite.c b/src/protocol/rewrite/rewrite.c
+index dd5c7ab..e01da74 100644
+--- a/src/protocol/rewrite/rewrite.c
++++ b/src/protocol/rewrite/rewrite.c
+@@ -121,6 +121,7 @@ static struct option_info uri_rewrite_options[] = {
+ INIT_OPT_DUMB_PREFIX("cia", "http://cia.navi.cx/"),
+ INIT_OPT_DUMB_PREFIX("b", "http://babelfish.altavista.com/babelfish/tr"),
+ INIT_OPT_DUMB_PREFIX("d", "http://www.dict.org"),
++ INIT_OPT_DUMB_PREFIX("ddg", "http://duckduckgo.com/?t=elinks"),
+ INIT_OPT_DUMB_PREFIX("g", "http://www.google.com/"),
+ INIT_OPT_DUMB_PREFIX("gg", "http://www.google.com/"),
+ INIT_OPT_DUMB_PREFIX("go", "http://www.google.com/"),
+@@ -158,6 +159,7 @@ static struct option_info uri_rewrite_options[] = {
+ INIT_OPT_SMART_PREFIX("cambridge", "http://dictionary.cambridge.org/results.asp?searchword=%s"),
+ INIT_OPT_SMART_PREFIX("cliki", "http://www.cliki.net/admin/search?words=%s"),
+ INIT_OPT_SMART_PREFIX("d", "http://www.dict.org/bin/Dict?Query=%s&Form=Dict1&Strategy=*&Database=*&submit=Submit+query"),
++ INIT_OPT_SMART_PREFIX("ddg", "http://duckduckgo.com/?q=%s&t=elinks"),
+ INIT_OPT_SMART_PREFIX("dmoz", "http://search.dmoz.org/cgi-bin/search?search=%s"),
+ INIT_OPT_SMART_PREFIX("foldoc", "http://wombat.doc.ic.ac.uk/foldoc/foldoc.cgi?%s"),
+ INIT_OPT_SMART_PREFIX("g", "http://www.google.com/search?q=%s&btnG=Google+Search"),
+--
+1.7.1
+
diff --git a/elinks.spec b/elinks.spec
index c9a0e57..f70b9c5 100644
--- a/elinks.spec
+++ b/elinks.spec
@@ -1,7 +1,7 @@
Name: elinks
Summary: A text-mode Web browser
Version: 0.12
-Release: 0.30.pre5%{?dist}
+Release: 0.31.pre5%{?dist}
License: GPLv2
URL: http://elinks.or.cz
Group: Applications/Internet
@@ -39,6 +39,7 @@ Patch8: elinks-scroll.patch
Patch9: elinks-nss.patch
Patch10: elinks-nss-inc.patch
Patch11: elinks-0.12pre5-js185.patch
+Patch12: elinks-0.12pre5-ddg-search.patch
%description
Elinks is a text-based Web browser. Elinks does not display any images,
@@ -82,6 +83,9 @@ quickly and swiftly displays Web pages.
# backported upstream commits f31cf6f, 2844f8b, 218a225, and 12803e4
%patch11 -p1
+# add default "ddg" dumb/smart rewrite prefixes for DuckDuckGo (#856348)
+%patch12 -p1
+
# remove bogus serial numbers
sed -i 's/^# *serial [AM0-9]*$//' acinclude.m4 config/m4/*.m4
@@ -149,6 +153,9 @@ exit 0
%{_mandir}/man5/*
%changelog
+* Mon Oct 08 2012 Kamil Dudka <kdudka at redhat.com> - 0.12-0.31.pre5
+- add default "ddg" dumb/smart rewrite prefixes for DuckDuckGo (#856348)
+
* Tue Aug 28 2012 Kamil Dudka <kdudka at redhat.com> - 0.12-0.30.pre5
- fix specfile issues reported by the fedora-review script
More information about the scm-commits
mailing list