Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Vincent Snijders
2011/11/1 Felipe Monteiro de Carvalho : > On Mon, Oct 31, 2011 at 7:30 PM, Michael Van Canneyt > wrote: >>> So it seems that you MUST set the contenttype either to >>> MULTIPART/FORM-DATA or APPLICATION/X-WWW-FORM-URLENCODED. >> >> Yes, this is as per the HTML specs. > > They actually prohibit sen

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Felipe Monteiro de Carvalho
On Mon, Oct 31, 2011 at 7:30 PM, Michael Van Canneyt wrote: >> So it seems that you MUST set the contenttype either to >> MULTIPART/FORM-DATA or APPLICATION/X-WWW-FORM-URLENCODED. > > Yes, this is as per the HTML specs. They actually prohibit sending arbitrary data? oh, boy, these people like rul

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Sven Barth
On 31.10.2011 19:30, Michael Van Canneyt wrote: Maybe TRequest should be extended by something like an "unknown content type handler"... This can of course be done, the question is what this handler should do ? Handler gets ContentType, transmitted data (the TMemoryStream) and the ContentFie

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Michael Van Canneyt
On Mon, 31 Oct 2011, Sven Barth wrote: On 31.10.2011 16:56, Felipe Monteiro de Carvalho wrote: Ok, I figured part of it out. I can get past the exception if I use 2.5.1 And the action was necessary, which is really strange because it worked nicely without it when using GET But now my proble

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Sven Barth
On 31.10.2011 16:56, Felipe Monteiro de Carvalho wrote: Ok, I figured part of it out. I can get past the exception if I use 2.5.1 And the action was necessary, which is really strange because it worked nicely without it when using GET But now my problem is that I cannot get my POST data. I trye

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-31 Thread Andrew Pennebaker
Jonas: Thanks, I'll use fpc -iV from now on. But "make install" still puts an fpc binary in /usr/local/bin that reports "2.7.1" and then overwrites *something* so that a second fpc call reports "2.4.4". Cheers, Andrew Pennebaker www.yellosoft.us On Mon, Oct 31, 2011 at 1:36 PM, Jonas Maebe wrot

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-31 Thread Sven Barth
On 31.10.2011 18:29, Andrew Pennebaker wrote: Sven, awesome! Looks like FPC will be getting some exciting features in the near future. Only time will tell whether it's the near future. Also these features are meant to be Delphi compatible (except the point that FPC will support global generic

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread ABorka
On 10/31/2011 10:14, Felipe Monteiro de Carvalho wrote: There is no form and no form data here. I want to pass raw data via post. And yes, I checked that it is sent correctly. Then your Content-Type header is neither "MULTIPART/FORM-DATA" nor "APPLICATION/X-WWW-FORM-URLENCODED" when you use PO

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-31 Thread Jonas Maebe
On 31 Oct 2011, at 18:29, Andrew Pennebaker wrote: > Jonas, "make install" does, however, overwrite /usr/local/bin/fpc, which is > not a symlink, with an old version during install. Try running fpc -version > halfway and after "make install". The "fpc" binary does not have a version number. It r

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-31 Thread Andrew Pennebaker
Sven, awesome! Looks like FPC will be getting some exciting features in the near future. Jonas, "make install" does, however, overwrite /usr/local/bin/fpc, which is not a symlink, with an old version during install. Try running fpc -version halfway and after "make install". Cheers, Andrew Penneb

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Felipe Monteiro de Carvalho
There is no form and no form data here. I want to pass raw data via post. And yes, I checked that it is sent correctly. ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread ABorka
On 10/31/2011 08:56, Felipe Monteiro de Carvalho wrote: Ok, I figured part of it out. I can get past the exception if I use 2.5.1 And the action was necessary, which is really strange because it worked nicely without it when using GET But now my problem is that I cannot get my POST data. I trye

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Felipe Monteiro de Carvalho
Ok, I figured part of it out. I can get past the exception if I use 2.5.1 And the action was necessary, which is really strange because it worked nicely without it when using GET But now my problem is that I cannot get my POST data. I tryed this so far: lData := ARequest.ContentFields.Text; but

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Felipe Monteiro de Carvalho
If I remove the line from JavaScript which sets the content type I just get: exception at 0043004B: Unsupported content type: "text/plain; charset=UTF-8". =/ -- Felipe Monteiro de Carvalho ___ fpc-pascal maillist - fpc-pascal@lists.freepascal.org ht

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Felipe Monteiro de Carvalho
Ok, the exception was a great addition =) It corners the error here: procedure TRequest.InitPostVars; Var M : TCapacityStream; Cl : Integer; B : Byte; CT : String; begin {$ifdef CGIDEBUG} SendMethodEnter('InitPostVars'); {$endif} CL:=ContentLength; M:=TCapacityStream.Create; Tr

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Felipe Monteiro de Carvalho
On Mon, Oct 31, 2011 at 4:23 PM, Michael Van Canneyt wrote: > Where is the action ? If you specify a module, then you must specify an > action as well. actions are not necessary. In my module there is a property DefActionWhenUnknown=True (it is like this by default). Also if this was the problem

