diff options
author | clsr <clsr@clsr.net> | 2017-08-27 22:03:53 +0200 |
---|---|---|
committer | clsr <clsr@clsr.net> | 2017-08-27 22:03:53 +0200 |
commit | 70d88b8a227b275850ef343cb4314ac36f32f64b (patch) | |
tree | 1e8b3c154b284c09c13805561fa83c54720d39c7 | |
parent | cbb456c6d3c995e7856ad08e6fac844fe20796ec (diff) | |
download | cn-http-70d88b8a227b275850ef343cb4314ac36f32f64b.tar.gz cn-http-70d88b8a227b275850ef343cb4314ac36f32f64b.zip |
Add initial support for CNM selectors
-rw-r--r-- | cnhttp.go | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -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"] |