update 2024-10-08 16:26:35
This commit is contained in:
parent
baeca8caa1
commit
83b5b3ce6e
|
@ -1,123 +0,0 @@
|
|||
From b938aa51e50852d1b185db3188357073ad374416 Mon Sep 17 00:00:00 2001
|
||||
From: myfreeer <myfreeer@users.noreply.github.com>
|
||||
Date: Sun, 13 Dec 2020 15:40:56 +0800
|
||||
Subject: [PATCH] option: add option to disable Want-Digest header
|
||||
|
||||
Sending this HTTP header should be optional.
|
||||
Should close https://github.com/myfreeer/aria2-build-msys2/issues/10
|
||||
|
||||
--http-want-digest[=true|false] Send Want-Digest HTTP requser header
|
||||
with only limited hash algorithms:
|
||||
SHA-512, SHA-256, and SHA-1.
|
||||
The Want-Digest HTTP header is primarily used
|
||||
in a HTTP request, to ask the responder to
|
||||
provide a digest of the requested resource
|
||||
using the Digest response header
|
||||
|
||||
Possible Values: true, false
|
||||
Default: false
|
||||
Tags: #advanced, #http
|
||||
---
|
||||
src/AbstractProxyRequestCommand.cc | 1 +
|
||||
src/HttpRequestCommand.cc | 1 +
|
||||
src/OptionHandlerFactory.cc | 12 ++++++++++++
|
||||
src/prefs.cc | 2 ++
|
||||
src/prefs.h | 2 ++
|
||||
src/usage_text.h | 8 ++++++++
|
||||
6 files changed, 26 insertions(+)
|
||||
|
||||
diff --git a/src/AbstractProxyRequestCommand.cc b/src/AbstractProxyRequestCommand.cc
|
||||
index bd2bcb3..1feed07 100644
|
||||
--- a/src/AbstractProxyRequestCommand.cc
|
||||
+++ b/src/AbstractProxyRequestCommand.cc
|
||||
@@ -72,6 +72,7 @@ bool AbstractProxyRequestCommand::executeInternal()
|
||||
if (httpConnection_->sendBufferIsEmpty()) {
|
||||
auto httpRequest = make_unique<HttpRequest>();
|
||||
httpRequest->setUserAgent(getOption()->get(PREF_USER_AGENT));
|
||||
+ httpRequest->setNoWantDigest(!getOption()->getAsBool(PREF_HTTP_WANT_DIGEST));
|
||||
httpRequest->setRequest(getRequest());
|
||||
httpRequest->setProxyRequest(proxyRequest_);
|
||||
|
||||
diff --git a/src/HttpRequestCommand.cc b/src/HttpRequestCommand.cc
|
||||
index a2b8e7e..8c50153 100644
|
||||
--- a/src/HttpRequestCommand.cc
|
||||
+++ b/src/HttpRequestCommand.cc
|
||||
@@ -90,6 +90,7 @@ createHttpRequest(const std::shared_ptr<Request>& req,
|
||||
{
|
||||
auto httpRequest = make_unique<HttpRequest>();
|
||||
httpRequest->setUserAgent(option->get(PREF_USER_AGENT));
|
||||
+ httpRequest->setNoWantDigest(!option->getAsBool(PREF_HTTP_WANT_DIGEST));
|
||||
httpRequest->setRequest(req);
|
||||
httpRequest->setFileEntry(fileEntry);
|
||||
httpRequest->setSegment(segment);
|
||||
diff --git a/src/OptionHandlerFactory.cc b/src/OptionHandlerFactory.cc
|
||||
index a058eb9..9ff615a 100644
|
||||
--- a/src/OptionHandlerFactory.cc
|
||||
+++ b/src/OptionHandlerFactory.cc
|
||||
@@ -1106,6 +1106,18 @@ std::vector<OptionHandler*> OptionHandlerFactory::createOptionHandlers()
|
||||
op->setChangeOptionForReserved(true);
|
||||
handlers.push_back(op);
|
||||
}
|
||||
+ {
|
||||
+ OptionHandler* op(
|
||||
+ new BooleanOptionHandler(PREF_HTTP_WANT_DIGEST,
|
||||
+ TEXT_HTTP_WANT_DIGEST,
|
||||
+ A2_V_FALSE, OptionHandler::OPT_ARG));
|
||||
+ op->addTag(TAG_ADVANCED);
|
||||
+ op->addTag(TAG_HTTP);
|
||||
+ op->setInitialOption(true);
|
||||
+ op->setChangeGlobalOption(true);
|
||||
+ op->setChangeOptionForReserved(true);
|
||||
+ handlers.push_back(op);
|
||||
+ }
|
||||
{
|
||||
OptionHandler* op(new BooleanOptionHandler(
|
||||
PREF_ENABLE_HTTP_KEEP_ALIVE, TEXT_ENABLE_HTTP_KEEP_ALIVE, A2_V_TRUE,
|
||||
diff --git a/src/prefs.cc b/src/prefs.cc
|
||||
index 9793706..bdb33e2 100644
|
||||
--- a/src/prefs.cc
|
||||
+++ b/src/prefs.cc
|
||||
@@ -437,6 +437,8 @@ PrefPtr PREF_HTTP_ACCEPT_GZIP = makePref("http-accept-gzip");
|
||||
// value: true | false
|
||||
PrefPtr PREF_CONTENT_DISPOSITION_DEFAULT_UTF8 =
|
||||
makePref("content-disposition-default-utf8");
|
||||
+// values: true | false
|
||||
+PrefPtr PREF_HTTP_WANT_DIGEST = makePref("http-want-digest");
|
||||
|
||||
/**
|
||||
* Proxy related preferences
|
||||
diff --git a/src/prefs.h b/src/prefs.h
|
||||
index f014d9c..c88f2d0 100644
|
||||
--- a/src/prefs.h
|
||||
+++ b/src/prefs.h
|
||||
@@ -389,6 +389,8 @@ extern PrefPtr PREF_HTTP_NO_CACHE;
|
||||
extern PrefPtr PREF_HTTP_ACCEPT_GZIP;
|
||||
// value: true | false
|
||||
extern PrefPtr PREF_CONTENT_DISPOSITION_DEFAULT_UTF8;
|
||||
+// value: true | false
|
||||
+extern PrefPtr PREF_HTTP_WANT_DIGEST;
|
||||
|
||||
/**;
|
||||
* Proxy related preferences
|
||||
diff --git a/src/usage_text.h b/src/usage_text.h
|
||||
index 7a0a981..aee3ac0 100644
|
||||
--- a/src/usage_text.h
|
||||
+++ b/src/usage_text.h
|
||||
@@ -560,6 +560,14 @@
|
||||
" Content-Disposition header as UTF-8 instead of\n" \
|
||||
" ISO-8859-1, for example, the filename parameter,\n" \
|
||||
" but not the extended version filename*.")
|
||||
+#define TEXT_HTTP_WANT_DIGEST \
|
||||
+ _(" --http-want-digest[=true|false] Send Want-Digest HTTP requser header\n" \
|
||||
+ " with only limited hash algorithms:\n" \
|
||||
+ " SHA-512, SHA-256, and SHA-1.\n" \
|
||||
+ " The Want-Digest HTTP header is primarily used\n" \
|
||||
+ " in a HTTP request, to ask the responder to\n" \
|
||||
+ " provide a digest of the requested resource\n" \
|
||||
+ " using the Digest response header")
|
||||
#define TEXT_EVENT_POLL \
|
||||
_(" --event-poll=POLL Specify the method for polling events.")
|
||||
#define TEXT_BT_EXTERNAL_IP \
|
||||
--
|
||||
2.29.2
|
||||
|
|
@ -7,12 +7,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qt6base
|
||||
PKG_VERSION:=6.7.3
|
||||
PKG_VERSION:=6.8.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=qtbase-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/qt/qtbase/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=65771d1618cab08ec5e9bbfdc265b5d2ce2ccf0373143d7d9d139647a7196aec
|
||||
PKG_HASH:=3e526ceaaf615005bc89a98ee8a52b87db6fefe7155595bf75c40fd82cd1a7ce
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/qtbase-$(PKG_VERSION)
|
||||
PKG_BUILD_DIR:=$(BUILD_DIR)/qtbase-$(PKG_VERSION)
|
||||
|
|
|
@ -7,12 +7,12 @@
|
|||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=qt6tools
|
||||
PKG_VERSION:=6.7.3
|
||||
PKG_VERSION:=6.8.0
|
||||
PKG_RELEASE:=1
|
||||
|
||||
PKG_SOURCE:=qttools-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=https://codeload.github.com/qt/qttools/tar.gz/v$(PKG_VERSION)?
|
||||
PKG_HASH:=69ea13037677cf5a6971ebf92448ed662aa92029399687c871eb3e2ac1d7831c
|
||||
PKG_HASH:=13dbc0cb7a2eabb27d99ae0ac00d38af1aa03d9c7b845101cefd007887efcdec
|
||||
|
||||
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/qttools-$(PKG_VERSION)
|
||||
|
||||
|
|
Loading…
Reference in New Issue