code: public void handleTrace(HttpRequest request,
                              HttpResponse response)
          throws IOException
      {
          boolean trace=getHttpContext().getHttpServer().getTrace();
          
          // Handle TRACE by returning request header
          response.setField(HttpFields.__ContentType,
                            HttpFields.__MessageHttp);
          if (trace)
          {
              OutputStream out = response.getOutputStream();
              ByteArrayISO8859Writer writer = new ByteArrayISO8859Writer();
              writer.write(request.toString());
              writer.flush();
              response.setIntField(HttpFields.__ContentLength,writer.size());
              writer.writeTo(out);
              out.flush();
          }
          request.setHandled(true);
      }
docs: /* -----------------------------------------------------------------