finos / symphony-bdk-java

The Symphony BDK (Bot Developer Kit) for Java helps you to create production-grade Chat Bots and Extension Applications on top of the Symphony REST APIs.
https://symphony-bdk-java.finos.org
Apache License 2.0
23 stars 69 forks source link

Update User-Agent default value to comply with RFC 7231 section 5.5.3 #471

Closed symphony-elias closed 3 years ago

symphony-elias commented 3 years ago

Default user-agent is currently "Symphony BDK/" + getBdkVersion() + "/java/" + System.getProperty("java.version") as defined here: https://github.com/finos/symphony-bdk-java/blob/main/symphony-bdk-http/symphony-bdk-http-api/src/main/java/com/symphony/bdk/http/api/util/ApiUtils.java#L14

According to https://tools.ietf.org/html/rfc7231#section-5.5.3 we should have no spaces within the same product item in the User-Agent field.

Expected Result:

I would propose to have the following instead: "Symphony-BDK-Java/" + getBdkVersion() + " Java/" + System.getProperty("java.version")

symphony-youri commented 3 years ago

Is it ok to have a space here getBdkVersion() + " Java/"?

symphony-elias commented 3 years ago

Is it ok to have a space here getBdkVersion() + " Java/"?

I would say so, check the example here: https://tools.ietf.org/html/rfc7231#section-5.5.3