switch from jersey 1.x to resteasy

This commit is contained in:
Sebastian Sdorra
2017-06-27 20:16:05 +02:00
parent aec3d5d65d
commit 3637a8de20
53 changed files with 415 additions and 568 deletions

View File

@@ -62,10 +62,9 @@ import sonia.scm.web.cgi.EnvList;
//~--- JDK imports ------------------------------------------------------------
import com.sun.jersey.core.util.Base64;
import java.io.File;
import java.io.IOException;
import java.util.Base64;
import java.util.Enumeration;
@@ -215,7 +214,8 @@ public class HgCGIServlet extends HttpServlet
String encodedUserInfo =
authorization.substring(
HttpUtil.AUTHORIZATION_SCHEME_BASIC.length()).trim();
String userInfo = Base64.base64Decode(encodedUserInfo);
// TODO check encoding of user-agent ?
String userInfo = new String(Base64.getDecoder().decode(encodedUserInfo));
env.set(SCM_CREDENTIALS, CipherUtil.getInstance().encode(userInfo));
}