Re: [fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Michael Van Canneyt
On Mon, 31 Oct 2011, Felipe Monteiro de Carvalho wrote: Hello, So I advanced my CGI using HTTP GET so far, but I'd like to migrate to HTTP POST. But I always get this error message in the apache logs: Premature end of script headers: openpoker3.cgi, referer: http://localhost:8080/cgi-bin/ope

[fpc-pascal] Premature end of headers using fcl-web and POST

2011-10-31 Thread Felipe Monteiro de Carvalho
Hello, So I advanced my CGI using HTTP GET so far, but I'd like to migrate to HTTP POST. But I always get this error message in the apache logs: Premature end of script headers: openpoker3.cgi, referer: http://localhost:8080/cgi-bin/openpoker3.cgi?module=MainPage The request doesn't even get to

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Michael Van Canneyt
On Mon, 31 Oct 2011, Marco van de Voort wrote: In our previous episode, Michael Van Canneyt said: finer. (-dyn and static in separate packages, so that the static one alone gets the dependency. Lazarus then only depends on the dyn packages). That would be a regular nightmare, because there

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Marco van de Voort
In our previous episode, Michael Van Canneyt said: > > finer. (-dyn and static in separate packages, so that the static one alone > > gets the dependency. Lazarus then only depends on the dyn packages). > > That would be a regular nightmare, because there are many packages that > depend > on fcl

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Graeme Geldenhuys
On 31 October 2011 12:45, Jonas Maebe wrote: > sqlite3 is not part of FPC. You probably have to install the sqlite3-dev > package or something like that. Arguably, that should be a dependency of the > fpc .deb package that installs support for interfacing with sqlite3. I agree with Michael here

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Michael Van Canneyt
On Mon, 31 Oct 2011, Marco van de Voort wrote: In our previous episode, Jonas Maebe said: On Mon, 31 Oct 2011, Jonas Maebe wrote: sqlite3 is not part of FPC. You probably have to install the sqlite3-dev package or something like that. Arguably, that should be a dependency of the fpc .deb p

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Michael Van Canneyt
On Mon, 31 Oct 2011, Felipe Monteiro de Carvalho wrote: On Mon, Oct 31, 2011 at 12:10 PM, Michael Van Canneyt wrote: This would add a whole list of unwanted dependencies to e.g. lazarus since it installs support for many databases by default. It loads the needed libraries on-demand; if someo

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Felipe Monteiro de Carvalho
On Mon, Oct 31, 2011 at 12:42 PM, Marco van de Voort wrote: > If the database packages get dependancies to the corresponding c-clientlibs, > then > fcl-db will get dependencies on all these C db client libs. Even if you only > use tbufdataset. Aha, in that case this proposal is really a no go.

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Marco van de Voort
In our previous episode, Felipe Monteiro de Carvalho said: > > Are you sure? I think it works differently. Lazarus bigide includes > design-time support only for those datasets without any external > dependencies. If the database packages get dependancies to the corresponding c-clientlibs, then

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Marco van de Voort
In our previous episode, Jonas Maebe said: > > On Mon, 31 Oct 2011, Jonas Maebe wrote: > > > >> sqlite3 is not part of FPC. You probably have to install the sqlite3-dev > >> package or something like that. Arguably, that should be a dependency of > >> the fpc .deb package that installs support fo

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Felipe Monteiro de Carvalho
On Mon, Oct 31, 2011 at 12:10 PM, Michael Van Canneyt wrote: > This would add a whole list of unwanted dependencies to e.g. lazarus since > it installs support for many databases by default. It loads the needed > libraries on-demand; if someone needs it, he/she can install the needed > libraries w

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Jonas Maebe
On 31 Oct 2011, at 12:10, Michael Van Canneyt wrote: > On Mon, 31 Oct 2011, Jonas Maebe wrote: > >> sqlite3 is not part of FPC. You probably have to install the sqlite3-dev >> package or something like that. Arguably, that should be a dependency of >> the fpc .deb package that installs support

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Michael Van Canneyt
On Mon, 31 Oct 2011, Jonas Maebe wrote: On 31 Oct 2011, at 11:27, Luciano de Souza wrote: The executable was not generated. In its place, I found "link.res". The compilation was successful, but for a unknown reason, the linkage was not completed. I don't understand what the statements in

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Luciano de Souza
Everything is solved with a magic: "sudo apt-get install libsqlite3-dev". I tested the same example and the executable was generated. Thank you. Your reply helped me a lot! Em 31-10-2011 08:45, Jonas Maebe escreveu: On 31 Oct 2011, at 11:27, Luciano de Souza wrote: The executable was not ge

Re: [fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Jonas Maebe
On 31 Oct 2011, at 11:27, Luciano de Souza wrote: > The executable was not generated. In its place, I found "link.res". The > compilation was successful, but for a unknown reason, the linkage was not > completed. I don't understand what the statements in link.res means indeed. > In spite of the

[fpc-pascal] A linking error when compiling with FPC 2.4.4

2011-10-31 Thread Luciano de Souza
Hi listers, I have installed FPC 2.4.4 using the following package: http://mirrors.iwi.me/lazarus/snapshots/fpc-2.4.4-1.i386.deb.tar Having unpacked it in a folder, I did: sudo dpkg -i *.deb The instalation was seemingly successful since I could compile some sources. However, compiling the attac

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-31 Thread Jonas Maebe
On 31 Oct 2011, at 08:36, Andrew Pennebaker wrote: > I forcibly sudo cp ppc386 /usr/local/bin/fpc, mitigating the issue. Yeah, > something in the makefile installation process is definitely moving over an > older version. Create a symlink from /usr/local/bin/ppc386 to /usr/local/lib/fpc/2.7.1/pp

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-31 Thread Sven Barth
Am 31.10.2011 08:52, schrieb Andrew Pennebaker: paycheck.pas: unit Paycheck; interface type generic TArray = array of T; generic TFn = function() : T; function GenInt () : TFn; function GenBool() : TFn; function GenChar() : TFn; function GenArray(gen : TFn) : TArray; function GenString

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-31 Thread Andrew Pennebaker
Sven, recap: I want to make a GenArray function that returns an array populated by a generator anonymous function. For example, GenString would generate a random string by doing GenArray(GenChar). Users could create their own generators, e.g. GenTree wrapping around GenArray(GenLeaf), GenGraph wrap

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-31 Thread Andrew Pennebaker
I forcibly sudo cp ppc386 /usr/local/bin/fpc, mitigating the issue. Yeah, something in the makefile installation process is definitely moving over an older version. (I deleted the whole directory for the v2.4.4 subversion, so that's not the problem.) Cheers, Andrew Pennebaker www.yellosoft.us On

Re: [fpc-pascal] How can I implement "thrice" in Free Pascal?

2011-10-31 Thread Andrew Pennebaker
Something's wrong with the makefiles. I checked out the Subversion trunkand ran sudo make install. Partway through the process, when I run "fpc" in a new terminal, I get: $ fpc Free Pascal Compiler version 2.7.1 But when make finishes installing, I run f