changeset 4227:f5b9edf3390b

hgweb.unbundle: call req.httphdr only after the last possible call to bail
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sun, 22 Oct 2006 13:54:43 -0300
parents fffacca46f09
children c52b7176af94
files mercurial/hgweb/hgweb_mod.py
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mercurial/hgweb/hgweb_mod.py	Fri Mar 16 00:22:53 2007 -0300
+++ b/mercurial/hgweb/hgweb_mod.py	Sun Oct 22 13:54:43 2006 -0300
@@ -1076,8 +1076,6 @@
                  headers={'status': '401 Unauthorized'})
             return
 
-        req.httphdr("application/mercurial-0.1")
-
         their_heads = req.form['heads'][0].split(' ')
 
         def check_heads():
@@ -1089,6 +1087,8 @@
             bail(_('unsynced changes\n'))
             return
 
+        req.httphdr("application/mercurial-0.1")
+
         # do not lock repo until all changegroup data is
         # streamed. save to temporary file.