← Commit list

287b082c63

Daniel Stenberg
Daniel Stenberg
2026-05-12
SUCCESS Duration: 229s

Subject

tool_urlglob: better 'Duplicate glob name' position

Binary

No binary (build failed)

Architecture & Compiler Flags

Architecture: x86_64-linux-gnu Compiler: gcc (Ubuntu 11.4.0-1ubuntu1~22.04.3) 11.4.0

—

Build Log

(log yok)

Commit Diff GitHub →

src/tool_urlglob.c+1 -1
@@ -524,7 +524,7 @@ static CURLcode glob_parse(struct URLGlob *glob, const char *pattern,
/* check that the name is not already used */
struct URLPattern *p = glob_find_name(glob, &name);
if(p)
- return globerror(glob, "Duplicate glob name", 2 + start - ipattern,
+ return globerror(glob, "Duplicate glob name", pattern - ipattern,
CURLE_URL_MALFORMAT);
pos += (pattern - start);
}
tests/data/test2410+4 -7
@@ -12,23 +12,20 @@ globbing
# Client-side
<client>
-<server>
-http
-</server>
<name>
duplicate named glob
</name>
<command option="no-output">
-"%HOSTIP:%HTTPPORT/{%LTtest%GTA,B}{%LTtest%GTC,D}" -o "%LOGDIR/dump"
+"https://dummy.example/{%LTtest%GTA,B}{%LTtest%GTC,D}" -o "%LOGDIR/dump"
</command>
</client>
# Verify data after the test has been "shot"
<verify>
<stderr mode="text">
-curl: (3) Duplicate glob name in position 30:
-%HOSTIP:%HTTPPORT/{%LTtest%GTA,B}{%LTtest%GTC,D}
- ^
+curl: (3) Duplicate glob name in position 40:
+https://dummy.example/{%LTtest%GTA,B}{%LTtest%GTC,D}
+ ^
</stderr>
<errorcode>
3