Skip to content

Commit

Permalink
add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
ajax16384 committed Mar 10, 2024
1 parent a8c6d63 commit ab3218f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/web_peer_connection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,8 @@ void web_peer_connection::handle_redirect(int const bytes_left)
file_index_t const file_index = m_file_requests.front().file_index;

location = aux::resolve_redirect_location(m_url, location);

// work-around for buggy HTTP servers, that fail to encode the redirect URL
location = maybe_url_encode(location);
#ifndef TORRENT_DISABLE_LOGGING
peer_log(peer_log_alert::info, "LOCATION", "%s", location.c_str());
Expand Down Expand Up @@ -736,6 +738,8 @@ void web_peer_connection::handle_redirect(int const bytes_left)
else
{
location = aux::resolve_redirect_location(m_url, location);

// work-around for buggy HTTP servers, that fail to encode the redirect URL
location = maybe_url_encode(location);
#ifndef TORRENT_DISABLE_LOGGING
peer_log(peer_log_alert::info, "LOCATION", "%s", location.c_str());
Expand Down

0 comments on commit ab3218f

Please sign in to comment.