On 2014-03-27 16:22:37 -0300, Leonardo M. Ramé wrote: > Hi, I'm sending a custom header I called "Filename" to a Brook CGI > (which uses TRequest from fcl-web) but I can't access that header. > > Here's what I capture on the Network tab on Chrome's developer tools; > > POST /cgi-bin/gtir2/test/ HTTP/1.1 > Host: 127.0.0.1:8080 > Connection: keep-alive > Content-Length: 36409 > 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 > Filename: 1234 > Content-Type: application/vnd.oasis.opendocument.text > Accept: */* > Referer: http://127.0.0.1:8080/gtirii/ > Accept-Encoding: gzip,deflate,sdch > Accept-Language: es-419,es;q=0.8,en;q=0.6 > > And here's what I capture with fcl-web: > > Accept:*/* > Accept-Encoding:gzip,deflate,sdch > Accept-Language:es-419,es;q=0.8,en;q=0.6 > Connection:keep-alive > Content-Length:36409 > Content-Type:application/vnd.oasis.opendocument.text > Referer:http://127.0.0.1:8080/gtirii/ > Server:127.0.0.1 > User-Agent:Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like > Gecko) Chrome/35.0.1897.2 Safari/537.36 > Host:/ > Cache-Control:/var/www/index.html > X-Requested-With:127.0.0.1 > > The code I'm using to print the header's output is this (on a POST > handler): > > for I := 0 to TheRequest.FieldCount - 1 do > begin > lAccession := lAccession + > TheRequest.FieldNames[I] + ':' + TheRequest.FieldValues[I] + '<br>'; > end; > raise Exception.Create(lAccession); > > Why the difference? > > Btw, I'm using fpc 2.7.1 compiled from trunk just before asking here, on > linux x86_64 and Lazarus trunk. >
Well, I ended up adding the data as a querystring: /cgi-bin/test?filename=1234 And doing a POST with that. -- Leonardo M. Ramé http://leonardorame.blogspot.com -- _______________________________________________ Lazarus mailing list [email protected] http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus
