GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: add flag to allow UrlEncodedContent to use UriPath escaping by guillaumeblaquiere · Pull Request #1100 · googleapis/google-http-java-client

Conversation

@guillaumeblaquiere

@guillaumeblaquiere guillaumeblaquiere commented Aug 28, 2020

Copy link
Copy Markdown
Contributor

Fixes #1098
The legacy behavior is kept. Test has been updated

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@guillaumeblaquiere
Add the possibility to use UriPath encoding for the URL content inste…
e61cccf
…ad of the deprecated urlEncoder
@guillaumeblaquiere
guillaumeblaquiere requested a review from a team August 28, 2020 09:15
@google-cla google-cla Bot added the cla: yes This human has signed the Contributor License Agreement. label Aug 28, 2020
guillaumeblaquiere added a commit to guillaumeblaquiere/google-auth-library-java that referenced this pull request Aug 28, 2020
@guillaumeblaquiere
Feat: add signed id token capability on UserCredentials class.
397694b
idTokenWithAudience method not tested (I don't know how to do this to be useful)

Depend on this update googleapis/google-http-java-client#1100
@guillaumeblaquiere guillaumeblaquiere mentioned this pull request Aug 28, 2020
feat: idtoken user credential googleapis/google-auth-library-java#469
Closed
elharo
elharo suggested changes Aug 29, 2020
View reviewed changes

@elharo elharo left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish we could do this unconditionally but that's risky.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java
}

/**
* @param data key name/value data

@elharo elharo Aug 29, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the key is a name and a value? That's surprising.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@guillaumeblaquiere guillaumeblaquiere Aug 29, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy paste of the legacy comment (see line 56 of the file.) I kept the legacy signature and behavior, and I added mine with additional parameter. This one is unchanged (and I guess its description also!)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@guillaumeblaquiere guillaumeblaquiere Aug 29, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let me know if you want me to improve both or if keeping the existing description is ok.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@elharo elharo Sep 1, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The more I look at this the weirder it is. Why is this an object instead of a Map?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@guillaumeblaquiere guillaumeblaquiere Sep 1, 2020

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree; it's strange and I don't know why to use an Object instead of a Map! However to ensure the compatibility with other app that depends on this library, I kept the existing signature.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@guillaumeblaquiere
Use boolean primitive type.
6b50a04
Improve variable naming

Improve documentation more user oriented.
@elharo elharo changed the title Feature #1098: Improve UrlEncodedContent class feat: Improve UrlEncodedContent class Oct 7, 2020
@elharo elharo added the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 7, 2020
@kokoro-team kokoro-team removed the kokoro:run Add this label to force Kokoro to re-run the tests. label Oct 7, 2020
@guillaumeblaquiere
Fix documentation issues
681381d
elharo
elharo reviewed Oct 12, 2020
View reviewed changes
Comment thread google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java Outdated
}

/**
* Initialize the UrlEncodedContent with our without the legacy and deprecated escapeUri encoder

@elharo elharo Oct 12, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

our --> or?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java Outdated
* @param useUriPathEncoding Escapes the string value so it can be safely included in URI path segments. For details on
* * escaping URIs, see <a href="http://tools.ietf.org/html/rfc3986#section-2.4">RFC 3986 - section
* * 2.4</a>
* @param useUriPathEncoding Escapes the string value so it can be safely included in URI path segments.

@elharo elharo Oct 12, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Escapes --> escapes

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread google-http-client/src/main/java/com/google/api/client/http/UrlEncodedContent.java Outdated
* For details on escaping URIs, see <a href="http://tools.ietf.org/html/rfc3986#section-2.4">RFC 3986 -
* section 2.4</a>
*/
public UrlEncodedContent(Object data, Boolean useUriPathEncoding) {

@elharo elharo Oct 12, 2020

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Boolean --> boolean
per Effective Java

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@guillaumeblaquiere
Fix documentation typos
a8d4e87
elharo
elharo approved these changes Oct 12, 2020
View reviewed changes
guillaumeblaquiere added 2 commits October 12, 2020 22:26
@guillaumeblaquiere
fix: documentation typos.
b528d57
@guillaumeblaquiere
Merge remote-tracking branch 'origin/1098/uripathencoding' into 1098/…
84c482f
…uripathencoding
@chingor13 chingor13 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 13, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 13, 2020
@chingor13 chingor13 changed the title feat: Improve UrlEncodedContent class feat: allow UrlEncodedContent to use UriPath escaping Oct 13, 2020
@chingor13 chingor13 changed the title feat: allow UrlEncodedContent to use UriPath escaping feat: add flag to allow UrlEncodedContent to use UriPath escaping Oct 13, 2020
@chingor13
chore: fix lint
92ac9ab
@chingor13 chingor13 added the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 13, 2020
@kokoro-team kokoro-team removed the kokoro:force-run Add this label to force Kokoro to re-run the tests. label Oct 13, 2020
@chingor13 chingor13 added the automerge Merge the pull request once unit tests and other checks pass. label Oct 13, 2020
@gcf-merge-on-green
gcf-merge-on-green Bot merged commit 9ab7016 into googleapis:master Oct 13, 2020
@gcf-merge-on-green gcf-merge-on-green Bot removed the automerge Merge the pull request once unit tests and other checks pass. label Oct 13, 2020
gcf-merge-on-green Bot pushed a commit that referenced this pull request Oct 13, 2020
@release-please
chore: release 1.37.0 (#1141)
0c1d58b
🤖 I have created a release \*beep\* \*boop\* 
---
## [1.37.0](https://www.github.com/googleapis/google-http-java-client/compare/v1.36.0...v1.37.0) (2020-10-13)


### Features

* add flag to allow UrlEncodedContent to use UriPath escaping ([#1100](https://www.github.com/googleapis/google-http-java-client/issues/1100)) ([9ab7016](https://www.github.com/googleapis/google-http-java-client/commit/9ab7016032327f6fb0f91970dfbd511b029dd949)), closes [#1098](https://www.github.com/googleapis/google-http-java-client/issues/1098)


### Bug Fixes

* make google-http-client.properties file shading friendly ([#1046](https://www.github.com/googleapis/google-http-java-client/issues/1046)) ([860bb05](https://www.github.com/googleapis/google-http-java-client/commit/860bb0541bcd7fc516cad14dd0d52481c7c7b414))


### Dependencies

* update protobuf-java to 3.13.0 ([#1093](https://www.github.com/googleapis/google-http-java-client/issues/1093)) ([b7e9663](https://www.github.com/googleapis/google-http-java-client/commit/b7e96632234e944e0e476dedfc822333716756bb))


### Documentation

* libraries-bom 12.0.0 ([#1136](https://www.github.com/googleapis/google-http-java-client/issues/1136)) ([450fcb2](https://www.github.com/googleapis/google-http-java-client/commit/450fcb2293cf3fa7c788cf0cc8ae48e865ae8de8))
---


This PR was generated with [Release Please](https://github.com/googleapis/release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@elharo elharo elharo approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

cla: yes This human has signed the Contributor License Agreement.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

UrlEncodedContent class should use URI path encoding

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@guillaumeblaquiere @elharo @chingor13 @kokoro-team
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.