No http connection from Mac OS

Dec 23, 2014 at 11:16 AM
Hi all,

I already done test http connect from Windows with version CPPRest 2.3
from Mac OS:
       web::http::client::http_client client(U("http://indesigndemo.niteco.se:80"), config);
        auto ub = uri_builder(U("/api/indesignsynchronize/logintoserver"));
        ub.append_query(U("userName"), U("trung.vu"));
        ub.append_query(U("passWord"), U("abc@12345"));

        http_response rsp = client.request(methods::GET,ub.to_string()).get();
        if(rsp.status_code() == status_codes::OK)
        {
            CAlert::InformationAlert("OK");
        }
        else
        {
            CAlert::InformationAlert("failure");
        }
but no connection to server & no response from server.
I debug found that the running alway waiting returning from the statement "return first->propagate(request)" of function:
plx::task<http_response> propagate(http_request request)
{
    std::shared_ptr<http_pipeline_stage> first;
    {
        pplx::extensibility::scoped_recursive_lock_t l(m_lock);
        first = (m_stages.size() > 0) ? m_stages[0] : m_last_stage;
    }
    return first->propagate(request);
} 
if I pause the debugging then :
 libsystem_kernel.dylib`__psynch_mutexwait:
 0x7fff90524118:  movl   $33554733, %eax
 0x7fff9052411d:  movq   %rcx, %r10
 0x7fff90524120:  syscall 
 0x7fff90524122:  jae    0x7fff90524129            ; __psynch_mutexwait + 17
 0x7fff90524124:  jmpq   0x7fff905254d4            ; cerror_nocancel
 0x7fff90524129:  ret    
 0x7fff9052412a:  nop    
 0x7fff9052412b:  nop    

so anyone can help me on this ?
thanks so much
Dec 23, 2014 at 11:53 PM
Hi coiphim2511,

We just released version 2.4.0 today and it contained some bug fixes in the http_client, could you perhaps try the new version out and see if you are still having issues?

Is this a public server that I could hit with a request myself to try and reproduce/investigate the issue?

Thanks,
Steve
Dec 24, 2014 at 4:43 AM
Edited Dec 24, 2014 at 4:51 AM
thanks stevetgates for support

On windows is ok but on Mac is still problems.

I get new version & tried, error still occurs.

I'm developing Plug-in for Adbobe InDesign CC, using Boost version 1.54 & stdlibc++ . I converted my code to using libc++ same with casablanca.
Maybe boost version is cause.

when pause debugger:
Image

I will try more to sole.
if you have any suggestion pls let me known.

thanks so much!
Dec 30, 2014 at 8:37 PM
Hi coiphim2511,

I can't really tell much from the callstack, most of it is in Boost.Asio. Is there a small repro case you can share that hits a server I can access? If you don't want to share publically feel free to email me at stgates at Microsoft dot com.

Thanks,
Steve
Dec 31, 2014 at 3:50 AM
hi stevetgates

thanks for support.

I already done this.
it is wrong converting URL string,
I'm using type PMString(it is UTF16 type of Adobe), now I converted to std::string under UTF8 and now work fine.

thanks so much!