static bool auth_request_proxy_is_self(struct auth_request *request)
{
- const char *const *tmp, *port = NULL;
+ const char *port = NULL;
if (!request->proxy_host_is_self)
return FALSE;
/* check if the port is the same */
- tmp = auth_stream_split(request->extra_fields);
- for (; *tmp != NULL; tmp++) {
- if (strncmp(*tmp, "port=", 5) == 0)
- port = *tmp + 5;
- }
-
+ port = auth_stream_reply_find(request->extra_fields, "port");
if (port != NULL && !str_uint_equals(port, request->local_port))
return FALSE;
/* don't check destuser. in some systems destuser is intentionally
return reply == NULL || str_len(reply->str) == 0;
}
-const char *const *auth_stream_split(struct auth_stream_reply *reply)
-{
- return t_strsplit_tab(str_c(reply->str));
-}
-
string_t *auth_stream_reply_get_str(struct auth_stream_reply *reply)
{
return reply->str;
const char *auth_stream_reply_export(struct auth_stream_reply *reply);
bool auth_stream_is_empty(struct auth_stream_reply *reply);
-const char *const *auth_stream_split(struct auth_stream_reply *reply);
string_t *auth_stream_reply_get_str(struct auth_stream_reply *reply);
#endif