{"action":"opened","issue":{"url":"https://api.github.com/repos/ampproject/amphtml/issues/17142","repository_url":"https://api.github.com/repos/ampproject/amphtml","labels_url":"https://api.github.com/repos/ampproject/amphtml/issues/17142/labels{/name}","comments_url":"https://api.github.com/repos/ampproject/amphtml/issues/17142/comments","events_url":"https://api.github.com/repos/ampproject/amphtml/issues/17142/events","html_url":"https://github.com/ampproject/amphtml/issues/17142","id":345027882,"node_id":"MDU6SXNzdWUzNDUwMjc4ODI=","number":17142,"title":"AMP Variable Substitution in amp-list src path + AMP Cache URL rewriting","user":{"login":"cheneytsai","id":672494,"node_id":"MDQ6VXNlcjY3MjQ5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/672494?v=4","gravatar_id":"","url":"https://api.github.com/users/cheneytsai","html_url":"https://github.com/cheneytsai","followers_url":"https://api.github.com/users/cheneytsai/followers","following_url":"https://api.github.com/users/cheneytsai/following{/other_user}","gists_url":"https://api.github.com/users/cheneytsai/gists{/gist_id}","starred_url":"https://api.github.com/users/cheneytsai/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cheneytsai/subscriptions","organizations_url":"https://api.github.com/users/cheneytsai/orgs","repos_url":"https://api.github.com/users/cheneytsai/repos","events_url":"https://api.github.com/users/cheneytsai/events{/privacy}","received_events_url":"https://api.github.com/users/cheneytsai/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-26T22:30:33Z","updated_at":"2018-07-26T22:30:33Z","closed_at":null,"author_association":"NONE","body":"## What's the issue?\r\n\r\nAMP Cache appears to be rewriting URLs in amp-list src such that uppercase AMP Variables (ex: AMPDOC_HOST) in path are being converted to lowercase which breaks URL substitution.\r\n\r\n## How do we reproduce the issue?\r\n\r\nThere's a test page [https://www.airbnb.com/amp/s/Navarre--FL](https://www.airbnb.com/amp/s/Navarre--FL), and you can verify that the AMPDOC_HOST variable in the amp-list src resolves to airbnb.com and the banner at the top of the page renders correctly.\r\n\r\nChecking the source of the document: AMPDOC_HOST is properly uppercase\r\n`<amp-list width=\"auto\" height=\"75\" layout=\"fixed-height\" src=\"https://AMPDOC_HOST/amp/kochava?referrer=DOCUMENT_REFERRER&amp;canonical_path=CANONICAL_PATH&amp;canonical_url=CANONICAL_URL&amp;amp_id=CLIENT_ID(amp-cookie-fallback)&amp;channel=seo_amp&amp;source_url=AMPDOC_URL\" id=\"kochava-banner\" data-amp-replace=\"AMPDOC_HOST\">`\r\n\r\nIf you look at the AMP Cache version: https://www-airbnb-com.cdn.ampproject.org/v/s/www.airbnb.com/amp/s/Navarre--FL?usqp=mq331AQECAEoAQ%3D%3D&amp_js_v=0.1, the banner doesn't show. Console throws an error about the lowercase ampdoc_host. \r\n\r\nIf you look at the source, you'll find that the AMPDOC_HOST variable in amp-list src is now lowercase: `<amp-list class=\"i-amphtml-layout-fixed-height i-amphtml-layout-size-defined\" height=75 i-amphtml-layout=fixed-height id=kochava-banner layout=fixed-height src=\"https://ampdoc_host/amp/kochava?referrer=DOCUMENT_REFERRER&amp;canonical_path=CANONICAL_PATH&amp;canonical_url=CANONICAL_URL&amp;amp_id=CLIENT_ID(amp-cookie-fallback)&amp;channel=seo_amp&amp;source_url=AMPDOC_URL\"`\r\n\r\nIt seems to suggest that a rewrite changing the case seemed to have happened and thus variable substitution didn't happen properly causing the XHR to fail.\r\n\r\n(Note: AMPDOC_HOST being the improper variable to use here is noted, but the issue might still stand for other variables like CANONICAL_HOST)\r\n\r\n## What browsers are affected?\r\n\r\nTest on Chrome 68 and 67. Desktop and Android Mobile.\r\n\r\n## Which AMP version is affected?\r\n\r\n011531800879103\r\n\r\n\r\n"}}
{"actor":{"display_login":"cheneytsai"}}