Issue1250

Title verbose set to "on" breaks cloning functionality via http
Priority bug Status resolved
Superseder hgwebdir not mod_wsgi compliant (accessing stdout and stderr)
View: 1095
Nosy List Ota, djc, od, tonfa
Assigned To djc Topics hgweb, http_proto

Created on 2008-08-02.02:35:05 by Ota, last changed 2008-09-09.09:58:09 by djc.

Messages
msg7013 (view) Author: djc Date: 2008-09-09.09:58:08
Ah, issue1095 is better for this. Superseding.
msg7009 (view) Author: djc Date: 2008-09-09.09:47:23
I'm going to make this the canonical bug for problems in this class.
msg6964 (view) Author: djc Date: 2008-09-05.22:06:39
Yes. stderr, probably.
msg6961 (view) Author: tonfa Date: 2008-09-05.21:19:48
Isn't that related to the redirection of stdin/stderr ?
msg6711 (view) Author: Ota Date: 2008-08-05.09:25:26
Sure, its no big issue turning verbose off, if you know the problem ;)
I, for one, searched about two hours until i found the cause and allmost went crazy.
msg6693 (view) Author: djc Date: 2008-08-04.15:06:17
Hmm, that's bad. I should look into this.

Though an easy workaround should be to just disable verbose in the server hgrc.
msg6680 (view) Author: Ota Date: 2008-08-02.02:35:04
Enabling verbose to on in the /etc/mercurial/hgrc file breaks the cloning
functionality via the http interface.

I am running the hgwebdir.cgi script on Opensuse 11 with Apache 2.2.6, Python
2.5.2 and mercurial 1.0.1.

Viewing the repository through a browser works fine.
Cloning any repo (hg clone http://repo.domain.com/test) leads to following error
of mercurial: 
abort: HTTP Error 500: Internal Server Error

The apache logs following message:
[Sat Aug 02 04:05:09 2008] [error] [client 192.168.21.45] malformed header from
script. Bad header=1 changesets found: hgwebdir.cgi

The virtual host config:
<VirtualHost *:80>
    ServerName repo-browser.domain.de
    ServerAlias repo-browser.domain
    ServerAdmin webmaster@domain.de

    DocumentRoot /www/repository-browser/htdocs
    ErrorLog /www/repository-browser/logs/error.log

    RewriteEngine on
    RewriteRule (.*) /www/repository-browser/htdocs/hgwebdir.cgi$1

    <Directory "/www/repository-browser/htdocs">
        Options +ExecCGI +FollowSymLinks
    </Directory>
</VirtualHost>

And the used hgrc config (hgwebdir.cgi also points to this file):
[ui]
username = "Servername" <om@viazenetti.de>
#uncommenting following line breaks the clonining functionality via the http
interface
#verbose = true
slash = true

[extensions]
mq=
gpg=
hgk=
acl=
purge=
fetch=
transplant=

[email]
from = "Repository Managment" <om@viazenetti.de>
method = /usr/sbin/sendmail -t -i 

[web]
allow_archive = bz2 gz zip
contact = "Ota Mares" <om@viazenetti.de>
description = No description given
encoding = UTF-8
stripes = 1
style = gitweb
baseurl = 

[paths]
test = /www/_mercurial-test-repo/
History
Date User Action Args
2008-09-09 09:58:09djcsetstatus: chatting -> resolved
nosy: tonfa, od, djc, Ota
superseder: + hgwebdir not mod_wsgi compliant (accessing stdout and stderr)
messages: + msg7013
title: hgweb tries to write to stdout/stderr -> verbose set to "on" breaks cloning functionality via http
2008-09-09 09:47:25djcsetnosy: tonfa, od, djc, Ota
title: verbose set to "on" breaks cloning functionality via http -> hgweb tries to write to stdout/stderr
messages: + msg7009
assignedto: 0173 -> djc
2008-09-05 22:06:39djcsetnosy: tonfa, od, djc, Ota
messages: + msg6964
2008-09-05 21:19:49tonfasetnosy: + tonfa
messages: + msg6961
2008-08-05 09:25:27Otasetnosy: + od, - 0173
messages: + msg6711
2008-08-04 15:06:17djcsettopic: + http_proto, - ui
assignedto: 0173
status: unread -> chatting
messages: + msg6693
nosy: + djc, 0173
2008-08-02 02:35:05Otacreate