Skip to content
This repository has been archived by the owner on Jun 7, 2024. It is now read-only.

Commit

Permalink
Merge pull request #880 from zalando/ARUHA-1674
Browse files Browse the repository at this point in the history
ARUHA-1674 use gzip compression on post requests as well
  • Loading branch information
antban committed May 28, 2018
2 parents d3d6c8b + 79876ba commit 0ab33e1
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/java/org/zalando/nakadi/config/JettyConfig.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package org.zalando.nakadi.config;

import org.eclipse.jetty.http.HttpMethod;
import org.eclipse.jetty.server.handler.gzip.GzipHandler;
import org.eclipse.jetty.util.thread.QueuedThreadPool;
import org.springframework.beans.factory.annotation.Value;
Expand All @@ -25,6 +26,7 @@ public JettyEmbeddedServletContainerFactory jettyEmbeddedServletContainerFactory
threadPool.setIdleTimeout(Integer.valueOf(idleTimeout));

final GzipHandler gzipHandler = new GzipHandler();
gzipHandler.addIncludedMethods(HttpMethod.POST.asString());
gzipHandler.setHandler(server.getHandler());
gzipHandler.setSyncFlush(true);
server.setHandler(gzipHandler);
Expand Down

0 comments on commit 0ab33e1

Please sign in to comment.