fast path for encodeURISchemePrefix() if sizeofURLData is 0

This commit is contained in:
Rohit Grover 2014-12-01 11:01:20 +00:00
parent 19f5054adf
commit 0c38a1e8ef
1 changed files with 4 additions and 0 deletions

View File

@ -182,6 +182,10 @@ private:
}
size_t encodeURISchemePrefix(const char *&urldata, size_t &sizeofURLData) {
if (!sizeofURLData) {
return 0;
}
const char *prefixes[] = {
"http://www.",
"https://www.",