[cpif] r232 - trunk/frontend-web
svn at argo.es
svn at argo.es
Tue Jul 3 17:54:04 CEST 2007
Author: jcea
Date: Tue Jul 3 17:54:03 2007
New Revision: 232
Log:
Implementamos 'HEAD'
Modified:
trunk/frontend-web/servidor_web.py
trunk/frontend-web/skins.py
Modified: trunk/frontend-web/servidor_web.py
==============================================================================
--- trunk/frontend-web/servidor_web.py (original)
+++ trunk/frontend-web/servidor_web.py Tue Jul 3 17:54:03 2007
@@ -66,7 +66,7 @@
method = getattr(self, mname)
method()
- def do_GET(self) :
+ def do_GET(self,post=False,head=False) :
global urls,allow_anonymous
cookie=self.headers.get("cookie",None)
if cookie :
@@ -113,14 +113,19 @@
for i,j in resultado[1].iteritems() :
self.send_header(i,j)
self.end_headers()
- self.wfile.write(resultado[2])
+
+ if not head :
+ self.wfile.write(resultado[2])
if self.must_stop :
import os
os._exit(os.EX_OK)
def do_POST(self) :
- return self.do_GET()
+ return self.do_GET(post=True)
+
+ def do_HEAD(self) :
+ return self.do_GET(head=True)
class threadHTTPServer(ThreadingMixIn,HTTPServer) :
def __init__(self,*args) :
Modified: trunk/frontend-web/skins.py
==============================================================================
--- trunk/frontend-web/skins.py (original)
+++ trunk/frontend-web/skins.py Tue Jul 3 17:54:03 2007
@@ -110,11 +110,9 @@
def show_thread(self):
"""Format some entries inside a thread"""
- print "caca"
first_post, num_msgs, messages = self._dict.pop("messages")
thread_num = self._dict.get("thread_num")
metatag = self._dict.get("metatag",None)
- print messages
for msg_num,author,date,text,avatar in messages:
format = self._style.pop(0)
self._style.append(format)
More information about the cpif
mailing list