1 parent e884eac commit c0863f4Copy full SHA for c0863f4
1 file changed
src/url.cpp
@@ -199,8 +199,17 @@ namespace Url
199
}
200
201
202
+ // Windows local file path
203
+ if (static_cast<int>(url.length() - position) >= 4
204
+ && url[position] == '/'
205
+ && url[position + 1] == '/'
206
+ && url[position + 2] == '/'
207
+ && url[position + 4] == ':')
208
+ {
209
+ position += 3;
210
+ }
211
// Search for the netloc
- if ((url.length() - position) >= 1
212
+ else if ((url.length() - position) >= 1
213
&& url[position] == '/'
214
&& url[position + 1] == '/')
215
{
@@ -443,7 +452,8 @@ namespace Url
443
452
444
453
else
445
454
446
- if (!host_.empty() && path_[0] != '/')
455
+ if ((!host_.empty() && path_[0] != '/') ||
456
+ (host_.empty() && path_[0] != '/' && path_[2] == ':'))
447
457
448
458
result.append(1, '/');
449
459
0 commit comments