}
public MultiMap<String, String> params() {
- if(params == null) {
- params = Params.urlparams(this);
- if(method == "POST") {
- MultiMap<String, String> pp = Params.postparams(this);
- if(pp != null)
- params.putAll(pp);
- }
- }
+ if(params == null)
+ params = Params.stdparams(this);
return(params);
}
}
return(null);
}
+
+ public static MultiMap<String, String> stdparams(Request req) {
+ MultiMap<String, String> params = Params.urlparams(req);
+ if(req.method() == "POST") {
+ MultiMap<String, String> pp = Params.postparams(req);
+ if(pp != null)
+ params.putAll(pp);
+ }
+ return(params);
+ }
}
this.ctype = ctype;
}
+ public SimpleWriter() {
+ this("html");
+ }
+
public abstract void respond(Request req, PrintWriter out);
public void respond(Request req) {