Explorar o código

Bugfix Base64 encoding

Simon Grossenbacher %!s(int64=7) %!d(string=hai) anos
pai
achega
5b4fae6a41
Modificáronse 4 ficheiros con 37 adicións e 30 borrados
  1. BIN=BIN
      RESTDebugger.exe
  2. 5 5
      prj/RESTDebugger.stat
  3. 30 24
      src/_frmMain.dfm
  4. 2 1
      src/_frmMain.pas

BIN=BIN
RESTDebugger.exe


+ 5 - 5
prj/RESTDebugger.stat

@@ -1,10 +1,10 @@
 [Stats]
-EditorSecs=25858
-DesignerSecs=6079
+EditorSecs=26784
+DesignerSecs=6081
 InspectorSecs=3357
-CompileSecs=1167948
-OtherSecs=5662
+CompileSecs=1191675
+OtherSecs=6067
 StartTime=27.10.2016 18:27:37
 RealKeys=0
 EffectiveKeys=0
-DebugSecs=17075
+DebugSecs=17485

+ 30 - 24
src/_frmMain.dfm

@@ -120,28 +120,29 @@ object frmMain: TfrmMain
   end
   object PageControlResponse: TcxPageControl
     Left = 0
-    Top = 454
+    Top = 458
     Width = 725
-    Height = 456
+    Height = 452
     Align = alClient
     TabOrder = 3
     Properties.ActivePage = tabContent
     Properties.CustomButtons.Buttons = <>
-    ExplicitTop = 448
-    ExplicitHeight = 462
-    ClientRectBottom = 454
+    ClientRectBottom = 450
     ClientRectLeft = 2
     ClientRectRight = 723
     ClientRectTop = 26
     object tabContent: TcxTabSheet
       Caption = 'Response Content'
       ImageIndex = 0
-      ExplicitHeight = 434
+      ExplicitLeft = 0
+      ExplicitTop = 0
+      ExplicitWidth = 0
+      ExplicitHeight = 0
       object EditorContent: TSynEdit
         Left = 0
         Top = 0
         Width = 721
-        Height = 428
+        Height = 424
         Align = alClient
         Font.Charset = DEFAULT_CHARSET
         Font.Color = clWindowText
@@ -165,18 +166,20 @@ object frmMain: TfrmMain
         TabWidth = 2
         WantTabs = True
         FontSmoothing = fsmNone
-        ExplicitHeight = 434
       end
     end
     object tabHeaders: TcxTabSheet
       Caption = 'Response Headers'
       ImageIndex = 1
-      ExplicitHeight = 434
+      ExplicitLeft = 0
+      ExplicitTop = 0
+      ExplicitWidth = 0
+      ExplicitHeight = 0
       object EditorResponseHeaders: TSynEdit
         Left = 0
         Top = 0
         Width = 721
-        Height = 428
+        Height = 424
         Align = alClient
         Font.Charset = DEFAULT_CHARSET
         Font.Color = clWindowText
@@ -200,7 +203,6 @@ object frmMain: TfrmMain
         TabWidth = 2
         WantTabs = True
         FontSmoothing = fsmNone
-        ExplicitHeight = 434
       end
     end
   end
@@ -361,7 +363,6 @@ object frmMain: TfrmMain
       TabOrder = 7
       Properties.ActivePage = tabURLParams
       Properties.CustomButtons.Buttons = <>
-      ExplicitHeight = 193
       ClientRectBottom = 189
       ClientRectLeft = 2
       ClientRectRight = 704
@@ -369,8 +370,10 @@ object frmMain: TfrmMain
       object tabURLParams: TcxTabSheet
         Caption = 'URL Parameters'
         ImageIndex = 0
-        ExplicitWidth = 583
-        ExplicitHeight = 165
+        ExplicitLeft = 0
+        ExplicitTop = 0
+        ExplicitWidth = 0
+        ExplicitHeight = 0
         object Panel3: TPanel
           Left = 0
           Top = 0
@@ -379,7 +382,6 @@ object frmMain: TfrmMain
           Align = alTop
           BevelOuter = bvNone
           TabOrder = 0
-          ExplicitWidth = 583
           object Label5: TLabel
             Left = 8
             Top = 8
@@ -419,14 +421,15 @@ object frmMain: TfrmMain
           WantTabs = True
           OnChange = EditorURLParamsChange
           FontSmoothing = fsmNone
-          ExplicitWidth = 583
-          ExplicitHeight = 138
         end
       end
       object cxTabSheet2: TcxTabSheet
         Caption = 'Extra Headers'
         ImageIndex = 1
-        ExplicitHeight = 165
+        ExplicitLeft = 0
+        ExplicitTop = 0
+        ExplicitWidth = 0
+        ExplicitHeight = 0
         object Panel4: TPanel
           Left = 0
           Top = 0
@@ -473,13 +476,15 @@ object frmMain: TfrmMain
           TabWidth = 2
           WantTabs = True
           FontSmoothing = fsmNone
-          ExplicitHeight = 138
         end
       end
       object cxTabSheet3: TcxTabSheet
         Caption = 'Authentication'
         ImageIndex = 3
-        ExplicitHeight = 165
+        ExplicitLeft = 0
+        ExplicitTop = 0
+        ExplicitWidth = 0
+        ExplicitHeight = 0
         object Label9: TLabel
           Left = 15
           Top = 47
@@ -516,7 +521,10 @@ object frmMain: TfrmMain
       object tabPostData: TcxTabSheet
         Caption = 'Post Data'
         ImageIndex = 2
-        ExplicitHeight = 165
+        ExplicitLeft = 0
+        ExplicitTop = 0
+        ExplicitWidth = 0
+        ExplicitHeight = 0
         object Panel5: TPanel
           Left = 0
           Top = 0
@@ -576,7 +584,6 @@ object frmMain: TfrmMain
           TabWidth = 2
           WantTabs = True
           FontSmoothing = fsmNone
-          ExplicitHeight = 113
         end
       end
     end
@@ -613,10 +620,9 @@ object frmMain: TfrmMain
     Left = 0
     Top = 446
     Width = 725
-    Height = 8
+    Height = 12
     AlignSplitter = salBottom
     Control = pnlHeader
-    ExplicitTop = 448
   end
   object OpenDialog: TOpenDialog
     Filter = 'REST Debugger Project (*.rdproj)|*.rdproj'

+ 2 - 1
src/_frmMain.pas

@@ -201,6 +201,7 @@ type
     function GenerateGuid: string;
     function Encode(const AText: string): string;
     function Decode(const AText: string): string;
+
   public
     MainConfig: TJSONConfig;
     ActiveEditor: TSynEdit;
@@ -912,7 +913,7 @@ end;
 
 function TfrmMain.Encode(const AText: string): string;
 begin
-  Result := TNetEncoding.Base64.Encode(AText);
+  Result := StringReplace(TNetEncoding.Base64.Encode(AText), #13#10, '', [rfReplaceAll]);
 end;
 
 procedure TfrmMain.FormClose(Sender: TObject; var Action: TCloseAction);