This addresses an issue surfaced by the Jakarta JAX-RS API community in Issue 
[659](https://github.com/eclipse-ee4j/jaxrs-api/issues/659) where a parameter 
marked as `@FormParam` may be injected with a value that is inconsistent with 
an entity `Form` parameter.  The latter will have the latest contents of the 
HTTP form body stream whereas the former will not - modifications made to the 
HTTP form body during filters or interceptors will be lost, thus it is possible 
that the following code would fail:

```
@POST
public Response processForm(@FormParam("value") String value, Form form) {
    assertEquals(value, form.asMap().getFirst("value"));
}
```

This change ensures that the `@FormParam` parameters will match the values in 
the `Form` parameter.  There is probably an optimization that I am missing that 
would only perform this logic if the input stream were modified - suggestions 
welcome on how I could best do this.  Thanks!

[ Full content available at: https://github.com/apache/cxf/pull/453 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to