Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: http_request error : Incorrect DNS query behavior (Read 1632 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

http_request error : Incorrect DNS query behavior

I modified the code in foo_sample. Added play_callback_impl_base & abort_callback to CMyElemWindow & try to get something with http_client when playback starts.

Code: [Select]
class CMyElemWindow : 
public ui_element_instance,
public CWindowImpl<CMyElemWindow>, 
private play_callback_impl_base,
private abort_callback
{
// ...
static_api_ptr_t<http_client> m_http_client;
// ...
};

Code: [Select]
void CMyElemWindow::on_playback_starting(play_control::t_track_command p_command,bool p_paused) {
try {
auto request = m_http_client->create_request("GET");
auto result = request->run("http://localhost/",*this);

// .. do something

} catch (pfc::exception&e) {
hehe = e.what();
}
update();
}

Calling request->run throws an exception with error message "Incorrect DNS query behavior".
This error remains when replace "localhost" with "127.0.0.1".

My question is :
Why it occurs and how to solve this problem ?