private void body_end(string whence) { this.imsg("websvc: body_end called {0}", (object)whence); if (this.isgzip) { byte[] bf = Websvc.ungzip(this.mem_body.inbf, this.mem_body.Length); this.mem_body = new MyBuffer(); this.mem_body.add(bf, bf.Length); } ++Websvc.nrequests; try { this.wmod.do_body_end(this); } catch (Exception ex) { this.imsg("crash in do_body_end() {0} {1}", (object)ex.Message, (object)ex.ToString()); Web.simple_error(this, "crash in do_body_end() " + ex.Message); } clib.imsg("body_end setting wmod to null"); this.wmod = (WebModule)null; if (this.query != null) { this.query.Clear(); } if (this.form != null) { this.form.Clear(); } this.inbody = false; this.content_len = 0; this.in_chunked = false; this.imsg("mystery body_end called {0}", (object)this.content_len); }
private void process_input_one() { if (this.inbody) { this.process_body(); } else if (this.in_trailer) { string str = this.in_line(); if (str == null || str.Length != 2) { return; } this.in_trailer = false; this.body_end(nameof(process_input_one)); } else { int num1 = clib.IndexOf(this.rawin, "\r\n\r\n", 0, this.inat); if (num1 < 0) { return; } this.imsg("Yay, we got the full header"); int num2 = num1 + 4; string header = Encoding.UTF8.GetString(this.rawin, 0, num2); Array.Copy((Array)this.rawin, num2, (Array)this.rawin, 0, this.inat - num2); this.inat -= num2; try { this.process_header(header); this.process_cmd_early(); } catch (Exception ex) { Web.simple_error(this, "Crashed in proces_header code : " + ex.Message + "\n" + ex.ToString()); } this.imsg("And now call process_cmd_early"); } }