I have some problem with remote camera capture using palantir. I debug it further and notice there is some potential issue with the zm_remote_capture.cpp. The code which send the HTTP request use \n only as the line break. However, HTTP spec require CRLF i.e. \r\n as the line break. I have changed all \n to \r\n in that section of code. Now it works ok with palantir.
Code: Select all
snprintf( request, sizeof(request), "GET %s HTTP/%s\r\n", path, config.http_version );
snprintf( &(request[strlen(request)]), sizeof(request)-strlen(request), "User-Agent: %s/%s\r\n", config.http_ua, ZM_VERSION );
snprintf( &(request[strlen(request)]), sizeof(request)-strlen(request), "Host: %s\r\n", host );
snprintf( &(request[strlen(request)]), sizeof(request)-strlen(request), "Connection: Keep-Alive\r\n" );
if ( auth )
{
snprintf( &(request[strlen(request)]), sizeof(request)-strlen(request), "Authorization: Basic %s\r\n", auth64 );
}
snprintf( &(request[strlen(request)]), sizeof(request)-strlen(request), "\r\n" );