diff --git a/SoObjects/SOGo/SOGoProxyAuthenticator.m b/SoObjects/SOGo/SOGoProxyAuthenticator.m index 42d608f41..b054512e6 100644 --- a/SoObjects/SOGo/SOGoProxyAuthenticator.m +++ b/SoObjects/SOGo/SOGoProxyAuthenticator.m @@ -59,16 +59,15 @@ { NSString *remoteUser; - if ([[SOGoSystemDefaults sharedSystemDefaults] trustProxyAuthentication]) + + /* If such a header is not provided by the proxy, SOPE will attempt to + deduce it from the "Authorization" header. */ + remoteUser = [[context request] headerForKey: @"x-webobjects-remote-user"]; + + if ([remoteUser length] == 0 && [[SOGoSystemDefaults sharedSystemDefaults] trustProxyAuthentication]) { remoteUser = @"anonymous"; } - else - { - /* If such a header is not provided by the proxy, SOPE will attempt to - deduce it from the "Authorization" header. */ - remoteUser = [[context request] headerForKey: @"x-webobjects-remote-user"]; - } return remoteUser; }