Copyright © https://mongoose-os.com

Mongoose OS Forum

frame
ATTENTION! This forum has moved to:

https://community.mongoose-os.com

Do not post any new messages.

segfault when calling mg_set_protocol_http_websocket on mg_connection with https URL.

I have the following method:

int mongooseHTTPUpload(const char* url,const char* extra_headers,const char* post_data){
    httpClientNc = mg_connect_http(&mgr, ev_handler, url, extra_headers, post_data);
    mg_set_protocol_http_websocket(httpClientNc);
}

then I call it with:
mongooseHTTPUpload("https://intelliview.silentpartnertech.com/HardwareIO/avlUpload.json",NULL,"jsonData=BLARF");

If I use http instead, I don't get the segfault. How do I establish a connection to a server using an HTTPS url?

Comments

  • Ok. Figured it out. Had to compile with MG_ENABLE_SSL. I thought SSL was enabled by default.
Sign In or Register to comment.