Makes init doc debug response optional
[mkjsf-moved-to-github.git] / src / main / java / com / indexdata / mkjsf / pazpar2 / Pz2ProxyBean.java
index 989cc06..09e500a 100644 (file)
@@ -70,7 +70,10 @@ public class Pz2ProxyBean extends Pz2Bean implements ServiceProxyInterface {
   }\r
   \r
   public void ipAuthenticate (ServiceProxyUser user) {\r
-    if (!user.isAuthenticated()) {\r
+    if (!user.isIpAuthenticated()) {\r
+      if (user.isAuthenticated()) {\r
+        user.clear();\r
+      }\r
       ((ServiceProxyClient)searchClient).ipAuthenticate(user);\r
     }\r
   }\r
@@ -125,14 +128,13 @@ public class Pz2ProxyBean extends Pz2Bean implements ServiceProxyInterface {
   }\r
   \r
   @Override\r
-  public String postInit(byte[] initDoc) throws UnsupportedEncodingException, IOException {    \r
+  public String postInit(byte[] initDoc, boolean includeDebug) throws UnsupportedEncodingException, IOException {    \r
     pzresp.reset();\r
-    byte[] response = ((ServiceProxyClient)searchClient).postInitDoc(initDoc);\r
+    byte[] response = ((ServiceProxyClient)searchClient).postInitDoc(initDoc,includeDebug);\r
     initDocResponse = new String(response,"UTF-8");\r
     return initDocResponse;\r
   }\r
 \r
-\r
   @Override\r
   public String getInitResponse() {\r
     return initDocResponse;\r