mirror of
https://github.com/curl/curl.git
synced 2026-08-26 20:23:32 +03:00
Fixed a couple more locale-dependent toupper conversions, mainly for
clarity. This does fix one problem that causes ;type=i FTP URLs to fail in the Turkish locale when CURLOPT_PROXY_TRANSFER_MODE is used (test case 561) Added tests 561 and 1092 through 1094 to test various combinations of ;type= and ;mode= URLs that could potentially fail in the Turkish locale.
This commit is contained in:
parent
6bb9ef8de4
commit
5591550167
17 changed files with 314 additions and 27 deletions
18
lib/url.c
18
lib/url.c
|
|
@ -230,6 +230,21 @@ void Curl_safefree(void *ptr)
|
|||
free(ptr);
|
||||
}
|
||||
|
||||
/* Copy an upper case version of the string from src to dest. The
|
||||
* strings may overlap. No more than n characters of the string are copied
|
||||
* (including any NUL) and the destination string will NOT be
|
||||
* NUL-terminated if that limit is reached.
|
||||
*/
|
||||
void Curl_strntoupper(char *dest, const char *src, size_t n)
|
||||
{
|
||||
if (n < 1)
|
||||
return;
|
||||
|
||||
do {
|
||||
*dest++ = Curl_raw_toupper(*src);
|
||||
} while (*src++ && --n);
|
||||
}
|
||||
|
||||
static void close_connections(struct SessionHandle *data)
|
||||
{
|
||||
/* Loop through all open connections and kill them one by one */
|
||||
|
|
@ -3441,8 +3456,7 @@ static char *detect_proxy(struct connectdata *conn)
|
|||
*/
|
||||
if(!prox && !Curl_raw_equal("http_proxy", proxy_env)) {
|
||||
/* There was no lowercase variable, try the uppercase version: */
|
||||
for(envp = proxy_env; *envp; envp++)
|
||||
*envp = (char)toupper((int)*envp);
|
||||
Curl_strntoupper(proxy_env, proxy_env, sizeof(proxy_env));
|
||||
prox=curl_getenv(proxy_env);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue