hiawatha 8.5 + git-http-backend fails with status code 415

17 March 2013, 21:09
Hiawatha version: 8.5
Operating System: Ununtu Server 12.04 64bit

Hi Hugo,

Huge thanks for the contunuing development and support of hiawatha!

I have the following use case for Hiawatha which did not work:

Accessing a git repository over https, hiawatha + git-http-backend. I can successfully clone a repository and I can pull back text files added to the cloned repository, however, if I put more complex stuff (e.g. binaries) pushing brings this error on the server side:

error: RPC failed; result=22, HTTP code = 415
fatal: The remote end hung up unexpectedly
(this is what the remote git client says after 'git push origin master')

The analogous config works fine with apache2, so it must be some quirk with media types on the side of hiawatha ... Apologies if I am wrong here.

The hiawatha config:
UrlToolkit {
ToolkitID = gitweb
Match ^/git/(.*) Rewrite /git-http-backend.cgi/$1

VirtualHost {
Hostname =
WebsiteRoot = /var/www/vhosts/git/htdocs
ExecuteCGI = yes
Setenv GIT_PROJECT_ROOT = /var/lib/git/server/repos
UseToolkit = gitweb
RequireSSL = yes
AccessLogfile = /var/www/vhosts/git/logs/access.log
ErrorLogfile = /var/www/vhosts/git/logs/error.log
LoginMessage = Mercurial Repos
PasswordFile = digest:/path/to/htpasswd.digest
EnablePathInfo = yes
TimeForCGI = 300

Please let me know if you can think of a reason to get this code 415 and if there can be a fix for that;
Hugo Leisink
18 March 2013, 15:59
What kind of HTTP request does git make when you get the 415 error? POST or PUT?
19 March 2013, 06:50
Apologies for not responding promptly; Hugo, I will check that and report back as soon as I can (hopefully today). Thanks!
(BTW, my post is somewhat confusing -- the error is reported by the git client not the server! Sorry for that.)
This topic has been closed.