Skip to content

Commit

Permalink
httpclient upgrade to 5.4 (#15747)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonomorris authored Sep 30, 2024
1 parent eb7cd5c commit 7704064
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ public class GraphqlServer {
public GraphqlServer() {
this.graphql = GraphqlFactory.newGraphQL();
this.server = ServerBootstrap.bootstrap()
.setCanonicalHostName("localhost")
.register("/graphql", new GraphqlHandler())
.create();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,8 @@ HttpContext basicAuthContext() {
authCache.put(new HttpHost("localhost", 8083), basicAuth);

HttpClientContext context = HttpClientContext.create();
context.setAuthCache(authCache);
context.setCredentialsProvider(provider);
context.setAttribute(HttpClientContext.AUTH_CACHE, authCache);
context.setAttribute(HttpClientContext.CREDS_PROVIDER, provider);

return context;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private static HttpServer createServer(int port) {
usersSingleUpdateRequestHandlers.put("DELETE", "/data/users/delete.json");

// @formatter:off
return ServerBootstrap.bootstrap().setListenerPort(port)
return ServerBootstrap.bootstrap().setCanonicalHostName("localhost").setListenerPort(port)
.register("/wp/v2/posts", new WordpressServerHttpRequestHandler(postsListCreateRequestHandlers))
.register("/wp/v2/posts/*", new WordpressServerHttpRequestHandler(postsSingleUpdateRequestHandlers))
.register("/wp/v2/users", new WordpressServerHttpRequestHandler(usersListCreateRequestHandlers))
Expand Down
2 changes: 1 addition & 1 deletion parent/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
<hsqldb-version>2.7.3</hsqldb-version>
<httpunit-version>1.7</httpunit-version>
<httpcore-version>5.3</httpcore-version>
<httpclient-version>5.2.1</httpclient-version>
<httpclient-version>5.4</httpclient-version>
<httpcore4-version>4.4.16</httpcore4-version>
<httpclient4-version>4.5.14</httpclient4-version>
<httpasyncclient-version>4.1.5</httpasyncclient-version>
Expand Down

0 comments on commit 7704064

Please sign in to comment.