| 742 | /************************************************************************/ |
| 743 | |
| 744 | static void CPLHTTPEmitFetchDebug(const char *pszURL, |
| 745 | const char *pszExtraDebug = "") |
| 746 | { |
| 747 | const char *pszArobase = strchr(pszURL, '@'); |
| 748 | const char *pszSlash = strchr(pszURL, '/'); |
| 749 | const char *pszColon = (pszSlash) ? strchr(pszSlash, ':') : nullptr; |
| 750 | if (pszArobase != nullptr && pszColon != nullptr && |
| 751 | pszArobase - pszColon > 0) |
| 752 | { |
| 753 | /* http://user:password@www.example.com */ |
| 754 | char *pszSanitizedURL = CPLStrdup(pszURL); |
| 755 | pszSanitizedURL[pszColon - pszURL] = 0; |
| 756 | CPLDebug("HTTP", "Fetch(%s:#password#%s%s)", pszSanitizedURL, |
| 757 | pszArobase, pszExtraDebug); |
| 758 | CPLFree(pszSanitizedURL); |
| 759 | } |
| 760 | else |
| 761 | { |
| 762 | CPLDebug("HTTP", "Fetch(%s%s)", pszURL, pszExtraDebug); |
| 763 | } |
| 764 | } |
| 765 | |
| 766 | #endif |
| 767 |
no test coverage detected