From 649ebcd6c354dd619bddfaa5dca5d30e21487623 Mon Sep 17 00:00:00 2001 From: Charles Kerr Date: Fri, 9 Jul 2010 14:11:58 +0000 Subject: [PATCH] (trunk libT) #3411 "make https behave nicer when using stunnel" -- experimental fix --- libtransmission/rpc-server.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libtransmission/rpc-server.c b/libtransmission/rpc-server.c index 8edad4f8b..02acc3a89 100644 --- a/libtransmission/rpc-server.c +++ b/libtransmission/rpc-server.c @@ -608,13 +608,8 @@ handle_request( struct evhttp_request * req, void * arg ) || !strcmp( req->uri, "/transmission/clutch" ) || !strcmp( req->uri, "/" ) ) { - const char * protocol = "http"; - const char * host = evhttp_find_header( req->input_headers, "Host" ); - const char * uri = "transmission/web/"; - char * location = tr_strdup_printf( "%s://%s/%s", protocol, host, uri ); - evhttp_add_header( req->output_headers, "Location", location ); + evhttp_add_header( req->output_headers, "Location", "/transmission/web/" ); send_simple_response( req, HTTP_MOVEPERM, NULL ); - tr_free( location ); } else if( !strncmp( req->uri, "/transmission/web/", 18 ) ) {