Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix for #1573 -- Error Message Enhancement #1602

Merged
merged 2 commits into from
Jan 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/edu/ucsb/nceas/metacat/MetacatHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@

package edu.ucsb.nceas.metacat;

import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
Expand Down Expand Up @@ -79,7 +78,6 @@
import org.dataone.service.types.v1.Checksum;
import org.dataone.service.types.v1.Event;
import org.dataone.service.types.v1.Identifier;
import org.dataone.service.types.v1.ObjectFormatIdentifier;
import org.dataone.service.types.v1.Session;
import org.dataone.service.types.v2.SystemMetadata;
import org.ecoinformatics.eml.EMLParser;
Expand Down Expand Up @@ -383,7 +381,7 @@ public void handleLoginAction(Writer out, Hashtable<String, String[]> params,
try {
sess = new AuthSession();
} catch (Exception e) {
String errorMsg = "MetacatServlet.handleLoginAction - Problem in MetacatServlet.handleLoginAction() authenicating session: "
String errorMsg = "MetacatServlet.handleLoginAction - Problem in MetacatServlet.handleLoginAction() authenticating session: "
+ e.getMessage();
logMetacat.error(errorMsg);
out.write(errorMsg);
Expand All @@ -392,7 +390,7 @@ public void handleLoginAction(Writer out, Hashtable<String, String[]> params,
}
boolean isValid = sess.authenticate(request, un, pw);

//if it is authernticate is true, store the session
//if authenticate is true, store the session
if (isValid) {
HttpSession session = sess.getSessions();
String id = session.getId();
Expand Down Expand Up @@ -494,13 +492,15 @@ public void handleLogoutAction(Writer out, Hashtable<String, String[]> params,

// SQUERY & QUERY SECTION
/**
* Retreive the squery xml, execute it and display it
* Retrieve the squery xml, execute it and display it
*
* @param out the output stream to the client
* @param params the Hashtable of parameters that should be included in the
* squery.
* @param response the response object linked to the client
* @param conn the database connection
* @param user the user name (it maybe different to the one in param)
* @param groups the group array
* @param sessionid the sessionid
*/
protected void handleSQuery(Writer out, Hashtable<String, String[]> params,
HttpServletResponse response, String user, String[] groups,
Expand Down Expand Up @@ -902,7 +902,7 @@ public void handleReadAction(Hashtable<String, String[]> params, HttpServletRequ
response.setContentType("text/xml"); //MIME type
// Send back error message if out = null
if (pw == null) {
// If pw is null, open the respnose
// If pw is null, open the response
pw = response.getWriter();
}
pw.println("<?xml version=\"1.0\"?>");
Expand Down Expand Up @@ -1632,7 +1632,7 @@ public String handleInsertOrUpdateAction(String ipAddress, String userAgent,
this.ERROR +
"User '" +
user +
"' is not allowed to insert and update" +
"' is not allowed to insert or update. Check the Allowed and Denied Submitters lists" +
this.ERRORCLOSE;
if(out != null)
{
Expand Down