Skip to content

Commit

Permalink
Fix some HTTP requests. Fix Issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
grandsilence committed Aug 4, 2018
1 parent d07d468 commit f00abc7
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion Leaf.xNet/~Http/HttpRequest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,17 @@ private void CreateConnection(Uri address)

#region Формирование данных запроса

private string GenerateStartingLine(HttpMethod method) => $"{method} {Address.PathAndQuery} HTTP/{ProtocolVersion}\r\n";
private string GenerateStartingLine(HttpMethod method)
{
string query = _currentProxy != null && _currentProxy.Type == ProxyType.HTTP
? Address.AbsoluteUri
: Address.PathAndQuery;

return $"{method} {query} HTTP/{ProtocolVersion}\r\n";
}


//private string GenerateStartingLine(HttpMethod method) => $"{method} {Address.PathAndQuery} HTTP/{ProtocolVersion}\r\n";

// Есть 3 типа заголовков, которые могут перекрываться другими. Вот порядок их установки:
// - заголовки, которы задаются через специальные свойства, либо автоматически
Expand Down

0 comments on commit f00abc7

Please sign in to comment.