1
0
Fork 0
mirror of https://github.com/transmission/transmission synced 2025-02-08 15:34:44 +00:00

#4524 Redirects with https are broken

This commit is contained in:
Mitchell Livingston 2011-09-27 22:34:52 +00:00
parent 71c06d2953
commit eb46c13d74

View file

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