From eb46c13d7411a242e8beab7b2a0d3bcc0566faef Mon Sep 17 00:00:00 2001 From: Mitchell Livingston Date: Tue, 27 Sep 2011 22:34:52 +0000 Subject: [PATCH] #4524 Redirects with https are broken --- libtransmission/rpc-server.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libtransmission/rpc-server.c b/libtransmission/rpc-server.c index 669a2fbff..c8946107b 100644 --- a/libtransmission/rpc-server.c +++ b/libtransmission/rpc-server.c @@ -628,9 +628,7 @@ handle_request( struct evhttp_request * req, void * arg ) } else if( strncmp( req->uri, server->url, strlen( server->url ) ) ) { - const char * protocol = "http"; - const char * host = evhttp_find_header( req->input_headers, "Host" ); - char * location = tr_strdup_printf( "%s://%s%sweb/", protocol, host, server->url ); + char * location = tr_strdup_printf( "%sweb/", server->url ); evhttp_add_header( req->output_headers, "Location", location ); send_simple_response( req, HTTP_MOVEPERM, NULL ); tr_free( location );