Skip to content

Commit b3e18fe

Browse files
authored
Merge pull request #757 from evoskuil/master
Update magic error logging and message text.
2 parents d0eb2ad + d40910b commit b3e18fe

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/channels/channel_peer.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ void channel_peer::read_heading() NOEXCEPT
169169
void channel_peer::handle_read_heading(const code& ec, size_t) NOEXCEPT
170170
{
171171
static constexpr uint32_t http_magic = 0x20544547;
172-
static constexpr uint32_t https_magic = 0x02010316;
173172

174173
BC_ASSERT(stranded());
175174

@@ -204,15 +203,16 @@ void channel_peer::handle_read_heading(const code& ec, size_t) NOEXCEPT
204203

205204
if (head->magic != settings().identifier)
206205
{
207-
if (head->magic == http_magic || head->magic == https_magic)
206+
if (head->magic == http_magic)
208207
{
209-
LOGR("Http/s request from [" << endpoint() << "]");
208+
LOGR("Http request from [" << endpoint() << "]");
210209
}
211210
else
212211
{
213212
LOGR("Invalid heading magic (0x"
214213
<< encode_base16(to_little_endian(head->magic))
215-
<< ") from [" << endpoint() << "]");
214+
<< ") from [" << endpoint()
215+
<< "] possibly encrypted connection to clear endpoint.");
216216
}
217217

218218
stop(error::invalid_magic);

0 commit comments

Comments
 (0)