@@ -1620,7 +1620,7 @@ module internal HttpHelpers =
16201620
16211621 let runningOnMono =
16221622 try
1623- System.Type.GetType( " Mono.Runtime" ) <> null
1623+ not ( isNull ( System.Type.GetType " Mono.Runtime" ))
16241624 with e ->
16251625 false
16261626
@@ -1637,7 +1637,7 @@ module internal HttpHelpers =
16371637 let remoteStackTraceString =
16381638 typeof< exn>. GetField ( " _remoteStackTraceString" , BindingFlags.Instance ||| BindingFlags.NonPublic)
16391639
1640- if remoteStackTraceString <> null then
1640+ if not ( isNull remoteStackTraceString ) then
16411641 remoteStackTraceString.SetValue( e, e.StackTrace + Environment.NewLine)
16421642 with _ ->
16431643 ()
@@ -1651,7 +1651,7 @@ module internal HttpHelpers =
16511651 with
16521652 // If an exception happens, augment the message with the response
16531653 | : ? WebException as exn ->
1654- if exn.Response = null then reraisePreserveStackTrace exn
1654+ if isNull exn.Response then reraisePreserveStackTrace exn
16551655
16561656 let responseExn =
16571657 try
@@ -1749,12 +1749,12 @@ module internal HttpHelpers =
17491749 | " pragma" -> req.Headers.[ HeaderEnum.Pragma] <- value
17501750 | " range" ->
17511751 if not ( value.StartsWith( " bytes=" )) then
1752- failwith " Invalid value for the Range header"
1752+ failwithf " Invalid value for the Range header ( %O ) " value
17531753
17541754 let bytes = value.Substring( " bytes=" .Length) .Split( '-' )
17551755
17561756 if bytes.Length <> 2 then
1757- failwith " Invalid value for the Range header"
1757+ failwithf " Invalid value for the Range header ( %O ) " bytes
17581758
17591759 req.AddRange( int64 bytes.[ 0 ], int64 bytes.[ 1 ])
17601760 | " proxy-authorization" -> req.Headers.[ HeaderEnum.ProxyAuthorization] <- value
@@ -1803,7 +1803,7 @@ module internal HttpHelpers =
18031803 try
18041804 return ! getResponseAsync req
18051805 with : ? WebException as exc ->
1806- if exc.Response <> null then
1806+ if not ( isNull exc.Response) then
18071807 return exc.Response
18081808 else
18091809 reraisePreserveStackTrace exc
@@ -2164,7 +2164,7 @@ type Http private () =
21642164 ( defaultArg silentCookieErrors false )
21652165
21662166 let contentType =
2167- if resp.ContentType = null then
2167+ if isNull resp.ContentType then
21682168 " application/octet-stream"
21692169 else
21702170 resp.ContentType
@@ -2174,7 +2174,7 @@ type Http private () =
21742174 | :? HttpWebResponse as resp -> int resp.StatusCode, resp.CharacterSet
21752175 | _ -> 0 , " "
21762176
2177- let characterSet = if characterSet = null then " " else characterSet
2177+ let characterSet = if isNull characterSet then " " else characterSet
21782178
21792179 let stream = resp.GetResponseStream()
21802180
0 commit comments