[Lazarus] Brook-fpWeb POST without fields

Leonardo M. Ramé l.rame at griensu.com
Thu Mar 20 19:21:32 CET 2014


On 2014-03-20 15:12:26 -0300, silvioprog wrote:
> 2014-03-20 14:59 GMT-03:00 Leonardo M. Ramé <l.rame at griensu.com>:
> 
> > Hi, a CGI I'm making needs to receive a POST message containing binary
> > data, but it doesn't contain fields, so I cannot access that data from
> > my program.
> >
> > I'm using BrookFramework but if you find a solution using fcl-web is ok.
> >
> > Here's the header captured in google chrome:
> >
> > POST /index/ HTTP/1.1
> > Host: 127.0.0.1:8080
> > Connection: keep-alive
> > Content-Length: 108527
> > Origin: http://127.0.0.1:8080
> > User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML,
> > like Gecko) Chrome/35.0.1897.2 Safari/537.36
> > Content-Type: application/vnd.oasis.opendocument.text
> > Accept: */*
> > Referer: http://127.0.0.1:8080/webodf/programs/editor/src-localeditor.html
> > Accept-Encoding: gzip,deflate,sdch
> > Accept-Language: es-419,es;q=0.8,en;q=0.6
> >
> > Regards,
> > --
> > Leonardo M. Ramé
> > http://leonardorame.blogspot.com
> 
> 
> Hello,
> 
> In new Brook 3.0 (from trunk), if your request use form-data, you can
> access the streams via Files property, e.g:
> 
> Files.Files[0].Stream;
> 
> But, using the "application/vnd.oasis.opendocument.text" content type, I
> think that you need to use BrookHttpClient.
> 

Well, aparently there are no files in the request, because Files array
is empty.

Regarding BrookHttpClient, isn't it client for http requests?, I need to
parse a request from a client, my program is the server. 

Regards,
-- 
Leonardo M. Ramé
http://leonardorame.blogspot.com




More information about the Lazarus mailing list