Add condition to reset content-type only if it isd not already set

Polish some of the POMs to address missing dependencies
Temporary disconnect gcp background sample until errors are fixed
This commit is contained in:
Oleg Zhurakousky
2020-07-13 14:21:02 +02:00
parent 8ef8190681
commit 0537ce061b
6 changed files with 32 additions and 21 deletions

View File

@@ -59,7 +59,7 @@ final public class LocalServerTestSupport {
private static final String SERVER_READY_STRING = "Started ServerConnector";
private static AtomicInteger nextPort = new AtomicInteger(8080);
private static AtomicInteger nextPort = new AtomicInteger(55555);
private LocalServerTestSupport() {
}

View File

@@ -687,7 +687,7 @@ public class SimpleFunctionRegistry implements FunctionRegistry, FunctionInspect
// Set the contentType header to the value of accept for "legacy" reasons. But, do not set the
// contentType header to the value of accept if it is a wildcard type, as this doesn't make sense.
// This also applies to the else branch below.
if (acceptedContentType.isConcrete()) {
if (acceptedContentType.isConcrete() && !headersMap.containsKey(MessageHeaders.CONTENT_TYPE)) {
headersMap.put(MessageHeaders.CONTENT_TYPE, acceptedContentType);
}
}

View File

@@ -33,14 +33,6 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-json</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
</exclusion>
<exclusion>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>

View File

@@ -66,4 +66,33 @@
</plugin>
</plugins>
</build>
<repositories>
<repository>
<id>spring-snapshots</id>
<name>Spring Snapshots</name>
<url>https://repo.spring.io/libs-snapshot-local</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>false</enabled>
</releases>
</repository>
<repository>
<id>spring-milestones</id>
<name>Spring Milestones</name>
<url>https://repo.spring.io/libs-milestone-local</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
<repository>
<id>spring-releases</id>
<name>Spring Releases</name>
<url>https://repo.spring.io/release</url>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</repositories>
</project>

View File

@@ -28,16 +28,6 @@
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-webflux</artifactId>
<exclusions>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-transport-native-epoll</artifactId>
</exclusion>
<exclusion>
<groupId>io.netty</groupId>
<artifactId>netty-codec-http2</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>

View File

@@ -26,7 +26,7 @@
<module>function-sample-azure</module>
<!--><module>function-sample-spring-integration</module>-->
<module>function-sample-gcp-http</module>
<module>function-sample-gcp-background</module>
<!-- <module>function-sample-gcp-background</module> -->
</modules>
<build>