Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Straub <bs@github.com>2013-09-27 03:48:08 +0400
committerBen Straub <bs@github.com>2013-09-27 03:48:46 +0400
commitb59344bf83049a5639c32ab52efceea2eec9484b (patch)
tree334583e886bffd50c4fda0dc983f2e47f11c3f42 /src/netops.c
parent256961e45d574ace62a7a7d13b697aa05e8a9466 (diff)
Tighten up url-connection utility
Diffstat (limited to 'src/netops.c')
-rw-r--r--src/netops.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/netops.c b/src/netops.c
index aca46245d..3257e7749 100644
--- a/src/netops.c
+++ b/src/netops.c
@@ -584,15 +584,13 @@ int gitno_connection_data_from_url(
int error = -1;
const char *default_port = NULL;
char *original_host = NULL;
- bool original_use_ssl;
/* service_suffix is optional */
assert(data && url);
/* Save these for comparison later */
- if (data->host)
- original_host = git__strdup(data->host);
- original_use_ssl = data->use_ssl;
+ original_host = data->host;
+ data->host = NULL;
gitno_connection_data_free_ptrs(data);
if (!git__prefixcmp(url, prefix_http)) {
@@ -632,10 +630,6 @@ int gitno_connection_data_from_url(
data->path = git__strdup(path);
/* Check for errors in the resulting data */
- if (original_use_ssl && !data->use_ssl) {
- giterr_set(GITERR_NET, "Redirect from HTTPS to HTTP not allowed");
- error = -1;
- }
if (original_host && url[0] != '/' && strcmp(original_host, data->host)) {
giterr_set(GITERR_NET, "Cross host redirect not allowed");
error = -1;