Skip to content

Commit

Permalink
setting CURLOPT_CAINFO does not assert if value if empty anyways
Browse files Browse the repository at this point in the history
  • Loading branch information
jakubmisek committed Aug 5, 2024
1 parent 9d5431a commit 69acc20
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/Peachpie.Library.Network/CURLConstants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -731,6 +731,15 @@ internal static bool TrySetOption(this CURLResource ch, long option, PhpValue va
// always enabled
break;

case CURLOPT_CAINFO:
if (value.IsFalse || value.IsNull) // ignored
{
break;
}

// not supported
goto default;

case CURLINFO_HEADER_OUT: ch.StoreRequestHeaders = value.ToBoolean(); break;
case CURLOPT_VERBOSE: ch.Verbose = value.ToBoolean(); break;
case CURLOPT_STDERR: return (ch.VerboseOutput = TryProcessMethodFromStream(value)) != null || value.IsNull;
Expand Down

0 comments on commit 69acc20

Please sign in to comment.