You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It looks as if parsed path parameters can end up in other requests/threads.
To reproduce this issue I took the simplied source of the ring-swagger example, removed swagger and the existing routes, and added a new POST route which takes a path parameter and receives a JSON document with same path parameter value. Both values should then be the same what is checked in the handler:
To provoke the issue a simple Bash script with curl can be used which calls this route with the corresponding JSON document:
#!/bin/bash
for i in {1..10000}
do
out=$(curl -s -X POST -H "Content-Type: application/json" --data-raw "{\"id\": \"$i\"}" http://localhost:3000/check/$i)
if [ ! -z "$out" ]
then
echo $out
fi
done
If the script is executed in two terminal it should output the cases where the two parameters are not identical, something like:
Looks like this bug affects every version in the 0.3.x series. SegmentTrie, which was introduced in 0.2.11 and was replaced by Trie in 0.3.0, handles Match objects differently enough that at least it does not have exactly the same bug.
Root cause: despite all parameters were immutable, there was one mutable reference to those on the Java side. Now it's all final. Will go through all the other Java interop places to make sure there are no more errors like this.
It looks as if parsed path parameters can end up in other requests/threads.
To reproduce this issue I took the simplied source of the ring-swagger example, removed swagger and the existing routes, and added a new POST route which takes a path parameter and receives a JSON document with same path parameter value. Both values should then be the same what is checked in the handler:
To provoke the issue a simple Bash script with curl can be used which calls this route with the corresponding JSON document:
If the script is executed in two terminal it should output the cases where the two parameters are not identical, something like:
The text was updated successfully, but these errors were encountered: