Skip to content
Snippets Groups Projects
Commit 9b53f469 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Fail to parse https:// URIs when cryptlib is disabled

No point in going any further and confusing users.
parent a1f8776e
No related branches found
No related tags found
No related merge requests found
Pipeline #8225 passed
......@@ -743,15 +743,21 @@ parse_uri(struct http_session *sess)
goto error_return;
}
if (sess->req->uri[4] == 's') {
#ifndef WITHOUT_CRYPTLIB
p = &sess->req->uri[5];
sess->is_tls = true;
sess->hacky_list_entry.port = 443;
#endif
}
else {
p = &sess->req->uri[4];
}
if (memcmp(p, "://", 3)) {
#ifdef WITHOUT_CRYPTLIB
set_msg_locked(sess->req, "URI is not http://");
#else
set_msg_locked(sess->req, "URI is not http[s]://");
#endif
assert_pthread_mutex_unlock(&sess->req->mtx);
goto error_return;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment