# HG changeset patch # User Thomas Waldmann # Date 1153955894 -7200 # Node ID ecece5db5288cbd77bce23bef6659d50e9b2d72f # Parent 5bf357a720e7fe79426dcf2d409fa14c44004c09 use emit_http_headers diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/AttachFile.py --- a/MoinMoin/action/AttachFile.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/AttachFile.py Thu Jul 27 01:18:14 2006 +0200 @@ -493,7 +493,7 @@ elif request.form['do'][0] == 'savedrawing': if request.user.may.write(pagename): save_drawing(pagename, request) - request.http_headers() + request.emit_http_headers() request.write("OK") else: msg = _('You are not allowed to save a drawing on this page.') @@ -541,7 +541,7 @@ def upload_form(pagename, request, msg=''): _ = request.getText - request.http_headers() + request.emit_http_headers() # Use user interface language for this generated page request.setContentLanguage(request.lang) request.theme.send_title(_('Attachments for "%(pagename)s"') % {'pagename': pagename}, pagename=pagename, msg=msg) @@ -653,8 +653,7 @@ mt = wikiutil.MimeType(filename=filename) - # send header - request.http_headers([ + request.emit_http_headers([ "Content-Type: %s" % mt.content_type(), "Content-Length: %d" % os.path.getsize(fpath), # TODO: fix the encoding here, plain 8 bit is not allowed according to the RFCs @@ -824,7 +823,7 @@ if not filename: return # send header & title - request.http_headers() + request.emit_http_headers() # Use user interface language for this generated page request.setContentLanguage(request.lang) title = _('attachment:%(filename)s of %(pagename)s', formatted=True) % { diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/Despam.py --- a/MoinMoin/action/Despam.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/Despam.py Thu Jul 27 01:18:14 2006 +0200 @@ -169,7 +169,7 @@ # request.form.get('timestamp', [None])[0] ok = request.form.get('ok', [0])[0] - request.http_headers() + request.emit_http_headers() request.theme.send_title("Despam", pagename=pagename) # Start content (important for RTL support) request.write(request.formatter.startContent("content")) diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/LikePages.py --- a/MoinMoin/action/LikePages.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/LikePages.py Thu Jul 27 01:18:14 2006 +0200 @@ -41,7 +41,7 @@ return # more than one match, list 'em - request.http_headers() + request.emit_http_headers() # This action generate data using the user language request.setContentLanguage(request.lang) diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/LocalSiteMap.py --- a/MoinMoin/action/LocalSiteMap.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/LocalSiteMap.py Thu Jul 27 01:18:14 2006 +0200 @@ -28,7 +28,7 @@ def execute(pagename, request): _ = request.getText - request.http_headers() + request.emit_http_headers() # This action generate data using the user language request.setContentLanguage(request.lang) diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/MyPages.py --- a/MoinMoin/action/MyPages.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/MyPages.py Thu Jul 27 01:18:14 2006 +0200 @@ -58,7 +58,7 @@ from MoinMoin.Page import Page from MoinMoin.parser.text_moin_wiki import Parser as WikiParser - request.http_headers() + request.emit_http_headers() # This action generate data using the user language request.setContentLanguage(request.lang) diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/SubscribeUser.py --- a/MoinMoin/action/SubscribeUser.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/SubscribeUser.py Thu Jul 27 01:18:14 2006 +0200 @@ -17,7 +17,7 @@ def show_form(pagename, request): _ = request.getText - request.http_headers() + request.emit_http_headers() request.theme.send_title(_("Subscribe users to the page %s") % pagename, pagename=pagename) request.write(""" @@ -32,7 +32,7 @@ def show_result(pagename, request): _ = request.getText - request.http_headers() + request.emit_http_headers() request.theme.send_title(_("Subscribed for %s:") % pagename, pagename=pagename) diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/__init__.py --- a/MoinMoin/action/__init__.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/__init__.py Thu Jul 27 01:18:14 2006 +0200 @@ -252,7 +252,7 @@ def do_content(pagename, request): """ same as do_show, but we only show the content """ - request.http_headers() + request.emit_http_headers() page = Page(request, pagename) request.write('' % request.getQualifiedURL(page.url(request))) page.send_page(request, count_hit=0, content_only=1) @@ -426,7 +426,7 @@ """ dump the form data we received in this request for debugging """ data = util.dumpFormData(request.form) - request.http_headers() + request.emit_http_headers() request.write("%s" % data) diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/backup.py --- a/MoinMoin/action/backup.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/backup.py Thu Jul 27 01:18:14 2006 +0200 @@ -28,7 +28,7 @@ """ Send compressed tar file """ dateStamp = time.strftime("%Y-%m-%d--%H-%M-%S-UTC", time.gmtime()) filename = "%s-%s.tar.%s" % (request.cfg.siteid, dateStamp, request.cfg.backup_compression) - request.http_headers([ + request.emit_http_headers([ "Content-Type: application/octet-stream", "Content-Disposition: inline; filename=\"%s\"" % filename, ]) @@ -70,7 +70,7 @@ def sendBackupForm(request, pagename): _ = request.getText - request.http_headers() + request.emit_http_headers() request.setContentLanguage(request.lang) title = _('Wiki Backup / Restore') request.theme.send_title(title, form=request.form, pagename=pagename) diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/diff.py --- a/MoinMoin/action/diff.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/diff.py Thu Jul 27 01:18:14 2006 +0200 @@ -71,7 +71,7 @@ # This action generate content in the user language request.setContentLanguage(request.lang) - request.http_headers() + request.emit_http_headers() request.theme.send_title(_('Diff for "%s"') % (pagename,), pagename=pagename, allow_doubleclick=1) if rev1 > 0 and rev2 > 0 and rev1 > rev2 or rev1 == 0 and rev2 > 0: diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/edit.py --- a/MoinMoin/action/edit.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/edit.py Thu Jul 27 01:18:14 2006 +0200 @@ -137,7 +137,7 @@ try: still_conflict = wikiutil.containsConflictMarker(savetext) pg.setConflict(still_conflict) - request.http_headers() # XXX WHY? XXX + request.emit_http_headers() # XXX WHY? XXX savemsg = pg.saveText(savetext, rev, trivial=trivial, comment=comment) except pg.EditConflict, e: msg = e.message diff -r 5bf357a720e7 -r ecece5db5288 MoinMoin/action/fckdialog.py --- a/MoinMoin/action/fckdialog.py Thu Jul 27 00:27:51 2006 +0200 +++ b/MoinMoin/action/fckdialog.py Thu Jul 27 01:18:14 2006 +0200 @@ -15,7 +15,7 @@ def macro_dialog(request): help = get_macro_help(request) - request.http_headers() + request.emit_http_headers() request.write( ''' @@ -169,7 +169,7 @@ pages = [p.page_name for p in searchresult.hits] else: pages = [name] - request.http_headers() + request.emit_http_headers() request.write( ''' @@ -200,7 +200,7 @@ ''' % "".join(["\n" % p for p in pages])) def link_dialog(request): - request.http_headers() + request.emit_http_headers() # list of wiki pages name = request.form.get("pagename", [""])[0] if name: @@ -246,7 +246,7 @@ scriptname += "/" action = scriptname basepage = request.page.page_name.encode(config.charset) - request.http_headers() + request.emit_http_headers() request.write('''