]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
urlapi: remove unused flags argument from Curl_url_set_authority
authorDaniel Stenberg <daniel@haxx.se>
Thu, 18 Apr 2024 14:49:10 +0000 (16:49 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 18 Apr 2024 20:24:33 +0000 (22:24 +0200)
The function is only called from a single place (for HTTP/2 server push)
so might as well just assume this fixed option every time.

Closes #13409

lib/http2.c
lib/urlapi-int.h
lib/urlapi.c

index 99fdd8a7b1191b43b92d00c1b50a16fb273caf9f..1ee57a4320ac3e0f20b9d0c8edcf7913cc66bea4 100644 (file)
@@ -832,7 +832,7 @@ static int set_transfer_url(struct Curl_easy *data,
 
   v = curl_pushheader_byname(hp, HTTP_PSEUDO_AUTHORITY);
   if(v) {
-    uc = Curl_url_set_authority(u, v, CURLU_DISALLOW_USER);
+    uc = Curl_url_set_authority(u, v);
     if(uc) {
       rc = 2;
       goto fail;
index d6e240aa3698b48c8e31e4d62659dff811763109..c40281a898f87103e0e116ee2c876ac31f3654dc 100644 (file)
@@ -28,8 +28,7 @@
 size_t Curl_is_absolute_url(const char *url, char *buf, size_t buflen,
                             bool guess_scheme);
 
-CURLUcode Curl_url_set_authority(CURLU *u, const char *authority,
-                                 unsigned int flags);
+CURLUcode Curl_url_set_authority(CURLU *u, const char *authority);
 
 #ifdef DEBUGBUILD
 CURLUcode Curl_parse_port(struct Curl_URL *u, struct dynbuf *host,
index c6d23701163bf0b904c93c6277830a51647e8bcf..308bc2745ae28a09693488395ef56a32d4f6d2ae 100644 (file)
@@ -851,8 +851,8 @@ out:
   return uc;
 }
 
-CURLUcode Curl_url_set_authority(CURLU *u, const char *authority,
-                                 unsigned int flags)
+/* used for HTTP/2 server push */
+CURLUcode Curl_url_set_authority(CURLU *u, const char *authority)
 {
   CURLUcode result;
   struct dynbuf host;
@@ -860,8 +860,8 @@ CURLUcode Curl_url_set_authority(CURLU *u, const char *authority,
   DEBUGASSERT(authority);
   Curl_dyn_init(&host, CURL_MAX_INPUT_LENGTH);
 
-  result = parse_authority(u, authority, strlen(authority), flags,
-                           &host, !!u->scheme);
+  result = parse_authority(u, authority, strlen(authority),
+                           CURLU_DISALLOW_USER, &host, !!u->scheme);
   if(result)
     Curl_dyn_free(&host);
   else {