Why does "request.getUserPrincipal (). GetName ()" sometimes return an empty string?

Does anyone have an idea why the getName() method of UserPrincipal sometimes provides an empty string? Most of the time it returns the correct username, but not every time.

This behavior occurs randomly. I can run the application, run the command, and it works. The next time I launch the application and run the command (exactly the same as before!), It does not work.

Any ideas?

+4
source share
1 answer

The part where you say: "... launch the application and run the command ..." is unclear.

What exactly are the stages involved in?

HTTP is a text protocol. If you capture and observe requests and responses, I’m sure that you will notice the difference to which the behavior can be attributed.

My suggestion is to gather more detailed information to show you the direction of the solution.

+1
source

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


All Articles