Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.
-
lurisia #1
CFHTTP: Imitating a Browser
I want to send a cfhttp request whose header contains the following fields AND
ONLY the following fields:
Host
User-Agent
Keep-Alive (value=300)
Connection (value=keep-alive)
Accept
Accept-Language
Accept-Encoding
Accept-Charset
My problem is that I can't tell if my cfhttpparams are working. Eg,
<cfhttpparam type = "cgi" name="connection" value="keep-alive">
<cfhttpparam type = "cgi" name="xxxxxxxxxxxx" value="whatever">
will both be sent in the header if I put them in the cfhttp tag. But the fact
that "xxxxxxxxxx" is sent makes me wonder if the connection header is even
correct. That is, it might be that for the browser to recognize the
"connection" header I need to write something like this:
<cfhttpparam type = "cgi" name="connection_type" value="keep-alive">
or something else like that. Anyway, does anyone know what all the correct
cfhttpparam tags would be for the headers I listed above?
Also, coldfusion seems to automatically add a header call TE, whose value is
"trailers, deflate, gzip, compress". What does this do and can I get rid of it?
TIA,
lurisia
lurisia Guest
-
CFHTTP
Hello, I need to send data from a CF page to an asp.net page for processing via a URL string. The ASP page takes three parameters. Those being... -
Help with cfhttp and links
I am retrieving a list of documents from another server after sending login params and displaying them. Now I need to convert each of these... -
CFHTTP Put Method
Scenario is one in which I am moving image files from a local laptop running CF Developer Server to a centralized CF Enterprise server. Have been... -
CFHTTP help
We have an in-house built publication system that creates .htm files from database content. For a specific project, I need to modify the way that... -
Imitating a virtual dir with a querystring parameter
Can someone give me an idea of how the technique that lets a querystring parameter look like a virtual directory reference works. You can see... -
Neculai Macarie #2
Re: CFHTTP: Imitating a Browser
> I want to send a cfhttp request whose header contains the following fields
ANDRequest a page from your own server. In the CGI scope the variables prefixed> ONLY the following fields:
>
> Host
> User-Agent
> Keep-Alive (value=300)
> Connection (value=keep-alive)
> Accept
> Accept-Language
> Accept-Encoding
> Accept-Charset
>
> My problem is that I can't tell if my cfhttpparams are working. Eg,
with HTTP_ are headers sent by client.
fact> <cfhttpparam type = "cgi" name="connection" value="keep-alive">
> <cfhttpparam type = "cgi" name="xxxxxxxxxxxx" value="whatever">
>
> will both be sent in the header if I put them in the cfhttp tag. But theConnection is "correct". There is a set of headers that are standardized,> that "xxxxxxxxxx" is sent makes me wonder if the connection header is even
> correct.
but each app can add her own headers. An application can for example extend
the HTTP protocol to use it's own X-Command header.
That is, it might be that for the browser to recognize theI think you meant the server...> "connection" header I need to write something like this:
correct> <cfhttpparam type = "cgi" name="connection_type" value="keep-alive">
>
> or something else like that. Anyway, does anyone know what all theThe header names are correct in your list.> cfhttpparam tags would be for the headers I listed above?
is> Also, coldfusion seems to automatically add a header call TE, whose valueof it?> "trailers, deflate, gzip, compress". What does this do and can I get rid
It's used to signal the the client can accept compressed content. Sorry,
don't know how to remove it.
--
<mack />
Neculai Macarie Guest
-
lurisia #3
Re: CFHTTP: Imitating a Browser
Thanks Mack... A few points I'm still confused about:
Request a page from your own server.
To test, I have one test page that makes a cfhttp call to another test page,
which in turn uses GetHttpRequestData to get all the header info, and then
writes it to file. I can then look in the file to see what header info was
sent by <cfhttp>. But like I said, any random header variable I make up will
also appear in the dump. What did you mean by "request a page from your own
server"? Is there a better way for me to test?
In the CGI scope the variables prefixed with HTTP_ are headers sent by client.
But when I use <cfhttp>, the coldfusion server *is* the client, isn't it? So
are you saying that I should add "HTTP_ to the name parameters of my
<cfhttpparam> tags? But then you also said "connection" was correct, so I was
confused....
Thanks for any more info,
lurisia
lurisia Guest
-
Neculai Macarie #4
Re: CFHTTP: Imitating a Browser
> Thanks Mack... A few points I'm still confused about:
page,>
> Request a page from your own server.
>
> To test, I have one test page that makes a cfhttp call to another testwas> which in turn uses GetHttpRequestData to get all the header info, and then
> writes it to file. I can then look in the file to see what header infowill> sent by <cfhttp>. But like I said, any random header variable I make upown> also appear in the dump. What did you mean by "request a page from yourThat is the expected result... I'm not sure what your expectations are> server"? Is there a better way for me to test?
here...
client.> In the CGI scope the variables prefixed with HTTP_ are headers sent bySo>
> But when I use <cfhttp>, the coldfusion server *is* the client, isn't it?was> are you saying that I should add "HTTP_ to the name parameters of my
> <cfhttpparam> tags? But then you also said "connection" was correct, so IThe name of the header is correct. What I'm saying is that if you send a> confused....
header called X-Command:
<cfhttpparam type = "cgi" name="X-Command" value="testing testing">
on the receiving page you'll have HTTP_X_COMMAND equal "testing testing"
HTH,
--
<mack />
Neculai Macarie Guest



Reply With Quote

