ソースを参照

empty strings don't have server names

David Rose 23 年 前
コミット
eaf400490d
1 ファイル変更5 行追加0 行削除
  1. 5 0
      panda/src/downloader/urlSpec.cxx

+ 5 - 0
panda/src/downloader/urlSpec.cxx

@@ -374,6 +374,11 @@ set_url(const string &url, bool server_name_expected) {
   _url = url;
   _flags = 0;
 
+  if (url.empty()) {
+    // No server name on an empty string.
+    server_name_expected = false;
+  }
+
   // First, replace backslashes with forward slashes, since this is a
   // common mistake among Windows users.
   size_t p;