AIStudio2API
AIStudio2API copied to clipboard
[Bug] waa.locationProfile hardcodes port="" and fails to split host before '?'/'#' when '/' is omitted
发生了什么 / What happened
Summary
In internal/waa/host.go:740-757, locationProfile manually splits PageURL by "//" and '/' and hardcodes "port": "":
- For URLs with a port (e.g.,
http://localhost:2048/app),hostnameincorrectly keeps:2048andportis"". - For URLs without a
/before?or#(e.g.,https://example.com?a=1#b),hostandoriginswallow?a=1#bwhilesearchandhashbecome"".
Suggested Fix
Reuse parseURL(raw, nil) from internal/waa/url.go:14-50, which already implements full WHATWG URL parsing for Location fields.
版本 / Version
v0.3.14
每人最多同时打开 3 个 Issue,这个 Issue 已自动关闭。请等已有的 Issue 处理完再提,或把内容补充到已有的 Issue 里。
Each user can have at most 3 open issues at a time, so this one was closed automatically. Please wait until your existing issues are resolved, or add this to one of them.