Skip to content

Commit

Permalink
[rewrite] #1281 fatjar cli now merged into karate-core
Browse files Browse the repository at this point in the history
which should solve #1177
  • Loading branch information
ptrthomas committed Nov 14, 2020
1 parent 3751a8a commit 776404d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 11 deletions.
4 changes: 2 additions & 2 deletions karate-core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>com.linecorp.armeria</groupId>
<artifactId>armeria</artifactId>
<version>1.1.0</version>
<version>1.2.0</version>
</dependency>
<dependency>
<groupId>org.antlr</groupId>
Expand Down Expand Up @@ -154,7 +154,7 @@
<include>io.netty:*</include>
<include>org.antlr:*</include>
</includes>
</artifactSet>
</artifactSet>
<relocations>
<relocation>
<pattern>io.netty</pattern>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@
import com.linecorp.armeria.common.ResponseHeaders;
import com.linecorp.armeria.common.logging.RequestLogProperty;
import com.linecorp.armeria.server.ServiceRequestContext;
import io.netty.util.AsciiString;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
Expand Down Expand Up @@ -102,7 +101,7 @@ public Response invoke(HttpRequest request) {
}
ResponseHeaders rh = ahr.headers();
Map<String, List<String>> responseHeaders = new LinkedHashMap(rh.size());
for (AsciiString name : rh.names()) {
for (CharSequence name : rh.names()) {
if (!HttpHeaderNames.STATUS.equals(name)) {
responseHeaders.put(name.toString(), rh.getAll(name));
}
Expand All @@ -129,7 +128,7 @@ public HttpResponse execute(com.linecorp.armeria.client.HttpClient delegate, Cli
ctx.log().whenAvailable(RequestLogProperty.REQUEST_HEADERS).thenAccept(log -> {
request.setStartTimeMillis(log.requestStartTimeMillis());
RequestHeaders rh = log.requestHeaders();
for (AsciiString name : rh.names()) {
for (CharSequence name : rh.names()) {
if (name.charAt(0) != ':') {
request.putHeader(name.toString(), rh.getAll(name));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
import com.linecorp.armeria.common.ResponseHeadersBuilder;
import com.linecorp.armeria.server.HttpService;
import com.linecorp.armeria.server.ServiceRequestContext;
import io.netty.util.AsciiString;
import java.time.Duration;
import java.util.HashMap;
import java.util.List;
Expand Down Expand Up @@ -68,11 +67,12 @@ private Request toRequest(ServiceRequestContext ctx, AggregatedHttpRequest req)
request.setMethod(req.method().name());
RequestHeaders rh = req.headers();
if (rh != null) {
Set<AsciiString> names = rh.names();
// this is actually Set<io.netty.util.AsciiString> but it causes maven-shade problems
Set names = rh.names();
Map<String, List<String>> headers = new HashMap(names.size());
request.setHeaders(headers);
for (AsciiString name : names) {
headers.put(name.toString(), rh.getAll(name));
for (Object name : names) {
headers.put(name.toString(), rh.getAll((CharSequence) name));
}
}
if (!req.content().isEmpty()) {
Expand Down
2 changes: 1 addition & 1 deletion karate-netty/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<artifactId>karate-netty</artifactId>
<packaging>jar</packaging>

<dependencies>
<dependencies>
<dependency>
<groupId>com.intuit.karate</groupId>
<artifactId>karate-apache</artifactId>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<java.version>1.8</java.version>
<maven.compiler.version>3.6.0</maven.compiler.version>
<maven.surefire.version>2.22.2</maven.surefire.version>
<maven.shade.version>3.2.1</maven.shade.version>
<maven.shade.version>3.2.2</maven.shade.version>
<junit.version>4.12</junit.version>
<junit5.version>5.6.2</junit5.version>
<javafx.controls.version>13-ea+12</javafx.controls.version>
Expand Down

0 comments on commit 776404d

Please sign in to comment.