Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2014-02

[Brook] HTTP method not allowed for the requested resource

17 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

silvioprog
to Giuseppe

2014-02-25 18:22 GMT-03:00 Giuseppe :

Show quoted text 11 lines
Hi all, I'm trying demos on Brook 3 (from github), and simple demos works fine, but with DB demos I get the error: Error 405 HTTP method not allowed for the requested resource. Some idea? Regards.

Oh, is you Giu of Lazarus forum? Sorry, I could only see it now hehe...

Please delete all old files, like .ppu etc. These examples are working fine, I tested it on Windows and Linux.

If problem persists, please say step by step how you are doing the test as well as your environment.

Silvio Cl?cio My public projects - github.com/silvioprog -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/1eb79fd5/attachment.html>

Reply by email

Giuseppe
to silvioprog

El 26/02/2014 4:57, silvioprog escribi?:

Show quoted text 23 lines
2014-02-25 18:22 GMT-03:00 Giuseppe < <mailto:>>: Hi all, I'm trying demos on Brook 3 (from github), and simple demos works fine, but with DB demos I get the error: Error 405 HTTP method not allowed for the requested resource. Some idea? Regards. Oh, is you Giu of Lazarus forum? Sorry, I could only see it now hehe... Please delete all old files, like .ppu etc. These examples are working fine, I tested it on Windows and Linux. If problem persists, please say step by step how you are doing the test as well as your environment.

Yes, I am.
Lazarus 1.2RC2, FPC 2.6.2 rev.43696, 32 bits.
brookframework downloaded from github.
Opened brookex and brookrt lpk and compiled.
dopf downloaded from github, opened and compiled.

Open brookframework\demos\simple\helloworld\cgi project Build.
Copy to cgi-bin folder
http://localhost:8080/cgi-bin/cgi1.bf returns Hello World!

Open brookframework\demos\simple\static project
Build.
Execute test.exe
http://localhost:8000/index returns static page opening a dialog as expected.

Open \brookframework\demos\simple\entity project
Build.
Copy to cg1.bf to cgi-bin folder
http://localhost:8080/cgi-bin/cgi1.bf returns "HTTP method not allowed for the requested resource."

Created postgres database with table person.
Open brookframework/demos/db/dopf/cgi1.lpi
Changed db configuration from dbutils.pas pointing to my database Copied all postgres dll from postgres/bin folder to project folder. Changed on Brokers.pas BrookFCLCGIBroker -> BrookFCLHttpAppBroker http://localhost returns "HTTP method not allowed for the requested resource."

Shell:
D:\DevAux\LazComp\brookframework\demos\db\dopf>cgi1.exe exception at 0043A79E:
Missing HTTP protocol version in request.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/b4c55705/attachment.html>

Reply by email

Michael Van Canneyt
to Giuseppe
Giuseppe wrote 25 lines
El 26/02/2014 4:57, silvioprog escribi?: 2014-02-25 18:22 GMT-03:00 Giuseppe : Hi all, I'm trying demos on Brook 3 (from github), and simple demos works fine, but with DB demos I get the error: Error 405 HTTP method not allowed for the requested resource. Some idea? Regards. Oh, is you Giu of Lazarus forum? Sorry,?I could only see it now hehe... Please delete all old files, like .ppu etc.?These examples are working fine, I tested it on Windows and Linux. If problem persists, please say step by step how you are doing the test as well as your environment. Yes, I am. Lazarus 1.2RC2, FPC 2.6.2 rev.43696, 32 bits.
It is a known bug in FPC 2.6.2;
you must use FPC 2.6.4 (building has started for this version) or FPC trunk.

Michael.

Reply by email

Giuseppe
to Michael Van Canneyt

El 26/02/2014 10:44, Michael Van Canneyt escribi?:

