X-Git-Url: http://dolda2000.com/gitweb/?a=blobdiff_plain;f=src%2Fjagi%2Fscgi%2FJagi.java;h=7337f97c0ac759d615b4d48a175cde907f9766fb;hb=965619c08fbd27cded67dff6afc87e6aa764cbb0;hp=758afdcfbd1212660f6c1bd5a2098ca45a497d28;hpb=e6788877d5d1fd3f9eead731a660f83906af9d27;p=jagi.git diff --git a/src/jagi/scgi/Jagi.java b/src/jagi/scgi/Jagi.java index 758afdc..7337f97 100644 --- a/src/jagi/scgi/Jagi.java +++ b/src/jagi/scgi/Jagi.java @@ -13,8 +13,7 @@ public class Jagi { into.put(coding.newDecoder().decode(h.getKey()).toString(), coding.decode(h.getValue()).toString()); } - public static Map mkenv(ReadableByteChannel sk) throws IOException { - Map rawhead = Scgi.readhead(sk); + public static Map mkenv(Map rawhead, ReadableByteChannel input) throws IOException { Map env; try { env = new HashMap<>(); @@ -33,7 +32,7 @@ public class Jagi { env.put("jagi.url_scheme", "https"); else env.put("jagi.url_scheme", "http"); - env.put("jagi.input", sk); + env.put("jagi.input", input); env.put("jagi.errors", System.err); env.put("jagi.multithread", true); env.put("jagi.multiprocess", false); @@ -41,4 +40,8 @@ public class Jagi { env.put("jagi.cleanup", new HashSet<>()); return(env); } + + public static Map mkenv(ReadableByteChannel sk) throws IOException { + return(mkenv(Scgi.readhead(sk), sk)); + } }