(trunk libT) #3411 "make https behave nicer when using stunnel" -- experimental fix
This commit is contained in:
parent
5e4f950358
commit
649ebcd6c3
|
@ -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 ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue