Hi,
I’m trying to route a PATCH request through a channel. This channel has a route to a spring RestController:
@RestController
public class PatchResource {
Logger logger = LoggerFactory.getLogger(getClass());
@PatchMapping(path = "/")
public ResponseEntity patch(@RequestBody Map<String, Object> propertyValues) {
logger.info("{}", propertyValues);
return ResponseEntity.ok().body(propertyValues);
}
}
When calling the endpoint directly, it returns the expected response:
$ docker exec -it openhim-core curl -X PATCH -H "Content-Type:application/json" -d '{"hello":"world"}' http://patch-test:8080/
{"hello":"world"}
When calling through OpenHIM,
docker exec -it openhim-core curl -X PATCH -H "Content-Type:application/json" -d '{"hello":"world"}' http://localhost:5001/patch-test
the request fails on the endpoint with the following error:
openhim-patch-test-1 | 2024-01-08 08:41:08.811 WARN 1 --- [nio-8080-exec-2] .w.s.m.s.DefaultHandlerExceptionResolver : Failed to read HTTP message: org.springframework.http.converter.HttpMessageNotReadableException: I/O error while reading input message; nested exception is java.io.EOFException: Unexpected EOF read on the socket
Increasing the channel timeout does not solve the issue.
Using core v8.4.0 on docker.