You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zipkin.apache.org by ad...@apache.org on 2019/06/13 13:10:58 UTC

[incubator-zipkin] branch armeria-0.87 updated (99f4189 -> a2a9f9e)

This is an automated email from the ASF dual-hosted git repository.

adriancole pushed a change to branch armeria-0.87
in repository https://gitbox.apache.org/repos/asf/incubator-zipkin.git.


 discard 99f4189  Updates to Armeria 0.87 and addresses deprecation
     new a2a9f9e  Updates to Armeria 0.87 and addresses deprecations

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (99f4189)
            \
             N -- N -- N   refs/heads/armeria-0.87 (a2a9f9e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../zipkin2/server/internal/RegisterZipkinHealthIndicators.java   | 3 +--
 .../main/java/zipkin2/server/internal/ZipkinHealthIndicator.java  | 7 +++----
 .../main/java/zipkin2/server/internal/ZipkinHttpCollector.java    | 2 +-
 .../java/zipkin2/server/internal/ZipkinServerConfiguration.java   | 8 ++++----
 .../zipkin2/server/internal/ui/ZipkinUiConfigurationTest.kt       | 4 ++--
 5 files changed, 11 insertions(+), 13 deletions(-)


[incubator-zipkin] 01/01: Updates to Armeria 0.87 and addresses deprecations

Posted by ad...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

adriancole pushed a commit to branch armeria-0.87
in repository https://gitbox.apache.org/repos/asf/incubator-zipkin.git

commit a2a9f9e854b192549cd02cdb9bf313618e9966af
Author: Adrian Cole <ac...@pivotal.io>
AuthorDate: Thu Jun 13 21:10:43 2019 +0800

    Updates to Armeria 0.87 and addresses deprecations
---
 pom.xml                                            |  4 +--
 .../server/internal/MetricsHealthController.java   |  2 +-
 .../internal/RegisterZipkinHealthIndicators.java   |  3 +--
 .../server/internal/ZipkinHealthIndicator.java     |  3 +--
 .../server/internal/ZipkinHttpCollector.java       |  8 +++---
 .../zipkin2/server/internal/ZipkinQueryApiV2.java  | 30 +++++++++++-----------
 .../server/internal/ZipkinServerConfiguration.java |  8 +++---
 .../internal/brave/TracingStorageComponent.java    |  6 ++---
 .../ZipkinPrometheusMetricsConfiguration.java      |  5 ++--
 .../server/internal/ui/ZipkinUiConfiguration.java  | 10 ++++----
 .../internal/ui/ZipkinUiConfigurationTest.kt       |  4 +--
 11 files changed, 40 insertions(+), 43 deletions(-)

diff --git a/pom.xml b/pom.xml
index 3b2c3cd..7672c96 100755
--- a/pom.xml
+++ b/pom.xml
@@ -48,9 +48,9 @@
 
     <main.basedir>${project.basedir}</main.basedir>
 
-    <armeria.version>0.86.0</armeria.version>
+    <armeria.version>0.87.0</armeria.version>
     <!-- This is from armeria, but be careful to avoid >= v20 apis -->
-    <guava.version>27.1-jre</guava.version>
+    <guava.version>28.0-jre</guava.version>
 
     <!-- only used for proto interop testing -->
     <wire.version>3.0.0-alpha01</wire.version>
diff --git a/zipkin-server/src/main/java/zipkin2/server/internal/MetricsHealthController.java b/zipkin-server/src/main/java/zipkin2/server/internal/MetricsHealthController.java
index 1906b47..6bdce4f 100644
--- a/zipkin-server/src/main/java/zipkin2/server/internal/MetricsHealthController.java
+++ b/zipkin-server/src/main/java/zipkin2/server/internal/MetricsHealthController.java
@@ -96,6 +96,6 @@ public class MetricsHealthController {
     ResponseHeaders headers = ResponseHeaders.builder(statusMapper.mapStatus(health.getStatus()))
       .contentType(MediaType.JSON)
       .setInt(HttpHeaderNames.CONTENT_LENGTH, body.length).build();
-    return HttpResponse.of(headers, HttpData.of(body));
+    return HttpResponse.of(headers, HttpData.wrap(body));
   }
 }
