From: "Shawn O. Pearce" <spearce@spearce.org>
To: Robin Rosenberg <robin.rosenberg@dewire.com>
Cc: git@vger.kernel.org
Subject: [JGIT PATCH] Send non-standard port in host header of git://
Date: Wed, 3 Jun 2009 10:15:30 -0700 [thread overview]
Message-ID: <1244049330-4019-1-git-send-email-spearce@spearce.org> (raw)
On a git://host:port/path style URL, if port is not the IANA
registered port 9418 for git, the remote git daemon expects
us to send "\0host=host:port\0" in the virtual host slot.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
---
.../spearce/jgit/transport/TransportGitAnon.java | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/org.spearce.jgit/src/org/spearce/jgit/transport/TransportGitAnon.java b/org.spearce.jgit/src/org/spearce/jgit/transport/TransportGitAnon.java
index add7e2a..9edd93e 100644
--- a/org.spearce.jgit/src/org/spearce/jgit/transport/TransportGitAnon.java
+++ b/org.spearce.jgit/src/org/spearce/jgit/transport/TransportGitAnon.java
@@ -103,6 +103,10 @@ void service(final String name, final PacketLineOut pckOut)
cmd.append('\0');
cmd.append("host=");
cmd.append(uri.getHost());
+ if (uri.getPort() != GIT_PORT) {
+ cmd.append(":");
+ cmd.append(uri.getPort());
+ }
cmd.append('\0');
pckOut.writeString(cmd.toString());
pckOut.flush();
--
1.6.3.1.333.g3ebba7
next reply other threads:[~2009-06-03 17:15 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-03 17:15 Shawn O. Pearce [this message]
2009-06-03 17:19 ` [JGIT PATCH v2] Send non-standard port in host header of git:// Shawn O. Pearce
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1244049330-4019-1-git-send-email-spearce@spearce.org \
--to=spearce@spearce.org \
--cc=git@vger.kernel.org \
--cc=robin.rosenberg@dewire.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).