/// <summary> /// Called by the server (via the Service method) /// to allow a servlet to handle a TRACE request. /// /// A TRACE returns the headers sent with the TRACE /// request to the client, so that they can be used in /// debugging. There's no need to override this method. /// </summary> /// <param name="req"> /// the IHttpServletRequest object that /// contains the request the client made of /// the servlet /// </param> /// <param name="resp"> /// the IHttpServletResponse object that /// contains the response the servlet returns /// to the client /// </param> /// <exception cref="IOException"> /// if an input or output error occurs /// while the servlet is handling the /// TRACE request /// </exception> /// <exception cref="ServletException"> /// if the request for the /// TRACE cannot be handled /// </exception> protected void DoTrace(IHttpServletRequest req, IHttpServletResponse resp) { int responseLength; string CRLF = "\r\n"; string responseString = "TRACE " + req.RequestURI + " " + req.Protocol; foreach (object elem in req.HeaderNames) { string headerName = (string)elem; responseString += CRLF + headerName + ": " + req.GetHeader(headerName); } responseString += CRLF; responseLength = responseString.Length; resp.ContentType = "message/http"; resp.ContentLength = responseLength; ServletOutputStream output = resp.OutputStream; output.Print(responseString); output.Close(); return; }
internal BatchInternalJettyServletResponse(ServletOutputStream output) { this.Output = output; }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void readAndExecuteOperations(javax.ws.rs.core.UriInfo uriInfo, javax.ws.rs.core.HttpHeaders httpHeaders, javax.servlet.http.HttpServletRequest req, java.io.InputStream body, javax.servlet.ServletOutputStream output) throws java.io.IOException, javax.servlet.ServletException public virtual void ReadAndExecuteOperations(UriInfo uriInfo, HttpHeaders httpHeaders, HttpServletRequest req, Stream body, ServletOutputStream output) { _results = new StreamingBatchOperationResults(JsonFactory.createJsonGenerator(output), output); IDictionary <int, string> locations = _results.Locations; ParseAndPerform(uriInfo, httpHeaders, req, body, locations); _results.close(); }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public StreamingBatchOperationResults(org.codehaus.jackson.JsonGenerator g, javax.servlet.ServletOutputStream output) throws java.io.IOException public StreamingBatchOperationResults(JsonGenerator g, ServletOutputStream output) { this._g = g; this._output = output; g.writeStartArray(); }