diff --git a/zipkin-server/src/main/java/zipkin2/server/internal/RegisterZipkinHealthIndicators.java b/zipkin-server/src/main/java/zipkin2/server/internal/RegisterZipkinHealthIndicators.java
index 8bc96f3..a6b473d 100644
--- a/zipkin-server/src/main/java/zipkin2/server/internal/RegisterZipkinHealthIndicators.java
+++ b/zipkin-server/src/main/java/zipkin2/server/internal/RegisterZipkinHealthIndicators.java
@@ -23,8 +23,7 @@ import zipkin2.Component;
 // This is an application listener to ensure the graph is fully constructed before doing health
 public final class RegisterZipkinHealthIndicators implements ApplicationListener {
 
-  @Override
-  public void onApplicationEvent(ApplicationEvent event) {
+  @Override public void onApplicationEvent(ApplicationEvent event) {
     if (!(event instanceof ApplicationReadyEvent)) return;
     ConfigurableListableBeanFactory beanFactory =
         ((ApplicationReadyEvent) event).getApplicationContext().getBeanFactory();
diff --git a/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinHealthIndicator.java b/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinHealthIndicator.java
index 9a1569d..aabd737 100644
--- a/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinHealthIndicator.java
+++ b/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinHealthIndicator.java
@@ -40,8 +40,7 @@ final class ZipkinHealthIndicator extends CompositeHealthIndicator {
     }
 
     /** synchronized to prevent overlapping requests to a storage backend */
-    @Override
-    public synchronized Health health() {
+    @Override public synchronized Health health() {
       CheckResult result = component.check();
       return result.ok() ? Health.up().build() : Health.down((Exception) result.error()).build();
     }
diff --git a/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinHttpCollector.java b/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinHttpCollector.java
index d538d16..a7eaff0 100644
--- a/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinHttpCollector.java
+++ b/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinHttpCollector.java
@@ -14,7 +14,7 @@
 package zipkin2.server.internal;
 
 import com.linecorp.armeria.client.encoding.GzipStreamDecoderFactory;
-import com.linecorp.armeria.common.AggregatedHttpMessage;
+import com.linecorp.armeria.common.AggregatedHttpRequest;
 import com.linecorp.armeria.common.HttpData;
 import com.linecorp.armeria.common.HttpHeaderNames;
 import com.linecorp.armeria.common.HttpRequest;
@@ -136,7 +136,7 @@ public class ZipkinHttpCollector {
         } else {
           // Currently this will happen for gzip spans. Need to fix armeria's gzip decoder to allow
           // returning pooled buffers on request.
-          nioBuffer = ByteBuffer.wrap(content.array(), content.offset(), content.length());
+          nioBuffer = ByteBuffer.wrap(content.array(), 0, content.length());
         }
 
         try {
@@ -170,7 +170,7 @@ public class ZipkinHttpCollector {
     return HttpResponse.from(result);
   }
 
-  static void maybeLog(String prefix, ServiceRequestContext ctx, AggregatedHttpMessage request) {
+  static void maybeLog(String prefix, ServiceRequestContext ctx, AggregatedHttpRequest request) {
     if (!LOGGER.isDebugEnabled()) return;
     LOGGER.debug("{} sent by clientAddress->{}, userAgent->{}",
       prefix, ctx.clientAddress(), request.headers().get(HttpHeaderNames.USER_AGENT)
@@ -205,7 +205,7 @@ final class CompletableCallback extends CompletableFuture<HttpResponse>
 final class UnzippingBytesRequestConverter {
   static final GzipStreamDecoderFactory GZIP_DECODER_FACTORY = new GzipStreamDecoderFactory();
 
-  static HttpData convertRequest(ServiceRequestContext ctx, AggregatedHttpMessage request) {
+  static HttpData convertRequest(ServiceRequestContext ctx, AggregatedHttpRequest request) {
     ZipkinHttpCollector.metrics.incrementMessages();
     String encoding = request.headers().get(HttpHeaderNames.CONTENT_ENCODING);
     HttpData content = request.content();
diff --git a/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinQueryApiV2.java b/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinQueryApiV2.java
index 4cd0b47..4f7c2b6 100644
--- a/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinQueryApiV2.java
+++ b/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinQueryApiV2.java
@@ -13,7 +13,7 @@
  */
 package zipkin2.server.internal;
 
-import com.linecorp.armeria.common.AggregatedHttpMessage;
+import com.linecorp.armeria.common.AggregatedHttpResponse;
 import com.linecorp.armeria.common.HttpData;
 import com.linecorp.armeria.common.HttpHeaderNames;
 import com.linecorp.armeria.common.HttpStatus;
@@ -70,7 +70,7 @@ public class ZipkinQueryApiV2 {
   }
 
   @Get("/api/v2/dependencies")
-  public AggregatedHttpMessage getDependencies(
+  public AggregatedHttpResponse getDependencies(
     @Param("endTs") long endTs,
     @Param("lookback") Optional<Long> lookback) throws IOException {
     Call<List<DependencyLink>> call =
@@ -79,20 +79,20 @@ public class ZipkinQueryApiV2 {
   }
 
   @Get("/api/v2/services")
-  public AggregatedHttpMessage getServiceNames() throws IOException {
+  public AggregatedHttpResponse getServiceNames() throws IOException {
     List<String> serviceNames = storage.serviceAndSpanNames().getServiceNames().execute();
     serviceCount = serviceNames.size();
     return maybeCacheNames(serviceCount > 3, serviceNames);
   }
 
   @Get("/api/v2/spans")
-  public AggregatedHttpMessage getSpanNames(@Param("serviceName") String serviceName) throws IOException {
+  public AggregatedHttpResponse getSpanNames(@Param("serviceName") String serviceName) throws IOException {
     List<String> spanNames = storage.serviceAndSpanNames().getSpanNames(serviceName).execute();
     return maybeCacheNames(serviceCount > 3, spanNames);
   }
 
   @Get("/api/v2/remoteServices")
-  public AggregatedHttpMessage getRemoteServiceNames(@Param("serviceName") String serviceName)
+  public AggregatedHttpResponse getRemoteServiceNames(@Param("serviceName") String serviceName)
     throws IOException {
     List<String> remoteServiceNames =
       storage.serviceAndSpanNames().getRemoteServiceNames(serviceName).execute();
@@ -100,7 +100,7 @@ public class ZipkinQueryApiV2 {
   }
 
   @Get("/api/v2/traces")
-  public AggregatedHttpMessage getTraces(
+  public AggregatedHttpResponse getTraces(
     @Param("serviceName") Optional<String> serviceName,
     @Param("remoteServiceName") Optional<String> remoteServiceName,
     @Param("spanName") Optional<String> spanName,
@@ -129,19 +129,19 @@ public class ZipkinQueryApiV2 {
   }
 
   @Get("/api/v2/trace/{traceIdHex}")
-  public AggregatedHttpMessage getTrace(@Param("traceIdHex") String traceIdHex) throws IOException {
+  public AggregatedHttpResponse getTrace(@Param("traceIdHex") String traceIdHex) throws IOException {
     List<Span> trace = storage.spanStore().getTrace(traceIdHex).execute();
     if (trace == null) {
-      return AggregatedHttpMessage.of(HttpStatus.NOT_FOUND, MediaType.PLAIN_TEXT_UTF_8,
+      return AggregatedHttpResponse.of(HttpStatus.NOT_FOUND, MediaType.PLAIN_TEXT_UTF_8,
         traceIdHex + " not found");
     }
     return jsonResponse(SpanBytesEncoder.JSON_V2.encodeList(trace));
   }
 
-  static AggregatedHttpMessage jsonResponse(byte[] body) {
-    return AggregatedHttpMessage.of(ResponseHeaders.builder(200)
+  static AggregatedHttpResponse jsonResponse(byte[] body) {
+    return AggregatedHttpResponse.of(ResponseHeaders.builder(200)
       .contentType(MediaType.JSON)
-      .setInt(HttpHeaderNames.CONTENT_LENGTH, body.length).build(), HttpData.of(body));
+      .setInt(HttpHeaderNames.CONTENT_LENGTH, body.length).build(), HttpData.wrap(body));
   }
 
   static final WriteBuffer.Writer<String> QUOTED_STRING_WRITER = new WriteBuffer.Writer<String>() {
@@ -157,12 +157,12 @@ public class ZipkinQueryApiV2 {
   };
 
   @Get("/api/v2/autocompleteKeys")
-  public AggregatedHttpMessage getAutocompleteKeys() {
+  public AggregatedHttpResponse getAutocompleteKeys() {
     return maybeCacheNames(true, autocompleteKeys);
   }
 
   @Get("/api/v2/autocompleteValues")
-  public AggregatedHttpMessage getAutocompleteValues(@Param("key") String key) throws IOException {
+  public AggregatedHttpResponse getAutocompleteValues(@Param("key") String key) throws IOException {
     List<String> values = storage.autocompleteTags().getValues(key).execute();
     return maybeCacheNames(values.size() > 3, values);
   }
@@ -172,7 +172,7 @@ public class ZipkinQueryApiV2 {
    * empty results, users have more questions. We assume caching becomes a concern when zipkin is in
    * active use, and active use usually implies more than 3 services.
    */
-  AggregatedHttpMessage maybeCacheNames(boolean shouldCacheControl, List<String> values) {
+  AggregatedHttpResponse maybeCacheNames(boolean shouldCacheControl, List<String> values) {
     Collections.sort(values);
     byte[] body = JsonCodec.writeList(QUOTED_STRING_WRITER, values);
     ResponseHeadersBuilder headers = ResponseHeaders.builder(200)
@@ -184,7 +184,7 @@ public class ZipkinQueryApiV2 {
         CacheControl.maxAge(namesMaxAge, TimeUnit.SECONDS).mustRevalidate().getHeaderValue()
       );
     }
-    return AggregatedHttpMessage.of(headers.build(), HttpData.of(body));
+    return AggregatedHttpResponse.of(headers.build(), HttpData.wrap(body));
   }
 
   // This is inlined here as there isn't enough re-use to warrant it being in the zipkin2 library
diff --git a/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinServerConfiguration.java b/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinServerConfiguration.java
index fe236fe..9ec10b8 100644
--- a/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinServerConfiguration.java
+++ b/zipkin-server/src/main/java/zipkin2/server/internal/ZipkinServerConfiguration.java
@@ -31,6 +31,7 @@ import org.springframework.beans.factory.annotation.Value;
 import org.springframework.beans.factory.config.BeanPostProcessor;
 import org.springframework.boot.actuate.autoconfigure.metrics.MeterRegistryCustomizer;
 import org.springframework.boot.actuate.health.HealthAggregator;
+import org.springframework.boot.actuate.health.HealthIndicatorRegistry;
 import org.springframework.boot.autoconfigure.ImportAutoConfiguration;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
@@ -44,13 +45,13 @@ import org.springframework.core.annotation.Order;
 import org.springframework.core.type.AnnotatedTypeMetadata;
 import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
-import zipkin2.server.internal.throttle.ZipkinStorageThrottleProperties;
 import zipkin2.collector.CollectorMetrics;
 import zipkin2.collector.CollectorSampler;
 import zipkin2.server.internal.brave.TracingStorageComponent;
+import zipkin2.server.internal.throttle.ThrottledStorageComponent;
+import zipkin2.server.internal.throttle.ZipkinStorageThrottleProperties;
 import zipkin2.storage.InMemoryStorage;
 import zipkin2.storage.StorageComponent;
-import zipkin2.server.internal.throttle.ThrottledStorageComponent;
 
 @Configuration
 @ImportAutoConfiguration(ArmeriaSpringActuatorAutoConfiguration.class)
@@ -86,8 +87,7 @@ public class ZipkinServerConfiguration implements WebMvcConfigurer {
     return new ZipkinHealthIndicator(healthAggregator);
   }
 
-  @Override
-  public void addViewControllers(ViewControllerRegistry registry) {
+  @Override public void addViewControllers(ViewControllerRegistry registry) {
     registry.addRedirectViewController("/info", "/actuator/info");
   }
 
diff --git a/zipkin-server/src/main/java/zipkin2/server/internal/brave/TracingStorageComponent.java b/zipkin-server/src/main/java/zipkin2/server/internal/brave/TracingStorageComponent.java
index 81b4b63..b736f18 100644
--- a/zipkin-server/src/main/java/zipkin2/server/internal/brave/TracingStorageComponent.java
+++ b/zipkin-server/src/main/java/zipkin2/server/internal/brave/TracingStorageComponent.java
@@ -73,13 +73,11 @@ public final class TracingStorageComponent extends StorageComponent {
       return new TracedCall<>(tracer, delegate.getTrace(traceId), "get-trace");
     }
 
-    @Override
-    public Call<List<String>> getServiceNames() {
+    @Override @Deprecated public Call<List<String>> getServiceNames() {
       return new TracedCall<>(tracer, delegate.getServiceNames(), "get-service-names");
     }
 
-    @Override
-    public Call<List<String>> getSpanNames(String serviceName) {
+    @Override @Deprecated public Call<List<String>> getSpanNames(String serviceName) {
       return new TracedCall<>(tracer, delegate.getSpanNames(serviceName), "get-span-names");
     }
 
diff --git a/zipkin-server/src/main/java/zipkin2/server/internal/prometheus/ZipkinPrometheusMetricsConfiguration.java b/zipkin-server/src/main/java/zipkin2/server/internal/prometheus/ZipkinPrometheusMetricsConfiguration.java
index 7356870..aa44951 100644
--- a/zipkin-server/src/main/java/zipkin2/server/internal/prometheus/ZipkinPrometheusMetricsConfiguration.java
+++ b/zipkin-server/src/main/java/zipkin2/server/internal/prometheus/ZipkinPrometheusMetricsConfiguration.java
@@ -20,7 +20,7 @@ import com.linecorp.armeria.common.RequestContext;
 import com.linecorp.armeria.common.Response;
 import com.linecorp.armeria.common.logging.RequestLog;
 import com.linecorp.armeria.common.logging.RequestLogAvailability;
-import com.linecorp.armeria.server.PathMapping;
+import com.linecorp.armeria.server.Route;
 import com.linecorp.armeria.server.Service;
 import com.linecorp.armeria.server.ServiceRequestContext;
 import com.linecorp.armeria.server.SimpleDecoratingService;
@@ -73,7 +73,8 @@ public class ZipkinPrometheusMetricsConfiguration {
   @Order(1)
   ArmeriaServerConfigurator notFoundMetricCollector() {
     // Use glob instead of catch-all to avoid adding it to the trie router.
-    return sb -> sb.service(PathMapping.ofGlob("/**"), (ctx, req) -> HttpResponse.of(HttpStatus.NOT_FOUND));
+    return sb -> sb.service(Route.builder().glob("/**").build(),
+      (ctx, req) -> HttpResponse.of(HttpStatus.NOT_FOUND));
   }
 
   static final class MetricCollectingService<I extends Request, O extends Response>
diff --git a/zipkin-server/src/main/java/zipkin2/server/internal/ui/ZipkinUiConfiguration.java b/zipkin-server/src/main/java/zipkin2/server/internal/ui/ZipkinUiConfiguration.java
index 28f01aa..f507467 100644
--- a/zipkin-server/src/main/java/zipkin2/server/internal/ui/ZipkinUiConfiguration.java
+++ b/zipkin-server/src/main/java/zipkin2/server/internal/ui/ZipkinUiConfiguration.java
@@ -21,11 +21,11 @@ import com.linecorp.armeria.common.HttpRequest;
 import com.linecorp.armeria.common.HttpResponse;
 import com.linecorp.armeria.common.HttpStatus;
 import com.linecorp.armeria.common.MediaType;
+import com.linecorp.armeria.common.ServerCacheControl;
+import com.linecorp.armeria.common.ServerCacheControlBuilder;
 import com.linecorp.armeria.server.AbstractHttpService;
 import com.linecorp.armeria.server.HttpService;
 import com.linecorp.armeria.server.RedirectService;
-import com.linecorp.armeria.server.ServerCacheControl;
-import com.linecorp.armeria.server.ServerCacheControlBuilder;
 import com.linecorp.armeria.server.Service;
 import com.linecorp.armeria.server.ServiceRequestContext;
 import com.linecorp.armeria.server.encoding.HttpEncodingService;
@@ -126,8 +126,8 @@ public class ZipkinUiConfiguration {
       legacyIndex = HttpFileBuilder.ofResource("zipkin-ui/index.html");
       lensIndex = HttpFileBuilder.ofResource("zipkin-lens/index.html");
     } else {
-      legacyIndex = HttpFileBuilder.of(HttpData.of(processedIndexHtml().getBytes(UTF_8)));
-      lensIndex = HttpFileBuilder.of(HttpData.of(processedLensIndexHtml().getBytes(UTF_8)));
+      legacyIndex = HttpFileBuilder.of(HttpData.wrap(processedIndexHtml().getBytes(UTF_8)));
+      lensIndex = HttpFileBuilder.of(HttpData.wrap(processedLensIndexHtml().getBytes(UTF_8)));
     }
 
     ServerCacheControl maxAgeMinute = new ServerCacheControlBuilder().maxAgeSeconds(60).build();
@@ -153,7 +153,7 @@ public class ZipkinUiConfiguration {
 
     byte[] config = new ObjectMapper().writeValueAsBytes(ui);
     return sb -> {
-      sb.service("/zipkin/config.json", HttpFileBuilder.of(HttpData.of(config))
+      sb.service("/zipkin/config.json", HttpFileBuilder.of(HttpData.wrap(config))
         .cacheControl(new ServerCacheControlBuilder().maxAgeSeconds(600).build())
         .contentType(MediaType.JSON_UTF_8)
         .build()
diff --git a/zipkin-server/src/test/kotlin/zipkin2/server/internal/ui/ZipkinUiConfigurationTest.kt b/zipkin-server/src/test/kotlin/zipkin2/server/internal/ui/ZipkinUiConfigurationTest.kt
index 3171d40..18cf8f5 100644
--- a/zipkin-server/src/test/kotlin/zipkin2/server/internal/ui/ZipkinUiConfigurationTest.kt
+++ b/zipkin-server/src/test/kotlin/zipkin2/server/internal/ui/ZipkinUiConfigurationTest.kt
@@ -13,7 +13,7 @@
  */
 package zipkin2.server.internal.ui
 
-import com.linecorp.armeria.common.AggregatedHttpMessage
+import com.linecorp.armeria.common.AggregatedHttpResponse
 import com.linecorp.armeria.common.HttpHeaderNames
 import com.linecorp.armeria.common.HttpMethod
 import com.linecorp.armeria.common.HttpRequest
@@ -160,7 +160,7 @@ class ZipkinUiConfigurationTest {
       .contains("<base href=\"/\">")
   }
 
-  private fun serveIndex(vararg cookies: Cookie): AggregatedHttpMessage {
+  private fun serveIndex(vararg cookies: Cookie): AggregatedHttpResponse {
     val headers = RequestHeaders.builder(HttpMethod.GET, "/")
     val encodedCookies = ClientCookieEncoder.LAX.encode(*cookies)
     if (encodedCookies != null) {