Issue metadata
Sign in to add a comment
|
Chromium error when providing more than one header in an Android custom tabs intent
Reported by
jsta...@onedrop.today,
Oct 9 2017
|
||||||||||||||||||||
Issue descriptionDevice name: Nexus 5x From "Settings > About Chrome" Application version: 61.0.3163.98 Operating system: Android 8.0.0 URLs (if applicable): Steps to reproduce: (1) Create a CustomTabsIntent with > 1 header entry in the Browser.EXTRA_HEADERS bundle (2) Fire the intent to open a chrome custom tab Expected result: All of the headers should get passed in the HTTP request Actual result: None of the headers appear to be included in the HTTP request. Chromium displays an error in logcat: "[ERROR:http_request_headers.cc(150)] "Accept-Language: en-US\nX-Parse-Session-Token: r:beb91fa37506df032c7880d9bd3c0b13" has invalid header value." It looks like the headers are collapsed into a single string, separated by newline characters. Then the native HttpRequestHeader class checks that the value doesn't contain any newline characters using HttpUtil::IsValidHeaderValue. I think it's using HttpRequestHeaders::AddHeaderFromString instead of HttpRequestHeaders::AddHeadersFromString when there are multiple headers provided.
,
Oct 9 2017
Thanks for filing the issue. jstarke@ If possible please provide a reduced testcase for repro?
,
Oct 9 2017
Sure! I think this is what you're looking for. Just click the button and you'll see this error in logcat: 10-09 16:34:12.781 27949-27949/? E/chromium: [ERROR:http_request_headers.cc(150)] "Cache-Control: no-cache Accept-Language: en-US" has invalid header value.
,
Oct 11 2017
Possible suspect: https://chromium-review.googlesource.com/c/chromium/src/+/633316 From chromium code search, seems like above patch is the suspect not sure though. Kinuko,would you mind confirming.
,
Oct 12 2017
I agree that my change looks to be suspicious (well) but I can't find where my change could wrongly add unparsed strings to the headers. Calling AddHeaderFromString where AddHeadersFromString sounds like a plausible cause, but my change didn't add any and there's not much callsite for AddHeaderFromString. Actually I don't really know what code path CCT is going through, if it's happening only on CCT there might be issues there? yusufo@- would you be able to help triaging this or re-assigning this to someone familiar with what code path it goes through when Browser.EXTRA_HEADERS is specified?
,
Oct 12 2017
,
Oct 25 2017
Issue 770186 has been merged into this issue. |
|||||||||||||||||||||
►
Sign in to add a comment |
|||||||||||||||||||||
Comment 1 by jsta...@onedrop.today
, Oct 9 2017