[Spambayes] end of problems?
Emperor
DarkEmperor at gmx.net
Thu Sep 25 18:09:13 EDT 2003
Hmm... sometimes strange anyway. In Reviews for example.
Hey! Anyone talking to me??? ;)
Am Fre, 2003-09-26 um 00.04 schrieb Emperor:
> Ok, normally I code in Java... but couldn't wait.
>
> So I changed the function
>
> def writeOKHeaders(self, contentType, extraHeaders={}):
> """Reflected from `HTTPPlugin`s."""
> # Buffer the headers until there's a `write`, in case an error
> occurs.
> timeNow = time.gmtime(time.time())
> httpNow = time.strftime('%a, %d %b %Y %H:%M:%S GMT', timeNow)
> headers = []
> headers.append("HTTP/1.1 200 OK")
> headers.append("Connection: close")
> headers.append("Content-Type: %s" % contentType)
> headers.append("Date: %s" % httpNow)
> # added cache control to always get newest page
> headers.append("Expires: 26 May 2000 16:00:00 GMT")
> headers.append("Cache-Control: no-cache")
> for name, value in extraHeaders.items():
> headers.append("%s: %s" % (name, value))
> headers.append("")
> headers.append("")
> self._bufferedHeaders = headers
>
> Now it's just copy paste ;)
>
>
> _______________________________________________
> Spambayes at python.org
> http://mail.python.org/mailman/listinfo/spambayes
> Check the FAQ before asking: http://spambayes.sf.net/faq.html
More information about the Spambayes
mailing list