Skip to content

[Java] JDBC driver does not send custom headers on DoGet #33953

Closed

Description

@lidavidm

Describe the bug, including details regarding any error messages, version, and platform.

Follow-up of #33874, specifically #33874 (comment)

Component(s)

Java

Activity

  1. aiguofer commented on Feb 1, 2023

    @aiguofer
    Contributor

    Ok so this one is a little bit beyond me as I'm not very familiar with gRPC but I believe the problem lies in FlightClient.interceptedChannel.

    The handshake and sql info methods both use CallOptions.wrapStub(blockingStub, options).get<method>, which internally uses the Channel on the stub. getStream however, uses the interceptedChannel. If I replace it with CallOptions.wrapStub(asyncStub, options).getChannel() it seems to send the headers along, see: this commit

    There's a few other methods in the FlightClient that use the interceptedChannel so those might also be worth a look.

    BTW, #33839 might be the same issue based on these findings.

  2. aiguofer commented on Feb 1, 2023

    @aiguofer
    Contributor

    After looking at it further, it looks like all the stubs are generated from the interceptedChannel so there shouldn't be any issues with doing this everywhere. Submitted a PR.

  3. added a commit that references this issue on Feb 27, 2023
  4. added this to the 12.0.0 milestone on Feb 27, 2023
  5. added a commit that references this issue on Oct 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions