Skip to content

ojacquemart/camel-reproducers

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Camel Reproducers

This repository contains reproducer projects for Apache Camel issues.

Client request validation and empty body

There is a bug if you enable the client request validation and the body is empty when there is no need for a body.

This repository contains a sample 'HelloRoute' with one endpoint: GET /api/hello that returns a simple JSON message.

# fails
$ curl -H "Content-Type: application/json" localhost:8080/api/hello
Invalid JSon payload.

# succeeds
$ curl localhost:8080/api/hello
{"message":"hello world"}

If you specify a content type, the request will fail with a 400 saying 'Invalid JSon payload.'.

It seems like there is a problem in the DefaultRestClientRequestValidator.

The body is resolved as an empty string and not as a null value.

If the client request validation is disabled, the request will succeed.

Tomcat standalone and JNDI

There is a problem if the application uses the json-validatorspring boot starter and is deployed in a standalone tomcat.

See spring-projects/spring-boot#35091

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages