Remove, applied upstream and present in curl-7.64.0 - pkgsrc-localpatches - leot's pkgsrc LOCALPATCHES
(HTM) hg clone https://bitbucket.org/iamleot/pkgsrc-localpatches
(DIR) Log
(DIR) Files
(DIR) Refs
---
(DIR) changeset afd86843a288932555a6628c94ed07549e56b199
(DIR) parent 640313a6f000e0e3daae2ab8a4101b1f48ce7bda
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Wed, 6 Feb 2019 11:26:05
Remove, applied upstream and present in curl-7.64.0
Diffstat:
www/curl/patch-3370.patch | 125 ----------------------------------------------
1 files changed, 0 insertions(+), 125 deletions(-)
---
diff -r 640313a6f000 -r afd86843a288 www/curl/patch-3370.patch
--- a/www/curl/patch-3370.patch Sun Feb 03 23:06:13 2019 +0100
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,125 +0,0 @@
-Permit to semantically distinguish URL with empty query (closes #3369)
-
-In the URL API there is no way to distinguish URL with possible
-trailing `?' (empty query).
-
-This is needed for e.g. in the gopher:// scheme where
-<gopher://host/1/foo> and <gopher://host/1/foo?>.
-can be two different URLs.
-
-Adjust gopher too in order to not ignore the "query" part and modify
-the selector in the gopher selector test (`test1201`) to test for
-that.
-
-Closes #3369
-
- <https://github.com/curl/curl/pull/3370>
-
-Also backport commit 4b4062aaebb8c945a4b29587229a98946c9edaa3 by
-Daniel Stenberg to avoid a memory leak (whoops!).
-
-diff --git a/lib/gopher.c b/lib/gopher.c
-index b441a641d9..151bac1adb 100644
---- lib/gopher.c.orig 2018-11-21 23:48:11.000000000 +0100
-+++ lib/gopher.c 2018-12-14 17:21:44.587706330 +0100
-@@ -31,9 +31,11 @@
- #include "progress.h"
- #include "gopher.h"
- #include "select.h"
-+#include "strdup.h"
- #include "url.h"
- #include "escape.h"
- #include "warnless.h"
-+#include "curl_printf.h"
- #include "curl_memory.h"
- /* The last #include file should be: */
- #include "memdebug.h"
-@@ -78,7 +80,9 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
- curl_socket_t sockfd = conn->sock[FIRSTSOCKET];
-
- curl_off_t *bytecount = &data->req.bytecount;
-+ char *gopherpath;
- char *path = data->state.up.path;
-+ char *query = data->state.up.query;
- char *sel = NULL;
- char *sel_org = NULL;
- ssize_t amount, k;
-@@ -86,20 +90,30 @@ static CURLcode gopher_do(struct connectdata *conn, bool *done)
-
- *done = TRUE; /* unconditionally */
-
-+ if(path && query)
-+ gopherpath = aprintf("%s?%s", path, query);
-+ else
-+ gopherpath = strdup(path);
-+
-+ if(!gopherpath)
-+ return CURLE_OUT_OF_MEMORY;
-+
- /* Create selector. Degenerate cases: / and /1 => convert to "" */
-- if(strlen(path) <= 2) {
-+ if(strlen(gopherpath) <= 2) {
- sel = (char *)"";
- len = strlen(sel);
-+ free(gopherpath);
- }
- else {
- char *newp;
-
- /* Otherwise, drop / and the first character (i.e., item type) ... */
-- newp = path;
-+ newp = gopherpath;
- newp += 2;
-
- /* ... and finally unescape */
- result = Curl_urldecode(data, newp, 0, &sel, &len, FALSE);
-+ free(gopherpath);
- if(result)
- return result;
- sel_org = sel;
-diff --git a/lib/urlapi.c b/lib/urlapi.c
-index e68748818c..6919ff1bd7 100644
---- lib/urlapi.c.orig
-+++ lib/urlapi.c
-@@ -864,7 +864,7 @@ static CURLUcode seturl(const char *url, CURLU *u, unsigned int flags)
- return CURLUE_OUT_OF_MEMORY;
- }
-
-- if(query && query[0]) {
-+ if(query) {
- u->query = strdup(query);
- if(!u->query)
- return CURLUE_OUT_OF_MEMORY;
-@@ -1071,8 +1071,8 @@ CURLUcode curl_url_get(CURLU *u, CURLUPart what,
- port ? port : "",
- (u->path && (u->path[0] != '/')) ? "/": "",
- u->path ? u->path : "/",
-- u->query? "?": "",
-- u->query? u->query : "",
-+ (u->query && u->query[0]) ? "?": "",
-+ (u->query && u->query[0]) ? u->query : "",
- u->fragment? "#": "",
- u->fragment? u->fragment : "");
- }
-diff --git a/tests/data/test1201 b/tests/data/test1201
-index 81a9fe4250..29a059aa07 100644
---- tests/data/test1201.orig
-+++ tests/data/test1201
-@@ -25,7 +25,7 @@ gopher
- Gopher selector
- </name>
- <command>
--gopher://%HOSTIP:%GOPHERPORT/1/selector/SELECTOR/1201
-+gopher://%HOSTIP:%GOPHERPORT/1/selector/SELECTOR/1201?
- </command>
- </client>
-
-@@ -33,7 +33,7 @@ gopher://%HOSTIP:%GOPHERPORT/1/selector/SELECTOR/1201
- # Verify data after the test has been "shot"
- <verify>
- <protocol>
--/selector/SELECTOR/1201
-+/selector/SELECTOR/1201?
- </protocol>
- </verify>
- </testcase>