mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2026-10-10 04:53:09 +08:00
39fcaf488b
* feat(ilanzou): modernize console API session and copy Use an isolated cookie-backed API session and preserve raw appToken syntax required by current iLanzou endpoints. Resolve CDN download responses more robustly, align upload metadata with the console protocol, and delegate copies to OpenList background tasks instead of blocking requests. * fix(ilanzou): escape appToken query values Escape opaque appToken values while preserving the literal colon required by iLanzou endpoints. Ignore CDN HEAD response lengths unless the response status is successful. * fix(ilanzou): address driver review feedback Use the ilanzou package name consistently, document upload result polling, and bound CDN size probes. Keep the appToken and CDN challenge handling covered by focused tests and comments. * fix(ilanzou): use context timeout for HEAD probe
12 lines
275 B
Go
12 lines
275 B
Go
package ilanzou
|
|
|
|
import "testing"
|
|
|
|
func TestAppTokenQueryValue(t *testing.T) {
|
|
got := appTokenQueryValue("alpha:beta+gamma&delta#percent%")
|
|
want := "alpha:beta%2Bgamma%26delta%23percent%25"
|
|
if got != want {
|
|
t.Fatalf("appTokenQueryValue() = %q, want %q", got, want)
|
|
}
|
|
}
|