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

Updated for v9.4 of Jetty #431

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions google-oauth-client-jetty/pom.xml
Expand Up @@ -89,6 +89,7 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-server</artifactId>
<version>9.4.26.v20200117</version>
Copy link
Contributor

Choose a reason for hiding this comment

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

versions are set elsewhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm new to this. How are versions set? There are a number of people who need this upgrade (see the Issue). And why don't you want it? Help me understand so I can do a better job.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

OK - I found where the versions are set and I will update my fix appropriately. Is a new pull request appropriate or will it be rejected because the upgrade is not wanted (why not)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Jetty is a weird dep and we need to keep it consistent across the orbit of all GCP libraries, not just in this one project. Upgrading it to a new major version is going to require some planning and investigation to make sure we don't accidentally break anything. If this is necessary for some reason, please file an issue with more details so this can be prioritized and discussed.

</dependency>
<dependency>
<groupId>junit</groupId>
Expand Down
Expand Up @@ -24,6 +24,7 @@
import org.eclipse.jetty.server.Connector;
import org.eclipse.jetty.server.Request;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
import org.eclipse.jetty.server.handler.AbstractHandler;

/**
Expand Down Expand Up @@ -116,8 +117,9 @@ public LocalServerReceiver() {
@Override
public String getRedirectUri() throws IOException {
server = new Server(port != -1 ? port : 0);
Connector connector = server.getConnectors()[0];
ServerConnector connector = new ServerConnector(server);
connector.setHost(host);
server.setConnectors(new Connector[] { connector } );
server.setHandler(new CallbackHandler());
try {
server.start();
Expand Down