How secure is the Grails HTTP file stream?

Is HTTPBuilder in a secure Grails stream?

If HTTPBuilder is connected to the Grails service class, will it be safe to use? Or should it be created with every call?

There seems to be no concrete answer as to whether the HTTPBuilder in Grails is thread safe or not. I tend to go with an unsafe flow due to the lack of documentation on this particular aspect, but I would like to get a definitive answer.

The code seems to indicate that it should be good to handle multiple requests from multiple threads if they go through the same URL with the same context (headers, authenticators, etc.).

+4
source share
1 answer

Do you mean groovyx.net.http.HTTPBuilder ? It has several fields that are modified using calling methods, and there is no synchronization or blocking, and there is no use of thread-safe collections or other classes, so no, this is very unsafe. Most builders are also similar to the state, and it is assumed that they are not thread safe.

+3
source

Source: https://habr.com/ru/post/1569661/


All Articles