Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: allow using case-insensitive user-agent key #1110

Merged
merged 1 commit into from Apr 29, 2021

Conversation

olavloite
Copy link
Contributor

@olavloite olavloite commented Apr 28, 2021

Adding a custom user-agent was only possible by using an all lower-case key. A header key should however be case-insensitive. This PR changes the merging of a custom user-agent value with the default user-agent to use a case-insensitive comparison.

@olavloite olavloite requested a review from thiagotnunes Apr 28, 2021
@olavloite olavloite requested a review from as a code owner Apr 28, 2021
@google-cla google-cla bot added the cla: yes label Apr 28, 2021
@product-auto-label product-auto-label bot added the api: spanner label Apr 28, 2021
@codecov
Copy link

@codecov codecov bot commented Apr 28, 2021

Codecov Report

Merging #1110 (ea7dea0) into master (37ca990) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master    #1110      +/-   ##
============================================
- Coverage     84.99%   84.99%   -0.01%     
  Complexity     2727     2727              
============================================
  Files           156      156              
  Lines         14410    14416       +6     
  Branches       1379     1381       +2     
============================================
+ Hits          12248    12253       +5     
- Misses         1593     1596       +3     
+ Partials        569      567       -2     
Impacted Files Coverage Δ Complexity Δ
...m/google/cloud/spanner/spi/v1/GapicSpannerRpc.java 80.37% <100.00%> (+0.14%) 91.00 <0.00> (+2.00)
...m/google/cloud/spanner/connection/SpannerPool.java 87.16% <0.00%> (-0.54%) 33.00% <0.00%> (ø%)
...ain/java/com/google/cloud/spanner/SessionPool.java 89.01% <0.00%> (ø) 74.00% <0.00%> (ø%)
...a/com/google/cloud/spanner/SessionPoolOptions.java 69.53% <0.00%> (ø) 17.00% <0.00%> (-1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 37ca990...ea7dea0. Read the comment docs.

Copy link
Contributor

@thiagotnunes thiagotnunes left a comment

Thanks for the fix @olavloite

@thiagotnunes thiagotnunes added the kokoro:force-run label Apr 29, 2021
@yoshi-kokoro yoshi-kokoro removed the kokoro:force-run label Apr 29, 2021
@thiagotnunes thiagotnunes merged commit f4f9e43 into master Apr 29, 2021
16 of 17 checks passed
@thiagotnunes thiagotnunes deleted the user-agent-case-insensitive branch Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: spanner cla: yes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants