You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(compat): extract hostname from brand_manifest URLs with paths (#679)
strip_url_scheme only stripped the scheme prefix; for URLs like
"https://acme.com/.well-known/brand.json" it produced
"acme.com/.well-known/brand.json", which fails BrandReference.domain's
regex and surfaces as a confusing INVALID_REQUEST[brand.domain] error.
Adds extract_brand_domain() to _url.py — uses urlparse().hostname to
isolate the hostname, falling back to strip_url_scheme for bare-domain
inputs (no scheme). Both adapter call sites (get_products.adapt_request
and _media_buy_helpers.adapt_brand_manifest_to_brand) now use the new
helper. Regression tests cover the exact URL-with-path case from #677
and URL-with-port.
Fixes#677https://claude.ai/code/session_01YX14H75zYWQ1BYuopyUL34
Co-authored-by: Claude <noreply@anthropic.com>
0 commit comments