Icon View Incident Report

Serious Serious
Reported By: Uli Becker
Reported On: 2/10/2014
For: Version 1.03 Build 3
# 3987 POST Requests Not Being Routed to Modules Properly in EWB Web Server

I have been trying to send a post-request to a module in EWB server for a whole day - without success. Thus I need your support.

The module is named "sendmail" and it's registered.

This get-request however works:
http://localhost/labor/modules/sendmail

while the post-request results in a 404 error. The log file is not written.

EWB client code:

procedure TLoginForm.Button1Click(Sender: TObject);
begin
  with PostRequest do
  begin
    Params.clear;
    URL := 'modules/sendmail';
    RequestContent.text := 'Lorem ipsum dolor sit amet...';
    RequestHeaders.Values['Content-Type'] := 'plain/text';
    RequestHeaders.Values['Content-Length']:=IntToStr(Length(RequestContent.Text));
    Params.add('method=mail');
    Execute;
  end;
end;

procedure TLoginForm.PostRequestComplete(Request: TServerRequest);
begin
  showmessage(IntToStr(Request.StatusCode));
end; 

EWB module code:

procedure TSendMailModule.EWBModuleExecute(Request: TEWBServerRequest);
var
  TempStrings: TStrings;
  slLog: TStringList;
begin

  slLog := TStringList.Create;
  try
    slLog.Add('Request received');
    slLog.SaveToFile('c:\test.log');
  finally
    slLog.Free;
  end;
  Request.SendError(200, '');
end;



Resolution Resolution
Fixed Problem on 2/11/2014 in version 1.03 build 4


Products Affected Products Affected
Elevate Web Builder Modules
Elevate Web Builder
Elevate Web Builder Trial

Image