From: Fong, Anna (anna@water.ca.gov)
Date: Tue Jun 24 2003 - 14:56:26 EDT
Craig,
Found Sun Alert regarding HTTP Trace for iPlanet -- http://sunsolve.Sun.COM/pub-cgi/retrieve.pl?type=0 <http://sunsolve.Sun.COM/pub-cgi/retrieve.pl?type=0&doc=fsalert%2F50603&display=plain> &doc=fsalert%2F50603&display=plain
I believe the solution listed for iPlanet 4.1 can also be implemented for NES. Under your server root directory, there should be an example -- /nsapi/examples/auth.c for creating an NSAPI.
Summary of solution from above
-----------------------------------------------
1) Create a file called reject_trace.c and paste the code below into it
----------------------------- start --------------------------------
#include "nsapi.h"
NSAPI_PUBLIC int reject_trace(pblock *pb, Session *sn, Request *rq)
{
const char *method;
method = pblock_findval("method", rq->reqpb);
if (method && !strcmp(method, "TRACE")) {
/*
* Set a bogus content length so the TRACE handler will refuse to
* handle the request
*/
param_free(pblock_remove("transfer-encoding",rq->headers));
param_free(pblock_remove("content-length", rq->headers));
pblock_nvinsert("content-length", "-1", rq->headers);
log_error(LOG_WARN, "reject-trace", sn, rq, "rejecting TRACE request");
protocol_status(sn, rq, PROTOCOL_NOT_IMPLEMENTED, NULL);
return REQ_ABORTED;
}
return REQ_NOACTION;
}
----------------------- end --------------------------------
2) Compile the NSAPI:
<http://docs.sun.com/source/816-5673-10/04_mysaf.htm#15053(4.x> http://docs.sun.com/source/816-5673-10/04_mysaf.htm#15053(4.x)
3) Edit the obj.conf and add to the end of the Init section:
Init fn="load-modules" shlib="<path to library>/reject_trace.so"funcs="reject_trace"
Then after the line <Object name="default"> add the following
AuthTrans fn="reject_trace"
-----Original Message-----
From: Johnson, Craig E [mailto:Craig.E.Johnson@icn.siemens.com]
Sent: Friday, June 20, 2003 2:34 PM
To: 'hpux-admin@DutchWorks.nl'
Subject: [HPADM] HTTP Trace for ns-httpd
Does anyone know how to disable HTTP Trace for the Netscape webserver? Details appreciated. Thanks.
Craig
-- ---> Please post QUESTIONS and SUMMARIES only!! <--- To subscribe/unsubscribe to this list, contact majordomo@dutchworks.nl Name: hpux-admin@dutchworks.nl Owner: owner-hpux-admin@dutchworks.nl Archives: ftp.dutchworks.nl:/pub/digests/hpux-admin (FTP, browse only) http://www.dutchworks.nl/htbin/hpsysadmin (Web, browse & search)
This archive was generated by hypermail 2.1.7 : Sat Apr 12 2008 - 11:02:30 EDT