fixed jvm/jwsgi compilation on Linux

This commit is contained in:
roberto@fiorenzo
2010-11-08 16:38:44 +01:00
parent 444e8d2637
commit 4a4455cd16
6 changed files with 41 additions and 23 deletions
+9 -6
View File
@@ -18,13 +18,16 @@ public class utest {
public static Object[] jwsgi(Hashtable env) throws java.io.IOException {
if (env.containsKey("CONTENT_LENGTH")) {
Integer cl = Integer.parseInt( (String) env.get("CONTENT_LENGTH") );
FileInputStream f = new FileInputStream( (FileDescriptor) env.get("jwsgi.input") );
byte[] b = new byte[cl];
String s = (String) env.get("CONTENT_LENGTH");
if (s.length() > 0) {
Integer cl = Integer.parseInt( s );
FileInputStream f = new FileInputStream( (FileDescriptor) env.get("jwsgi.input") );
byte[] b = new byte[cl];
if (f.read(b) > 0) {
String postdata = new String(b);
System.out.println( postdata );
if (f.read(b) > 0) {
String postdata = new String(b);
System.out.println( postdata );
}
}
}