Mercurial > p > roundup > code
diff roundup/cgi/actions.py @ 2592:5a8d9465827e
implement the HTTP HEAD command [SF#992544]
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Tue, 20 Jul 2004 02:07:58 +0000 |
| parents | 420d5c2a49d9 |
| children | 1df7d4a41da4 |
line wrap: on
line diff
--- a/roundup/cgi/actions.py Tue Jul 20 00:43:55 2004 +0000 +++ b/roundup/cgi/actions.py Tue Jul 20 02:07:58 2004 +0000 @@ -1,4 +1,4 @@ -#$Id: actions.py,v 1.34 2004-07-13 09:41:15 a1s Exp $ +#$Id: actions.py,v 1.35 2004-07-20 02:07:58 richard Exp $ import re, cgi, StringIO, urllib, Cookie, time, random @@ -882,7 +882,13 @@ h['Content-Type'] = 'text/csv' # some browsers will honor the filename here... h['Content-Disposition'] = 'inline; filename=query.csv' + self.client.header() + + if self.client.env['REQUEST_METHOD'] == 'HEAD': + # all done, return a dummy string + return 'dummy' + writer = rcsv.writer(self.client.request.wfile) writer.writerow(columns)