Show quoted text 37 lines
On Wed, 26 Feb 2014, Giuseppe wrote: > El 26/02/2014 4:57, silvioprog escribi?: > 2014-02-25 18:22 GMT-03:00 Giuseppe : > Hi all, > > I'm trying demos on Brook 3 (from github), and simple > demos works fine, but > with DB demos I get the error: > Error 405 > HTTP method not allowed for the requested resource. > > Some idea? > > Regards. > > > Oh, is you Giu of Lazarus forum? Sorry, I could only see it now hehe... > > Please delete all old files, like .ppu etc. These examples are > working fine, I tested it on > Windows and Linux. > > If problem persists, please say step by step how you are doing the > test as well as your > environment. > > > Yes, I am. > Lazarus 1.2RC2, FPC 2.6.2 rev.43696, 32 bits. It is a known bug in FPC 2.6.2; you must use FPC 2.6.4 (building has started for this version) or FPC trunk. Michael.

Hi Michael,

I downloaded 2.7.x source (I didn't found 2.6.4 builds), builded and pointed my Laz to this FPC (I think I did it ok).
Lazarus then rebuilded again project and dependants (brook, ...) but getting same error.

Now I tried to build 2.6.4, but getting an error :(

Reply by email

silvioprog
to Giuseppe: El 26/02/2014 4:57, silvioprog escribi?: Yes, I am. Lazarus 1.2RC2, FPC 2.6.2 rev.43696,…

2014-02-26 6:31 GMT-03:00 Giuseppe :

Show quoted text 60 lines
El 26/02/2014 4:57, silvioprog escribi?: 2014-02-25 18:22 GMT-03:00 Giuseppe : > Hi all, > > I'm trying demos on Brook 3 (from github), and simple demos works fine, > but with DB demos I get the error: > Error 405 > HTTP method not allowed for the requested resource. > > Some idea? > > Regards. > Oh, is you Giu of Lazarus forum? Sorry, I could only see it now hehe... Please delete all old files, like .ppu etc. These examples are working fine, I tested it on Windows and Linux. If problem persists, please say step by step how you are doing the test as well as your environment. Yes, I am. Lazarus 1.2RC2, FPC 2.6.2 rev.43696, 32 bits. brookframework downloaded from github. Opened brookex and brookrt lpk and compiled. dopf downloaded from github, opened and compiled. Open brookframework\demos\simple\helloworld\cgi project Build. Copy to cgi-bin folder http://localhost:8080/cgi-bin/cgi1.bf returns Hello World! Open brookframework\demos\simple\static project Build. Execute test.exe http://localhost:8000/index returns static page opening a dialog as expected. Open \brookframework\demos\simple\entity project Build. Copy to cg1.bf to cgi-bin folder http://localhost:8080/cgi-bin/cgi1.bf returns "HTTP method not allowed for the requested resource." Created postgres database with table person. Open brookframework/demos/db/dopf/cgi1.lpi Changed db configuration from dbutils.pas pointing to my database Copied all postgres dll from postgres/bin folder to project folder. Changed on Brokers.pas BrookFCLCGIBroker -> BrookFCLHttpAppBroker http://localhost returns "HTTP method not allowed for the requested resource." Shell: D:\DevAux\LazComp\brookframework\demos\db\dopf>cgi1.exe exception at 0043A79E: Missing HTTP protocol version in request.

Exactly how Canneyt said: It is a known bug in FPC 2.6.2.

RESTful uses all HTTP methods (GET/POST/PUT/DELETE), and old FCL-web does not supports it, but it is fixed in new FCL-web.

Try it now in a new environment, I'll show my environment to you:

0. use a stable release of Lazarus/FPC: Lazarus 1.0.14 r43446 FPC 2.6.2 i386-win32-win32/win64 (http://sourceforge.net/projects/lazarus);
1. install Apache server in your system (
http://archive.apache.org/dist/httpd/binaries/win32/httpd-2.2.22-win32-x86-openssl-0.9.8t.msi), choosing the "c:\websrv" folder instead of default Apache folder in "Program Files", after install, you will have the "c:\websrv\cgi-bin" folder;
2. undo all changes in your Brook demos (in SmartGIT, I select all files and use "Revert" button), and keep using BrookFCLCGIBroker instead of BrookFCLHTTPAppBroker broker that you changed;
3. install the best browser in your system: Google Chrome;
4. install a complete REST client plugin in your Chrome: https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo ;
5. with your database and "person" table already created, open the project "C:\repository\git\brookframework\demos\db\rest\cgi1.lpi" and, in your project options (Ctrl+Shift+F11), set "c:\websrv\cgi-bin\cgi1.bf" in "Compiler Options > Paths > Target file name", and uncheck the "Apply conventions" option;
6. compile your project (Ctrl+F9);
7. configure your REST plugin to: http://imagebin.org/295955;
8. enjoy;

Silvio Cl?cio My public projects - github.com/silvioprog -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/fc216798/attachment.html>

Reply by email

Giuseppe
to silvioprog

Thanks Silvio,

I Will try but, why you don't get error using FPC 2.6.2? Don't understand :/

Enviado desde mi iPad

/Giuseppe

Show quoted text 79 lines
El 26/02/2014, a las 15:04, silvioprog escribi?: 2014-02-26 6:31 GMT-03:00 Giuseppe : > El 26/02/2014 4:57, silvioprog escribi?: >> 2014-02-25 18:22 GMT-03:00 Giuseppe : >>> Hi all, >>> >>> I'm trying demos on Brook 3 (from github), and simple demos works fine, but with DB demos I get the error: >>> Error 405 >>> HTTP method not allowed for the requested resource. >>> >>> Some idea? >>> >>> Regards. >> >> >> Oh, is you Giu of Lazarus forum? Sorry, I could only see it now hehe... >> >> Please delete all old files, like .ppu etc. These examples are working fine, I tested it on Windows and Linux. >> >> If problem persists, please say step by step how you are doing the test as well as your environment. > Yes, I am. > Lazarus 1.2RC2, FPC 2.6.2 rev.43696, 32 bits. > brookframework downloaded from github. > Opened brookex and brookrt lpk and compiled. > dopf downloaded from github, opened and compiled. > > Open brookframework\demos\simple\helloworld\cgi project > Build. > Copy to cgi-bin folder > http://localhost:8080/cgi-bin/cgi1.bf returns Hello World! > > Open brookframework\demos\simple\static project > Build. > Execute test.exe > http://localhost:8000/index returns static page opening a dialog as expected. > > Open \brookframework\demos\simple\entity project > Build. > Copy to cg1.bf to cgi-bin folder > http://localhost:8080/cgi-bin/cgi1.bf returns "HTTP method not allowed for the requested resource." > > Created postgres database with table person. > Open brookframework/demos/db/dopf/cgi1.lpi > Changed db configuration from dbutils.pas pointing to my database > Copied all postgres dll from postgres/bin folder to project folder. > Changed on Brokers.pas BrookFCLCGIBroker -> BrookFCLHttpAppBroker > http://localhost returns "HTTP method not allowed for the requested resource." > > Shell: > D:\DevAux\LazComp\brookframework\demos\db\dopf>cgi1.exe > exception at 0043A79E: > Missing HTTP protocol version in request. Exactly how Canneyt said: It is a known bug in FPC 2.6.2. RESTful uses all HTTP methods (GET/POST/PUT/DELETE), and old FCL-web does not supports it, but it is fixed in new FCL-web. Try it now in a new environment, I'll show my environment to you: 0. use a stable release of Lazarus/FPC: Lazarus 1.0.14 r43446 FPC 2.6.2 i386-win32-win32/win64 (http://sourceforge.net/projects/lazarus); 1. install Apache server in your system (http://archive.apache.org/dist/httpd/binaries/win32/httpd-2.2.22-win32-x86-openssl-0.9.8t.msi), choosing the "c:\websrv" folder instead of default Apache folder in "Program Files", after install, you will have the "c:\websrv\cgi-bin" folder; 2. undo all changes in your Brook demos (in SmartGIT, I select all files and use "Revert" button), and keep using BrookFCLCGIBroker instead of BrookFCLHTTPAppBroker broker that you changed; 3. install the best browser in your system: Google Chrome; 4. install a complete REST client plugin in your Chrome: https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo; 5. with your database and "person" table already created, open the project "C:\repository\git\brookframework\demos\db\rest\cgi1.lpi" and, in your project options (Ctrl+Shift+F11), set "c:\websrv\cgi-bin\cgi1.bf" in "Compiler Options > Paths > Target file name", and uncheck the "Apply conventions" option; 6. compile your project (Ctrl+F9); 7. configure your REST plugin to: http://imagebin.org/295955; 8. enjoy; -- Silvio Cl?cio My public projects - github.com/silvioprog -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/59aa742b/attachment-0001.html>

Reply by email

silvioprog
to Giuseppe

2014-02-26 11:16 GMT-03:00 Giuseppe :

Show quoted text 9 lines
Thanks Silvio, I Will try but, why you don't get error using FPC 2.6.2? Don't understand :/ Enviado desde mi iPad /Giuseppe

Simple, because I need to use HTTPS in my personal projects, then I'm using [Fast]CGI instead of embedded server in FPC 2.6.2. Currently, I'm using embedded server only to debug my projects, but, in future, I'll use embedded server in production too.

Silvio Cl?cio My public projects - github.com/silvioprog -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/ac1364c0/attachment.html>

Reply by email

Giuseppe
to silvioprog: 2014-02-26 6:31 GMT-03:00 Giuseppe : Exactly how Canneyt said: It is a known bug in FPC…
Show quoted text 28 lines
Exactly how Canneyt said: It is a known bug in FPC 2.6.2. RESTful uses all HTTP methods (GET/POST/PUT/DELETE), and old FCL-web does not supports it, but it is fixed in new FCL-web. Try it now in a new environment, I'll show my environment to you: 0. use a stable release of Lazarus/FPC: Lazarus 1.0.14 r43446 FPC 2.6.2 i386-win32-win32/win64 (http://sourceforge.net/projects/lazarus); 1. install Apache server in your system (http://archive.apache.org/dist/httpd/binaries/win32/httpd-2.2.22-win32-x86-openssl-0.9.8t.msi), choosing the "c:\websrv" folder instead of default Apache folder in "Program Files", after install, you will have the "c:\websrv\cgi-bin" folder; 2. undo all changes in your Brook demos (in SmartGIT, I select all files and use "Revert" button), and keep using BrookFCLCGIBroker instead of BrookFCLHTTPAppBroker broker that you changed; 3. install the best browser in your system: Google Chrome; 4. install a complete REST client plugin in your Chrome: https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo; 5. with your database and "person" table already created, open the project "C:\repository\git\brookframework\demos\db\rest\cgi1.lpi" and, in your project options (Ctrl+Shift+F11), set "c:\websrv\cgi-bin\cgi1.bf <http://cgi1.bf>" in "Compiler Options > Paths > Target file name", and uncheck the "Apply conventions" option; 6. compile your project (Ctrl+F9); 7. configure your REST plugin to: http://imagebin.org/295955; 8. enjoy;

Yes this works.

Then, to build dinamic sites like Anderson do in his videos, I have to wait to 2.6.4 to get Brook working again as before. True? Meanwhile, I can use it "just" as REST server.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/dd1ad507/attachment.html>

Reply by email

silvioprog
to Giuseppe

2014-02-26 13:27 GMT-03:00 Giuseppe :
[...]

Show quoted text 6 lines
Yes this works. Then, to build dinamic sites like Anderson do in his videos, I have to wait to 2.6.4 to get Brook working again as before. True? Meanwhile, I can use it "just" as REST server.

With Anderson's videos you will have a basic knowledge of Brook 2.6. I believe that he will have to make updated videos, if he want to use new Brook features.

No. Currently Brook compile and works fine with FPC 2.6.2+. A bit limitation is only in embedded server, because it does not support all HTTP methods in this version, but it is already fixed in new FPC.

I use new Brook with FPC 2.6.2 and FastCGI in my projects, and it works fine.

Silvio Cl?cio My public projects - github.com/silvioprog -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/71da8feb/attachment.html>

Reply by email

Giuseppe
to silvioprog
Show quoted text 13 lines
El 26/02/2014, a las 20:47, silvioprog escribi?: 2014-02-26 13:27 GMT-03:00 Giuseppe : [...] > Yes this works. > > Then, to build dinamic sites like Anderson do in his videos, I have to wait to 2.6.4 to get Brook working again as before. True? Meanwhile, I can use it "just" as REST server. With Anderson's videos you will have a basic knowledge of Brook 2.6. I believe that he will have to make updated videos, if he want to use new Brook features. No. Currently Brook compile and works fine with FPC 2.6.2+. A bit limitation is only in embedded server, because it does not support all HTTP methods in this version, but it is already fixed in new FPC. I use new Brook with FPC 2.6.2 and FastCGI in my projects, and it works fine.

But I get the error of the topic deploying the CGI, with dopf and sqldb demos.

Regards.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/57a04d80/attachment.html>

Reply by email

silvioprog
to Giuseppe

2014-02-26 17:52 GMT-03:00 Giuseppe :

Show quoted text 29 lines
El 26/02/2014, a las 20:47, silvioprog escribi?: 2014-02-26 13:27 GMT-03:00 Giuseppe : [...] > Yes this works. > > Then, to build dinamic sites like Anderson do in his videos, I have to > wait to 2.6.4 to get Brook working again as before. True? Meanwhile, I can > use it "just" as REST server. > With Anderson's videos you will have a basic knowledge of Brook 2.6. I believe that he will have to make updated videos, if he want to use new Brook features. No. Currently Brook compile and works fine with FPC 2.6.2+. A bit limitation is only in embedded server, because it does not support all HTTP methods in this version, but it is already fixed in new FPC. I use new Brook with FPC 2.6.2 and FastCGI in my projects, and it works fine. But I get the error of the topic deploying the CGI, with dopf and sqldb demos. Regards.

Using FPC 2.6.2 you get the "invalid request method" error only in embedded mode, in (Fast)CGI it is OK. Again: your db erros is not related with FCL-Web and/or Brook, it is related with your 32/64 "mixed confusion" architecture, ie, your architecture is 64 but your DLL is 32 etc.

Silvio Cl?cio My public projects - github.com/silvioprog -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/0a001099/attachment-0001.html>

Reply by email

Giuseppe
to silvioprog
Show quoted text 23 lines
El 26/02/2014, a las 22:26, silvioprog escribi?: 2014-02-26 17:52 GMT-03:00 Giuseppe : > >> El 26/02/2014, a las 20:47, silvioprog escribi?: >> >> 2014-02-26 13:27 GMT-03:00 Giuseppe : >> [...] >>> Yes this works. >>> >>> Then, to build dinamic sites like Anderson do in his videos, I have to wait to 2.6.4 to get Brook working again as before. True? Meanwhile, I can use it "just" as REST server. >> >> With Anderson's videos you will have a basic knowledge of Brook 2.6. I believe that he will have to make updated videos, if he want to use new Brook features. >> >> No. Currently Brook compile and works fine with FPC 2.6.2+. A bit limitation is only in embedded server, because it does not support all HTTP methods in this version, but it is already fixed in new FPC. >> >> I use new Brook with FPC 2.6.2 and FastCGI in my projects, and it works fine. > But I get the error of the topic deploying the CGI, with dopf and sqldb demos. > > Regards. Using FPC 2.6.2 you get the "invalid request method" error only in embedded mode, in (Fast)CGI it is OK. Again: your db erros is not related with FCL-Web and/or Brook, it is related with your 32/64 "mixed confusion" architecture, ie, your architecture is 64 but your DLL is 32 etc.

No, dll error was solved. I get this error "method not allowed" with embedded and as cgi too. Don't know howto build and deploy a fcgi -------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/96ccdcf5/attachment.html>

Reply by email

silvioprog
to Giuseppe

2014-02-26 18:36 GMT-03:00 Giuseppe :

Show quoted text 43 lines
El 26/02/2014, a las 22:26, silvioprog escribi?: 2014-02-26 17:52 GMT-03:00 Giuseppe : > > El 26/02/2014, a las 20:47, silvioprog escribi?: > > 2014-02-26 13:27 GMT-03:00 Giuseppe : > [...] > >> Yes this works. >> >> Then, to build dinamic sites like Anderson do in his videos, I have to >> wait to 2.6.4 to get Brook working again as before. True? Meanwhile, I can >> use it "just" as REST server. >> > > With Anderson's videos you will have a basic knowledge of Brook 2.6. I > believe that he will have to make updated videos, if he want to use new > Brook features. > > No. Currently Brook compile and works fine with FPC 2.6.2+. A bit > limitation is only in embedded server, because it does not support all HTTP > methods in this version, but it is already fixed in new FPC. > > I use new Brook with FPC 2.6.2 and FastCGI in my projects, and it works > fine. > > But I get the error of the topic deploying the CGI, with dopf and sqldb > demos. > > Regards. > Using FPC 2.6.2 you get the "invalid request method" error only in embedded mode, in (Fast)CGI it is OK. Again: your db erros is not related with FCL-Web and/or Brook, it is related with your 32/64 "mixed confusion" architecture, ie, your architecture is 64 but your DLL is 32 etc. No, dll error was solved. I get this error "method not allowed" with embedded and as cgi too. Don't know howto build and deploy a fcgi.

I don't know if our environment is similar to reproduce it. My environment is:

Windows 8, 64 bit.
Lazarus 1.0.14 r43446 FPC 2.6.2 i386-win32-win32/win64. Brook via trunk.
PostgreSQL 8.4, 32 bit.
Apache/2.2.22 (Win32), Server built: Jan 28 2012 11:16:39.

Are you executing the demo using correct Url/HTTP request methods?

Silvio Cl?cio My public projects - github.com/silvioprog -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140226/17794371/attachment.html>

Reply by email

Giuseppe
to silvioprog
Show quoted text 9 lines
I don't know if our environment is similar to reproduce it. My environment is: Windows 8, 64 bit. Lazarus 1.0.14 r43446 FPC 2.6.2 i386-win32-win32/win64. Brook via trunk. PostgreSQL 8.4, 32 bit. Apache/2.2.22 (Win32), Server built: Jan 28 2012 11:16:39. Are you executing the demo using correct Url/HTTP request methods?

It's similar, just Laz version different. As I mentioned on previous mail...

Lazarus 1.2RC2, FPC 2.6.2 rev.43696, 32 bits.
brookframework downloaded from github.
Opened brookex and brookrt lpk and compiled.
dopf downloaded from github, opened and compiled.

////
Open brookframework\demos\simple\helloworld\cgi project Build.
Copy to cgi-bin folder
http://localhost:8080/cgi-bin/cgi1.bf returns Hello World! This works....

/////
Open brookframework\demos\simple\static project
Build.
Execute test.exe
http://localhost:8000/index returns static page opening a dialog as expected. This works....

/////
Open \brookframework\demos\simple\entity project
Build.
Copy to cg1.bf to cgi-bin folder
http://localhost:8080/cgi-bin/cgi1.bf returns "HTTP method not allowed for the requested resource." Didn't worked (with BrookFCLCGIBroker, either with BrookFCLHttpAppBroker)

//////
Created postgres database with table person.
Open brookframework/demos/db/dopf/cgi1.lpi
Changed db configuration from dbutils.pas pointing to my database Copied all postgres dll from postgres/bin folder to project folder. http://localhost returns "HTTP method not allowed for the requested resource."

Shell:
D:\DevAux\LazComp\brookframework\demos\db\dopf>cgi1.exe exception at 0043A79E:
Missing HTTP protocol version in request.

Didn't worked (with BrookFCLCGIBroker, either with BrookFCLHttpAppBroker)

//////
Open brookframework\demos\db\rest project
Build.
Copy to rest.bf to cgi-bin folder
http://localhost:8080/cgi-bin/rest.bf returns data as expected. Works from advanced rest client on chrome too
This works as embbebed too AFAIR.

Regards.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140227/e537f3d7/attachment-0001.html>

Reply by email

silvioprog
to Giuseppe

2014-02-27 4:53 GMT-03:00 Giuseppe :
[...]

Show quoted text 8 lines
///// Open \brookframework\demos\simple\entity project Build. Copy to cg1.bf to cgi-bin folder http://localhost:8080/cgi-bin/cgi1.bf returns "HTTP method not allowed for the requested resource." Didn't worked (with BrookFCLCGIBroker, either with BrookFCLHttpAppBroker)

Well, see:

  TMyAction = class(specialize TBrookEntityAction<TMyType>)
  public
    procedure Post; override; <<<<<< POST
  end;

ie, you can't open it directly in the URL of Chrome (GET), you need to call it via POST method (using rest client).

Show quoted text 8 lines
////// Created postgres database with table person. Open brookframework/demos/db/dopf/cgi1.lpi Changed db configuration from dbutils.pas pointing to my database Copied all postgres dll from postgres/bin folder to project folder. http://localhost returns "HTTP method not allowed for the requested resource."

Oh, you can't open it directly in the URL of Chrome too calling only localhost. Compile your project using CGI broker, copy your executable to the cgi-bin folder, copy "form.html" to the htdocs folder, after, call: " http://localhost/form.html". Using this form it will do a request using POST method.

Silvio Cl?cio My public projects - github.com/silvioprog -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140228/128a136b/attachment.html>

Reply by email

Giuseppe
to silvioprog

I understand, I will try to take a look

Enviado desde mi iPad

/Giuseppe

Show quoted text 37 lines
El 28/02/2014, a las 15:43, silvioprog escribi?: 2014-02-27 4:53 GMT-03:00 Giuseppe : [...] > ///// > Open \brookframework\demos\simple\entity project > Build. > Copy to cg1.bf to cgi-bin folder > http://localhost:8080/cgi-bin/cgi1.bf returns "HTTP method not allowed for the requested resource." > Didn't worked (with BrookFCLCGIBroker, either with BrookFCLHttpAppBroker) Well, see: TMyAction = class(specialize TBrookEntityAction<TMyType>) public procedure Post; override; <<<<<< POST end; ie, you can't open it directly in the URL of Chrome (GET), you need to call it via POST method (using rest client). > ////// > Created postgres database with table person. > Open brookframework/demos/db/dopf/cgi1.lpi > Changed db configuration from dbutils.pas pointing to my database > Copied all postgres dll from postgres/bin folder to project folder. > http://localhost returns "HTTP method not allowed for the requested resource." Oh, you can't open it directly in the URL of Chrome too calling only localhost. Compile your project using CGI broker, copy your executable to the cgi-bin folder, copy "form.html" to the htdocs folder, after, call: "http://localhost/form.html". Using this form it will do a request using POST method. -- Silvio Cl?cio My public projects - github.com/silvioprog -- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20140228/89714393/attachment.html>

Reply by email