Permalink
Browse files

Undoing the 1.3 release. Testing proved it wasn't necessary.

-jh-


git-svn-id: http://developer.marklogic.com/svn/mljam/trunk@886 e04f4502-82db-0310-b1af-f799f365da79
  • Loading branch information...
1 parent 793bc08 commit 1810d5365eeae43ddb982fb557117792350347b1 @hunterhacker hunterhacker committed Sep 23, 2008
Showing with 14 additions and 12 deletions.
  1. +0 −6 README.txt
  2. +1 −1 build.xml
  3. +13 −5 server/src/com/xqdev/jam/MLJAM.java
View
@@ -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.
-
View
@@ -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"/>
@@ -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];
@@ -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());
}
}

0 comments on commit 1810d53

Please sign in to comment.