summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cnhttp.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/cnhttp.go b/cnhttp.go
index bc949ca..205b515 100644
--- a/cnhttp.go
+++ b/cnhttp.go
@@ -143,6 +143,15 @@ func (srv *server) handleCNP(w http.ResponseWriter, r *http.Request, path string
return
}
+ err = r.ParseForm()
+ if err != nil {
+ srv.handleError(w, err)
+ }
+
+ if sel := r.FormValue("select"); sel != "" {
+ req.SetSelect("cnm", sel)
+ }
+
if ims := r.Header.Get("If-Modified-Since"); ims != "" {
var t time.Time
t, err = http.ParseTime(ims)
@@ -165,10 +174,6 @@ func (srv *server) handleCNP(w http.ResponseWriter, r *http.Request, path string
return
}
- err = r.ParseForm()
- if err != nil {
- srv.handleError(w, err)
- }
_, preq := r.Form["req"]
_, phdr := r.Form["hdr"]
_, presp := r.Form["resp"]