(trunk libT) #3411 "make https behave nicer when using stunnel" -- experimental fix

This commit is contained in:
Charles Kerr 2010-07-09 14:11:58 +00:00
parent 5e4f950358
commit 649ebcd6c3
1 changed files with 1 additions and 6 deletions

View File

@ -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 ) )
{