Skip to content

Commit

Permalink
Bug fix ContainsKey
Browse files Browse the repository at this point in the history
  • Loading branch information
viniciussanchez committed Feb 7, 2022
1 parent 375b8a9 commit f4d2f32
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 9 deletions.
4 changes: 2 additions & 2 deletions samples/delphi/Samples.dproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<ProjectGuid>{409E1FA8-4DDC-4FFD-929F-8CDD72220CB5}</ProjectGuid>
<ProjectVersion>18.7</ProjectVersion>
<ProjectVersion>18.8</ProjectVersion>
<FrameworkType>None</FrameworkType>
<MainSource>Samples.dpr</MainSource>
<Base>True</Base>
Expand Down Expand Up @@ -49,7 +49,7 @@
<DCC_K>false</DCC_K>
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace)</DCC_Namespace>
<SanitizedProjectName>Samples</SanitizedProjectName>
<DCC_UnitSearchPath>..\..\src;$(DCC_UnitSearchPath);modules\.dcp;modules\.dcu;modules;modules\horse\src;modules\jhonson\src</DCC_UnitSearchPath>
<DCC_UnitSearchPath>..\..\src;modules\.dcp;modules\.dcu;modules;modules\horse\src;modules\jhonson\src;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
</PropertyGroup>
<PropertyGroup Condition="'$(Base_Win32)'!=''">
<DCC_UsePackage>DBXSqliteDriver;IndyIPCommon;RESTComponents;bindcompdbx;DBXInterBaseDriver;vcl;IndyIPServer;vclactnband;vclFireDAC;IndySystem;tethering;svnui;dsnapcon;FireDACADSDriver;FireDACMSAccDriver;fmxFireDAC;vclimg;FireDAC;vcltouch;vcldb;bindcompfmx;svn;FireDACSqliteDriver;FireDACPgDriver;inetdb;soaprtl;DbxCommonDriver;fmx;FireDACIBDriver;fmxdae;xmlrtl;soapmidas;fmxobj;vclwinx;rtl;DbxClientDriver;CustomIPTransport;vcldsnap;dbexpress;IndyCore;vclx;bindcomp;appanalytics;dsnap;FireDACCommon;IndyIPClient;bindcompvcl;RESTBackendComponents;VCLRESTComponents;soapserver;dbxcds;VclSmp;adortl;vclie;bindengine;DBXMySQLDriver;CloudService;dsnapxml;FireDACMySQLDriver;dbrtl;IndyProtocols;inetdbxpress;FireDACCommonODBC;FireDACCommonDriver;inet;fmxase;$(DCC_UsePackage)</DCC_UsePackage>
Expand Down
4 changes: 2 additions & 2 deletions samples/delphi/boss-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"github.com/hashload/jhonson": {
"name": "jhonson",
"version": "1.1.2",
"hash": "85d9b3c97b5144448440d7d26bdd16de",
"version": "1.1.3",
"hash": "711f200029b2fc3aef76ab410ac5833a",
"artifacts": {},
"failed": false,
"changed": false
Expand Down
7 changes: 5 additions & 2 deletions samples/lazarus/Console.lpi
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
</Target>
<SearchPaths>
<IncludeFiles Value="$(ProjOutDir)"/>
<OtherUnitFiles Value="..\..\src;modules\horse\src;modules\jhonson\src"/>
<OtherUnitFiles Value="..\..\src;modules\.dcp;modules\.dcu;modules;modules\horse\src;modules\jhonson\src"/>
<UnitOutputDirectory Value="lib\$(TargetCPU)-$(TargetOS)"/>
</SearchPaths>
<Other>
<CustomOptions Value="-dUseCThreads"/>
</Other>
</CompilerOptions>
<Debugging>
<Exceptions Count="3">
<Exceptions Count="4">
<Item1>
<Name Value="EAbort"/>
</Item1>
Expand All @@ -59,6 +59,9 @@
<Item3>
<Name Value="EFOpenError"/>
</Item3>
<Item4>
<Name Value="EResNotFound"/>
</Item4>
</Exceptions>
</Debugging>
</CONFIG>
4 changes: 2 additions & 2 deletions samples/lazarus/boss-lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"github.com/hashload/jhonson": {
"name": "jhonson",
"version": "1.1.2",
"hash": "85d9b3c97b5144448440d7d26bdd16de",
"version": "1.1.3",
"hash": "711f200029b2fc3aef76ab410ac5833a",
"artifacts": {},
"failed": false,
"changed": false
Expand Down
2 changes: 1 addition & 1 deletion src/Horse.Compression.pas
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ procedure Middleware(Req: THorseRequest; Res: THorseResponse; Next: {$IF DEFINED
LContent := Res.Content;
if (not Assigned(LContent)) or (not LContent.InheritsFrom({$IF DEFINED(FPC)}TJsonData{$ELSE}TJSONValue{$ENDIF})) then
Exit;
if not Req.Headers.ContainsKey(ACCEPT_ENCODING) then
if Trim(Req.Headers[ACCEPT_ENCODING]) = EmptyStr then
Exit;
LAcceptEncoding := Req.Headers[ACCEPT_ENCODING].ToLower;
if Pos(THorseCompressionType.DEFLATE.ToString, LAcceptEncoding) > 0 then
Expand Down

0 comments on commit f4d2f32

Please sign in to comment.