HomePhabricator

Updates for Mercurial's HTTP protocol

Description

Updates for Mercurial's HTTP protocol

Summary:
While testing https://secure.phabricator.com/D21864 I ran into some issues getting mercurial HTTP access working. Using wireshark I confirmed that my local mercurial 6.4 was not including command arguments as HTTP headers but in the querystring.

I didn't dig too deep into understanding when/why this started happening. The protocol documents this in wireprotocol.txt.

Command arguments can be sent multiple ways. The simplest is part of the URL query string using `x-www-form-urlencoded encoding (see Python's urllib.urlencode()`. However, many servers impose length limitations on the URL. So this mechanism is typically only used if the server doesn't support other mechanisms.

Based on that either the mercurial on the server is really old (it's 6.1.1 tho) or maybe some other parsing/info passing in Phab's handling of the wire protocol is causing the client to downgrade the wire protocol support.

Test Plan: Host mercurial repo using HTTP, test push/pull.

Reviewers: Blessed Reviewers, epriestley

Reviewed By: Blessed Reviewers, epriestley

Subscribers: Korvin, epriestley

Differential Revision: https://secure.phabricator.com/D21867

Details

Provenance
cspeckmimAuthored on May 26 2023, 5:14 PM
cspeckmimPushed on May 29 2023, 3:12 AM
Reviewer
Blessed Reviewers
Differential Revision
D21867: Updates for Mercurial's HTTP protocol
Parents
rPec9ebe532e52: Addressing some PHP 8 incompatibilities - Remarkup
Branches
Unknown
Tags
Unknown