MikeWang000000 / Natter

Expose your TCP/UDP port behind full-cone NAT to the Internet.
GNU General Public License v3.0
1.31k stars 107 forks source link

当 UPnP 扫描到的 URL 不含路径时,出现 ValueError #90

Closed MikeWang000000 closed 3 weeks ago

MikeWang000000 commented 1 month ago

split_url() 函数存在问题:

split_url("http://example.com:8080")
Traceback (most recent call last):
  ......

  File "natter.py", line 1403, in split_url
    host, rpath = url.split("http://", 1)[1].split("/", 1)
    ^^^^^^^^^^^
ValueError: not enough values to unpack (expected 2, got 1)
MikeWang000000 commented 3 weeks ago

Fixed by 781a444.