We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
It's a 401 Unauthorized in both cases, but you also get a WWW-Authenticate header in the latter case.
401 Unauthorized
WWW-Authenticate
Example from auxiliary/scanner/http/tomcat_mgr_login:
auxiliary/scanner/http/tomcat_mgr_login
metasploit-framework/modules/auxiliary/scanner/http/tomcat_mgr_login.rb
Lines 93 to 96 in ef2ed89
Reported via IRC.