Details
-
Bug
-
Status: Open
-
Major
-
Resolution: Unresolved
-
(Java) V4 4.10.0
-
None
-
None
Description
OLINGO-752 introduced a URL parameter odata-accept-forms-encoding to allow clients to select if a + character in URL the query strings should be treated as a space or a literal plus.
The implementation uses a static variable to store whether the current request is using forms encoding or not. When multiple requests happen concurrently, some using forms encoding and some not, it will be non-deterministic how each request will be treated.
See how Parser.parseUri makes to calls to static methods on UriDecoder, namely splitAndDecodeOptions first and later isFormEncoding. The call to splitAndDecodeOptions checks if the request is using forms encoding and saves the result in the static field UriDecoder.formEncoding. The second call to isFormEncoding returns the value of UriDecoder.formEncoding. If a second call to splitAndDecodeOptions is made before isFormEncoding is called, the wrong result may be returned.