<div dir="ltr">I've been looking at Kallithea as something better than plain hgweb. I set up an instance and imported a copy of my repository and tried to clone it. The Mercurial client hung in the process. From the Nginx logs I fished out a 400 code that Kallithea passed in response to the batch request from the client.<div><br></div><div>Regarding limits, I already removed or raised all the limits in my Nginx reverse proxy years ago when I first encountered header size issues, but the repository grew and grew until hgweb itself started falling over. People over at the Mercurial IRC channel suggested httppostargs=true, and that saved me. What httppostargs seems to do is make all requests POST requests.<div><div><br></div><div>Are you suggesting that I should be able to just add</div><div>baseui.setconfig(b'experimental', b'httppostargs', True)</div><div>in make_ui in utils.py and get httppostargs working at the expense of breaking read permissions? Looking at simplehg.py, it looks like it would need to be changed to detect the X-HgArgs-Post header (see wireprotocol.txt) and read args from the right place, otherwise parsed_request.action = None, which leads to</div></div></div><div>raise webob.exc.HTTPBadRequest('Unable to detect pull/push action for %r! Are you using a nonstandard command or client?' % parsed_request.repo_name)<br></div><div><br></div><div><a href="https://www.mercurial-scm.org/repo/hg/file/tip/mercurial/helptext/internals/wireprotocol.txt">https://www.mercurial-scm.org/repo/hg/file/tip/mercurial/helptext/internals/wireprotocol.txt</a><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Oct 11, 2021 at 3:40 PM Mads Kiilerich <<a href="mailto:mads@kiilerich.com" target="_blank">mads@kiilerich.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div>
<div>Hi</div>
<div><br>
</div>
<div>In what way do you experience that it
doesn't work with Kallithea?</div>
<div><br>
</div>
<div>Kallithea implements a custom wrapper
around hgweb. Mainly to provide integrated hosting with correct
access control. It is a basic assumption that reads are with GET
and writes are with POST. <br>
</div>
<div><br>
</div>
<div>Without being told more about how
httppostargs works / fails (and without spending time
investigating) I would assume that it works fine for users with
write access to repositories.<br>
</div>
<div><br>
</div>
<div>A more fine grained separation would
require some refactorings ... and a risk of getting it wrong and
introducing security issues.</div>
<div><br>
</div>
<div>If I remember correctly, the Mercurial
client also has a max limit of how large headers it will send. But
mainly: For most web servers it is possible to adjust the header
limit to work with most repositories. That is apparently also
possible with IIS, even if that is one of your constraints. Does
that not work for you? Else, I would suggest using another web
server, preferably on unix.</div>
<div><br>
</div>
<div>/Mads</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div>On 10/11/21 15:16, Ansis Māliņš wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Hello. I would really like to use Kallithea, but
there's a deal breaker: Kallithea does not support
httppostargs=true, an almost undocumented setting that switches
Mercurial to sending heads and largefile hashes as POST requests
instead of in headers. I've looked at the source code, and it
seems Kallithea implements it's own version of hgweb. How hard
would it be to add support for httppostargs? I'm willing to put
in the work if I receive some guidance. The extent of my Python
experience is writing Mercurial hooks and simple Discord bots.
<div><br>
</div>
<div>httppostargs:</div>
<div><a href="https://www.mercurial-scm.org/wiki/HgWebInIisOnWindows#I.27m_getting_an_HTTP_400:_Bad_request_error._What.27s_going_on.3F" target="_blank">https://www.mercurial-scm.org/wiki/HgWebInIisOnWindows#I.27m_getting_an_HTTP_400:_Bad_request_error._What.27s_going_on.3F</a><br>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
kallithea-general mailing list
<a href="mailto:kallithea-general@sfconservancy.org" target="_blank">kallithea-general@sfconservancy.org</a>
<a href="https://lists.sfconservancy.org/mailman/listinfo/kallithea-general" target="_blank">https://lists.sfconservancy.org/mailman/listinfo/kallithea-general</a>
</pre>
</blockquote>
<p><br>
</p>
</div>
</blockquote></div>