Expose HTTP response headers via AwNavigation [chromium/src : main]

0 views
Skip to first unread message

Peter Conn (Gerrit)

unread,
Jul 8, 2026, 12:01:58 PM (2 days ago) Jul 8
to Peter Pakkenberg, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, android-web...@chromium.org
Attention needed from Peter Pakkenberg

Peter Conn added 1 comment

Patchset-level comments
Open in Gerrit

Related details

Attention is currently required from:
  • Peter Pakkenberg
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: Ic59817647435ce67920458b42b74e4b73501f7dd
Gerrit-Change-Number: 8062349
Gerrit-PatchSet: 1
Gerrit-Owner: Peter Conn <pec...@chromium.org>
Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
Gerrit-Reviewer: Peter Pakkenberg <pb...@chromium.org>
Gerrit-Attention: Peter Pakkenberg <pb...@chromium.org>
Gerrit-Comment-Date: Wed, 08 Jul 2026 16:01:41 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Peter Pakkenberg (Gerrit)

unread,
Jul 9, 2026, 4:39:30 AM (yesterday) Jul 9
to Peter Conn, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, android-web...@chromium.org
Attention needed from Peter Conn

Peter Pakkenberg added 7 comments

File android_webview/java/src/org/chromium/android_webview/AwNavigation.java
Line 94, Patchset 1 (Latest): if (mResponseHeaders == null) {
Peter Pakkenberg . unresolved

Is the Navigation object expected to only be accessed on the UI thread in the public API?
If not, make sure to have a lock around this field initialization.

File android_webview/javatests/src/org/chromium/android_webview/test/AwNavigationTest.java
Line 98, Patchset 1 (Latest): List<Pair<String, String>> headers = new ArrayList<>();
headers.add(new Pair<>("Custom-Header", "Value1"));
headers.add(new Pair<>("Custom-Header", "Value2"));
Peter Pakkenberg . unresolved

Use `List.of(...)`

File content/browser/android/navigation_handle_proxy.cc
Line 111, Patchset 1 (Latest): std::vector<std::string> response_header_names;
std::vector<std::string> response_header_values;
Peter Pakkenberg . unresolved

Single `std::map<std::string, std::string>`.

Even better if you can use `base::flat_map` and reserve the size needed immediately, but I'm not sure if JNIZero supports `base::flat_map`.

If you do need to keep this as double arrays, reserve the capacity of each vector before building it to save a bit of growth overhead.

Line 124, Patchset 1 (Latest): env, java_navigation_handle_, url::GURLAndroid::FromNativeGURL(env, gurl),
Peter Pakkenberg . unresolved

While you are here anyway, could you please update the other Object parameters to use `@JniType` annotations? I'm not sure the `Page` object has an automatic conversion so that can be skipped if it doesn't, but `GURL` and `String` do have automatic conversions.

File content/public/android/java/src/org/chromium/content_public/browser/NavigationHandle.java
Line 210, Patchset 1 (Latest): @JniType("std::vector<std::string>") String[] responseHeaderNames,
@JniType("std::vector<std::string>") String[] responseHeaderValues,
Peter Pakkenberg . unresolved

JNIZero should support `@JniType("std::map<std::string, std::string>")` so I would suggest you use that instead of dealing with 2 arrays.

https://chromium.googlesource.com/chromium/src/+/main/third_party/jni_zero/README.md#built_in-conversions

Line 230, Patchset 1 (Latest): mResponseHeaderNames = responseHeaderNames;
mResponseHeaderValues = responseHeaderValues;
Peter Pakkenberg . unresolved

If you cannot pass a map directly through JNI, then please convert the headers to a Map<String, String> here, so we don't leak the double-array workaround any further.

Line 328, Patchset 1 (Latest): public String @Nullable [] getResponseHeaderNames() {
Peter Pakkenberg . unresolved

As mentioned elsewhere, this shoud just be one getter that returns a Nullable map

Open in Gerrit

Related details

Attention is currently required from:
  • Peter Conn
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic59817647435ce67920458b42b74e4b73501f7dd
    Gerrit-Change-Number: 8062349
    Gerrit-PatchSet: 1
    Gerrit-Owner: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Pakkenberg <pb...@chromium.org>
    Gerrit-Attention: Peter Conn <pec...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 08:39:14 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Peter Conn (Gerrit)

    unread,
    Jul 9, 2026, 6:18:54 AM (yesterday) Jul 9
    to Rakina Zata Amni, Peter Pakkenberg, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, android-web...@chromium.org
    Attention needed from Peter Pakkenberg and Rakina Zata Amni

    Peter Conn added 8 comments

    Patchset-level comments
    File-level comment, Patchset 2 (Latest):
    Peter Conn . resolved

    +rakina for //content/

    Also Rakina, it looks like NavigationHandle is not thread safe, but the WebView API may be used from any thread so I filed http://crbug.com/532865730 to make it so. Do say if you have any concerns.

    File android_webview/java/src/org/chromium/android_webview/AwNavigation.java
    Line 94, Patchset 1: if (mResponseHeaders == null) {
    Peter Pakkenberg . unresolved

    Is the Navigation object expected to only be accessed on the UI thread in the public API?
    If not, make sure to have a lock around this field initialization.

    Peter Conn

    That's a very good point - in fact I don't think Navigation or Page are threadsafe at all. I'd rather fix them holistically - filed crbug.com/532865730 to do so.

    File android_webview/javatests/src/org/chromium/android_webview/test/AwNavigationTest.java
    Line 98, Patchset 1: List<Pair<String, String>> headers = new ArrayList<>();

    headers.add(new Pair<>("Custom-Header", "Value1"));
    headers.add(new Pair<>("Custom-Header", "Value2"));
    Peter Pakkenberg . resolved

    Use `List.of(...)`

    Peter Conn

    Done

    File content/browser/android/navigation_handle_proxy.cc
    Line 111, Patchset 1: std::vector<std::string> response_header_names;

    std::vector<std::string> response_header_values;
    Peter Pakkenberg . resolved

    Single `std::map<std::string, std::string>`.

    Even better if you can use `base::flat_map` and reserve the size needed immediately, but I'm not sure if JNIZero supports `base::flat_map`.

    If you do need to keep this as double arrays, reserve the capacity of each vector before building it to save a bit of growth overhead.

    Peter Conn

    Done

    Line 124, Patchset 1: env, java_navigation_handle_, url::GURLAndroid::FromNativeGURL(env, gurl),
    Peter Pakkenberg . resolved

    While you are here anyway, could you please update the other Object parameters to use `@JniType` annotations? I'm not sure the `Page` object has an automatic conversion so that can be skipped if it doesn't, but `GURL` and `String` do have automatic conversions.

    Peter Conn

    Done

    File content/public/android/java/src/org/chromium/content_public/browser/NavigationHandle.java
    Line 210, Patchset 1: @JniType("std::vector<std::string>") String[] responseHeaderNames,

    @JniType("std::vector<std::string>") String[] responseHeaderValues,
    Peter Pakkenberg . resolved

    JNIZero should support `@JniType("std::map<std::string, std::string>")` so I would suggest you use that instead of dealing with 2 arrays.

    https://chromium.googlesource.com/chromium/src/+/main/third_party/jni_zero/README.md#built_in-conversions

    Peter Conn

    Done

    Line 230, Patchset 1: mResponseHeaderNames = responseHeaderNames;
    mResponseHeaderValues = responseHeaderValues;
    Peter Pakkenberg . resolved

    If you cannot pass a map directly through JNI, then please convert the headers to a Map<String, String> here, so we don't leak the double-array workaround any further.

    Peter Conn

    Done

    Line 328, Patchset 1: public String @Nullable [] getResponseHeaderNames() {
    Peter Pakkenberg . resolved

    As mentioned elsewhere, this shoud just be one getter that returns a Nullable map

    Peter Conn

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Peter Pakkenberg
    • Rakina Zata Amni
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic59817647435ce67920458b42b74e4b73501f7dd
    Gerrit-Change-Number: 8062349
    Gerrit-PatchSet: 2
    Gerrit-Owner: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Pakkenberg <pb...@chromium.org>
    Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Attention: Peter Pakkenberg <pb...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 10:18:34 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Peter Pakkenberg <pb...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Peter Pakkenberg (Gerrit)

    unread,
    Jul 9, 2026, 6:25:34 AM (yesterday) Jul 9
    to Peter Conn, Rakina Zata Amni, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, android-web...@chromium.org
    Attention needed from Peter Conn and Rakina Zata Amni

    Peter Pakkenberg added 1 comment

    File content/browser/android/navigation_handle_proxy.cc
    Line 116, Patchset 2 (Latest): while (cpp_navigation_handle_->GetResponseHeaders()->EnumerateHeaderLines(
    Peter Pakkenberg . unresolved

    Sorry, forget everything I said about using a map here 😞

    `Set-Cookie` is ruining our day here. It can be repeated, and is _not_ safe to concatenate with h a comma.

    (There is also no guarantee that the server won't send other repeated headers that cannot safely be comma-concatenated).

    The whole API needs to either special case `Set-Cookie` or treat response headers like a list of pairs.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Peter Conn
    • Rakina Zata Amni
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic59817647435ce67920458b42b74e4b73501f7dd
    Gerrit-Change-Number: 8062349
    Gerrit-PatchSet: 2
    Gerrit-Owner: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Pakkenberg <pb...@chromium.org>
    Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Attention: Peter Conn <pec...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 10:25:17 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Peter Conn (Gerrit)

    unread,
    Jul 9, 2026, 7:48:09 AM (24 hours ago) Jul 9
    to Rakina Zata Amni, Peter Pakkenberg, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, android-web...@chromium.org
    Attention needed from Peter Pakkenberg and Rakina Zata Amni

    Peter Conn added 1 comment

    File content/browser/android/navigation_handle_proxy.cc
    Line 116, Patchset 2 (Latest): while (cpp_navigation_handle_->GetResponseHeaders()->EnumerateHeaderLines(
    Peter Pakkenberg . unresolved

    Sorry, forget everything I said about using a map here 😞

    `Set-Cookie` is ruining our day here. It can be repeated, and is _not_ safe to concatenate with h a comma.

    (There is also no guarantee that the server won't send other repeated headers that cannot safely be comma-concatenated).

    The whole API needs to either special case `Set-Cookie` or treat response headers like a list of pairs.

    Peter Conn

    I thought that as well (and had implemented it [here](https://chromium-review.git.corp.google.com/c/chromium/src/+/7955997/5)), but it turns out that the `Set-Cookie` header is stripped out by the network service before it gets to us here.

    Given that this is consistent with how WebResourceResponse works, I figure we can keep the API simple and let people deal with cookies through the CookieManager.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Peter Pakkenberg
    • Rakina Zata Amni
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic59817647435ce67920458b42b74e4b73501f7dd
    Gerrit-Change-Number: 8062349
    Gerrit-PatchSet: 2
    Gerrit-Owner: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Pakkenberg <pb...@chromium.org>
    Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Attention: Peter Pakkenberg <pb...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 11:47:53 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Peter Pakkenberg <pb...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Peter Pakkenberg (Gerrit)

    unread,
    Jul 9, 2026, 8:49:38 AM (22 hours ago) Jul 9
    to Peter Conn, Rakina Zata Amni, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, android-web...@chromium.org
    Attention needed from Peter Conn and Rakina Zata Amni

    Peter Pakkenberg added 2 comments

    File android_webview/java/src/org/chromium/android_webview/AwNavigation.java
    Line 94, Patchset 1: if (mResponseHeaders == null) {
    Peter Pakkenberg . resolved

    Is the Navigation object expected to only be accessed on the UI thread in the public API?
    If not, make sure to have a lock around this field initialization.

    Peter Conn

    That's a very good point - in fact I don't think Navigation or Page are threadsafe at all. I'd rather fix them holistically - filed crbug.com/532865730 to do so.

    Peter Pakkenberg

    Acknowledged

    File content/browser/android/navigation_handle_proxy.cc
    Line 116, Patchset 2 (Latest): while (cpp_navigation_handle_->GetResponseHeaders()->EnumerateHeaderLines(
    Peter Pakkenberg . unresolved

    Sorry, forget everything I said about using a map here 😞

    `Set-Cookie` is ruining our day here. It can be repeated, and is _not_ safe to concatenate with h a comma.

    (There is also no guarantee that the server won't send other repeated headers that cannot safely be comma-concatenated).

    The whole API needs to either special case `Set-Cookie` or treat response headers like a list of pairs.

    Peter Conn

    I thought that as well (and had implemented it [here](https://chromium-review.git.corp.google.com/c/chromium/src/+/7955997/5)), but it turns out that the `Set-Cookie` header is stripped out by the network service before it gets to us here.

    Given that this is consistent with how WebResourceResponse works, I figure we can keep the API simple and let people deal with cookies through the CookieManager.

    Peter Pakkenberg

    Ok - we should just make sure to document this behavior then.

    But depending on custom headers sent by the server, this coalescing might not be safe to do, especially for non-standard headers.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Peter Conn
    • Rakina Zata Amni
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic59817647435ce67920458b42b74e4b73501f7dd
    Gerrit-Change-Number: 8062349
    Gerrit-PatchSet: 2
    Gerrit-Owner: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Pakkenberg <pb...@chromium.org>
    Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Attention: Peter Conn <pec...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Thu, 09 Jul 2026 12:49:22 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: No
    Comment-In-Reply-To: Peter Pakkenberg <pb...@chromium.org>
    Comment-In-Reply-To: Peter Conn <pec...@chromium.org>
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Peter Conn (Gerrit)

    unread,
    3:37 AM (4 hours ago) 3:37 AM
    to Rakina Zata Amni, Peter Pakkenberg, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, android-web...@chromium.org
    Attention needed from Peter Pakkenberg and Rakina Zata Amni

    Peter Conn added 1 comment

    File content/browser/android/navigation_handle_proxy.cc
    Line 116, Patchset 2 (Latest): while (cpp_navigation_handle_->GetResponseHeaders()->EnumerateHeaderLines(
    Peter Pakkenberg . unresolved

    Sorry, forget everything I said about using a map here 😞

    `Set-Cookie` is ruining our day here. It can be repeated, and is _not_ safe to concatenate with h a comma.

    (There is also no guarantee that the server won't send other repeated headers that cannot safely be comma-concatenated).

    The whole API needs to either special case `Set-Cookie` or treat response headers like a list of pairs.

    Peter Conn

    I thought that as well (and had implemented it [here](https://chromium-review.git.corp.google.com/c/chromium/src/+/7955997/5)), but it turns out that the `Set-Cookie` header is stripped out by the network service before it gets to us here.

    Given that this is consistent with how WebResourceResponse works, I figure we can keep the API simple and let people deal with cookies through the CookieManager.

    Peter Pakkenberg

    Ok - we should just make sure to document this behavior then.

    But depending on custom headers sent by the server, this coalescing might not be safe to do, especially for non-standard headers.

    Peter Conn

    Sure, I'll document.

    Making the object here more complex than a map opens us up to more design complexity - do we return a list of values for every header, which is kinda ugly, or have two different getters and make the developer choose which one whenever they get something - or do we just expose a list of pairs and leave it up to the developer to sort.

    According to Torne, the browser ends up concatenating all non-Set-Cookie headers, so I'm tempted to leave the API simple and not support people doing things in WebView with non-standard headers that would be interpreted in a different way from the browser.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Peter Pakkenberg
    • Rakina Zata Amni
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement is not satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement is not satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: Ic59817647435ce67920458b42b74e4b73501f7dd
    Gerrit-Change-Number: 8062349
    Gerrit-PatchSet: 2
    Gerrit-Owner: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
    Gerrit-Reviewer: Peter Pakkenberg <pb...@chromium.org>
    Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Attention: Peter Pakkenberg <pb...@chromium.org>
    Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
    Gerrit-Comment-Date: Fri, 10 Jul 2026 07:37:05 +0000
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Peter Pakkenberg (Gerrit)

    unread,
    5:20 AM (2 hours ago) 5:20 AM
    to Peter Conn, Rakina Zata Amni, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, android-web...@chromium.org
    Attention needed from Peter Conn and Rakina Zata Amni

    Peter Pakkenberg added 1 comment

    File content/browser/android/navigation_handle_proxy.cc
    Line 116, Patchset 2 (Latest): while (cpp_navigation_handle_->GetResponseHeaders()->EnumerateHeaderLines(
    Peter Pakkenberg . resolved

    Sorry, forget everything I said about using a map here 😞

    `Set-Cookie` is ruining our day here. It can be repeated, and is _not_ safe to concatenate with h a comma.

    (There is also no guarantee that the server won't send other repeated headers that cannot safely be comma-concatenated).

    The whole API needs to either special case `Set-Cookie` or treat response headers like a list of pairs.

    Peter Conn

    I thought that as well (and had implemented it [here](https://chromium-review.git.corp.google.com/c/chromium/src/+/7955997/5)), but it turns out that the `Set-Cookie` header is stripped out by the network service before it gets to us here.

    Given that this is consistent with how WebResourceResponse works, I figure we can keep the API simple and let people deal with cookies through the CookieManager.

    Peter Pakkenberg

    Ok - we should just make sure to document this behavior then.

    But depending on custom headers sent by the server, this coalescing might not be safe to do, especially for non-standard headers.

    Peter Conn

    Sure, I'll document.

    Making the object here more complex than a map opens us up to more design complexity - do we return a list of values for every header, which is kinda ugly, or have two different getters and make the developer choose which one whenever they get something - or do we just expose a list of pairs and leave it up to the developer to sort.

    According to Torne, the browser ends up concatenating all non-Set-Cookie headers, so I'm tempted to leave the API simple and not support people doing things in WebView with non-standard headers that would be interpreted in a different way from the browser.

    Peter Pakkenberg

    SGTM, let's keep it as a map.

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Peter Conn
    • Rakina Zata Amni
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement is not satisfiedCode-Review
      • requirement is not satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: Ic59817647435ce67920458b42b74e4b73501f7dd
      Gerrit-Change-Number: 8062349
      Gerrit-PatchSet: 2
      Gerrit-Owner: Peter Conn <pec...@chromium.org>
      Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
      Gerrit-Reviewer: Peter Pakkenberg <pb...@chromium.org>
      Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Attention: Peter Conn <pec...@chromium.org>
      Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
      Gerrit-Comment-Date: Fri, 10 Jul 2026 09:20:16 +0000
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Peter Pakkenberg (Gerrit)

      unread,
      5:27 AM (2 hours ago) 5:27 AM
      to Peter Conn, Rakina Zata Amni, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, android-web...@chromium.org
      Attention needed from Peter Conn and Rakina Zata Amni

      Peter Pakkenberg voted Code-Review+1

      Code-Review+1
      Open in Gerrit

      Related details

      Attention is currently required from:
      • Peter Conn
      • Rakina Zata Amni
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement is not satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ic59817647435ce67920458b42b74e4b73501f7dd
        Gerrit-Change-Number: 8062349
        Gerrit-PatchSet: 2
        Gerrit-Owner: Peter Conn <pec...@chromium.org>
        Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
        Gerrit-Reviewer: Peter Pakkenberg <pb...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Attention: Peter Conn <pec...@chromium.org>
        Gerrit-Attention: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Comment-Date: Fri, 10 Jul 2026 09:26:49 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        unsatisfied_requirement
        open
        diffy

        Rakina Zata Amni (Gerrit)

        unread,
        5:32 AM (2 hours ago) 5:32 AM
        to Peter Conn, Peter Pakkenberg, Chromium LUCI CQ, android-bu...@system.gserviceaccount.com, chromium...@chromium.org, android-web...@chromium.org
        Attention needed from Peter Conn

        Rakina Zata Amni voted Code-Review+1

        Code-Review+1
        Open in Gerrit

        Related details

        Attention is currently required from:
        • Peter Conn
        Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: Ic59817647435ce67920458b42b74e4b73501f7dd
        Gerrit-Change-Number: 8062349
        Gerrit-PatchSet: 2
        Gerrit-Owner: Peter Conn <pec...@chromium.org>
        Gerrit-Reviewer: Peter Conn <pec...@chromium.org>
        Gerrit-Reviewer: Peter Pakkenberg <pb...@chromium.org>
        Gerrit-Reviewer: Rakina Zata Amni <rak...@chromium.org>
        Gerrit-Attention: Peter Conn <pec...@chromium.org>
        Gerrit-Comment-Date: Fri, 10 Jul 2026 09:31:46 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy
        Reply all
        Reply to author
        Forward
        0 new messages