Skip to content

Commit

Permalink
Undoing the 1.3 release. Testing proved it wasn't necessary.
Browse files Browse the repository at this point in the history
-jh-


git-svn-id: http://developer.marklogic.com/svn/mljam/trunk@886 e04f4502-82db-0310-b1af-f799f365da79
  • Loading branch information
hunterhacker committed Sep 23, 2008
1 parent 793bc08 commit 1810d53
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 12 deletions.
6 changes: 0 additions & 6 deletions README.txt
Expand Up @@ -46,9 +46,3 @@ Installation

The tutorial above explains the basic steps of an install.


History
-------

The latest 1.3 release includes a bug fix when manipulating non-ASCII characters.

2 changes: 1 addition & 1 deletion build.xml
Expand Up @@ -22,7 +22,7 @@
<project name="mljam" default="all" basedir=".">

<property name="product.name" value="mljam"/>
<property name="release.version" value="1.3"/>
<property name="release.version" value="1.2"/>

<!-- Static definitions of where things are relative to the root -->
<property name="java.source" value="server/src"/>
Expand Down
18 changes: 13 additions & 5 deletions server/src/com/xqdev/jam/MLJAM.java
Expand Up @@ -145,9 +145,17 @@ private static void endInterpreter(String contextId) throws EvalError {

private static String getBody(HttpServletRequest req) {
try {
// Trust that no one called getReader() on this request already
// Also trust MarkLogic to always send as UTF-8 (see #6308)
Reader reader = new BufferedReader(new InputStreamReader(req.getInputStream(), "UTF-8"));
// Try reading the post body using characters.
// This might throw an exception if something on the
// server side already called getInputStream().
// In that case we'll pull as bytes.
Reader reader = null;
try {
reader = new BufferedReader(req.getReader());
}
catch (IOException e) {
reader = new BufferedReader(new InputStreamReader(req.getInputStream(), "UTF-8"));
}

StringBuffer sbuf = new StringBuffer();
char[] cbuf = new char[4096];
Expand All @@ -157,8 +165,8 @@ private static String getBody(HttpServletRequest req) {
}
return sbuf.toString();
}
catch (IOException e) {
throw new ServerProblemException("IOException in reading POST body: " + e.getMessage());
catch (IOException e2) {
throw new ServerProblemException("IOException in reading POST body: " + e2.getMessage());
}
}

Expand Down

0 comments on commit 1810d53

Please sign in to comment.