En Fri, 03 Oct 2008 17:46:31 -0300, [EMAIL PROTECTED] <[EMAIL PROTECTED]> escribió:

On 3 oct, 20:17, "Gabriel Genellina" <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] wrote:
>> I'm using SimpleHTTPServer (work well) but it always sends "Server"
>> header in response:
>> How can I remove that ?

En Fri, 03 Oct 2008 11:11:34 -0300, Gary M. Josack <[EMAIL PROTECTED]>  
escribió:

> you've got ?self.send_header('Server', self.version_string()) in the  
> send_response method of the BaseHTTPRequestHandler class in the  
> BaseHTTPServer module. Long story, short, it's going to be a lot of work  
> to get rid of.

One can always write a customized RequestHandler, and just copy the  
send_response method omiting the offending line. (Ok, you have to check whether it still works with the next Python release... a warning triggered  
by a new sys.version would be enough to remember that)

I see. No choice but to override the method with a copy of the
source :-/
I guess I'll have to do with that.

Another alternative would be to override send_header() and filter out the 'Server' keyword...

--
Gabriel Genellina

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to