From c0e929f1362a1f23acb058a31bc06b2c95b0191c Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 11 Jan 2017 09:11:27 -0500 Subject: [PATCH] change regexp to handle quotes in the content-type line. This is needed for edimax cameras --- src/zm_remote_camera_http.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/zm_remote_camera_http.cpp b/src/zm_remote_camera_http.cpp index b354dc521..91476cd41 100644 --- a/src/zm_remote_camera_http.cpp +++ b/src/zm_remote_camera_http.cpp @@ -345,7 +345,7 @@ int RemoteCameraHttp::GetResponse() } if ( !content_type_expr ) - content_type_expr = new RegExpr( "Content-type: ?(.+?)(?:; ?boundary=(.+?))?\r?\n", PCRE_CASELESS ); + content_type_expr = new RegExpr( "Content-type: ?(.+?)(?:; ?boundary=\x22?(.+?)\x22?)?\r?\n", PCRE_CASELESS ); if ( content_type_expr->Match( header, header_len ) >= 2 ) { content_type = content_type_expr->MatchString( 1 );