Set HTTP Headers
I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue When I do cfset x = getHTTPRequestData() cfdump var=#x# ... I do not see the testVar header. Thanks -- Jeff ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Hi Jeff, I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue -- A header is something you send to the client in the response stream. So doing getHTTPRequestDate() like you do below is getting the request stream (what the client is sending to you). If you want to see the headers you're sending back to the client, there are a couple tools that plug into IE that let you see that kinda thing, or, if you want to get really geeky, break out Network Monitor in Windows 2000 and view the TCP/IP packets and filter for HTTP data. AJ Aaron Johnson [EMAIL PROTECTED] http://cephas.net/blog/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue When I do cfset x = getHTTPRequestData() cfdump var=#x# ... I do not see the testVar header. The CFHEADER tag lets you set an HTTP response header, which will be returned to the browser from the server. The GetHTTPRequestData() function returns the HTTP request headers and body sent from the browser to the server. So, nothing you set with CFHEADER in one page will be visible to GetHTTPRequestData() in another. What are you trying to do, exactly? Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Okay, that makes since. Now let me explain the problem better. I am building some functionality to read a set of header variables and do some processing on them. As a test, I was trying to insert certain values into the header and then call my functions to make sure they work correctly. So basically you are saying that I need to set the header variables and then somehow call or go to another page that runs the function in question? Thanks -- Jeff -Original Message- From: Aaron Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 10:31 AM To: CF-Talk Subject: RE: Set HTTP Headers Hi Jeff, I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue -- A header is something you send to the client in the response stream. So doing getHTTPRequestDate() like you do below is getting the request stream (what the client is sending to you). If you want to see the headers you're sending back to the client, there are a couple tools that plug into IE that let you see that kinda thing, or, if you want to get really geeky, break out Network Monitor in Windows 2000 and view the TCP/IP packets and filter for HTTP data. AJ Aaron Johnson [EMAIL PROTECTED] http://cephas.net/blog/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Jeff, You could also do a CFHTTP call to the page you are setting the headers on. Then cfdump cfhttp.header for the raw response header you get back from your page or cfdump cfhttp.responseHeader (which is a Structure) or use cfhttp.responseHeader[testVar] to see if you get testVarValue as expected etc. André -Original Message- From: Aaron Johnson [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 16:31 To: CF-Talk Subject: RE: Set HTTP Headers Hi Jeff, I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue -- A header is something you send to the client in the response stream. So doing getHTTPRequestDate() like you do below is getting the request stream (what the client is sending to you). If you want to see the headers you're sending back to the client, there are a couple tools that plug into IE that let you see that kinda thing, or, if you want to get really geeky, break out Network Monitor in Windows 2000 and view the TCP/IP packets and filter for HTTP data. AJ Aaron Johnson [EMAIL PROTECTED] http://cephas.net/blog/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Jeff, You might want to try a tool like HTTP Analyzer (www.coolfusion.com) It will easily let you see what you are sending down to the browser. getHTTPRequestData() will only show you what the browser sends you when it makes its request. Matt -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 11:27 AM To: CF-Talk Subject: Set HTTP Headers I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue When I do cfset x = getHTTPRequestData() cfdump var=#x# ... I do not see the testVar header. Thanks -- Jeff ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
The headers that are sent by the browser are all that I am interested in at this point. I am just trying to figure out how to pass in some test data. Thanks -- Jeff -Original Message- From: Matthew Fusfield [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 10:47 AM To: CF-Talk Subject: RE: Set HTTP Headers Jeff, You might want to try a tool like HTTP Analyzer (www.coolfusion.com) It will easily let you see what you are sending down to the browser. getHTTPRequestData() will only show you what the browser sends you when it makes its request. Matt -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 11:27 AM To: CF-Talk Subject: Set HTTP Headers I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue When I do cfset x = getHTTPRequestData() cfdump var=#x# ... I do not see the testVar header. Thanks -- Jeff ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
-- cfheader : Generates custom HTTP response headers to return to the client. sets header in the response --- getHTTPRequestData(): --- Makes HTTP request headers and body available to CFML pages. Useful for capturing SOAP --- request data, which can be delivered in an HTTP header. gets header in the request WG -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 16:27 To: CF-Talk Subject: Set HTTP Headers I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue When I do cfset x = getHTTPRequestData() cfdump var=#x# ... I do not see the testVar header. Thanks -- Jeff ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Jeff, Are you trying to read request headers i.e. those set by the browser when requesting one of your pages, or are you trying to read response headers set by another server e.g. when you request a resource/page programmatically via cfhttp? André -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 16:42 To: CF-Talk Subject: RE: Set HTTP Headers Okay, that makes since. Now let me explain the problem better. I am building some functionality to read a set of header variables and do some processing on them. As a test, I was trying to insert certain values into the header and then call my functions to make sure they work correctly. So basically you are saying that I need to set the header variables and then somehow call or go to another page that runs the function in question? Thanks -- Jeff -Original Message- From: Aaron Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 10:31 AM To: CF-Talk Subject: RE: Set HTTP Headers Hi Jeff, I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue -- A header is something you send to the client in the response stream. So doing getHTTPRequestDate() like you do below is getting the request stream (what the client is sending to you). If you want to see the headers you're sending back to the client, there are a couple tools that plug into IE that let you see that kinda thing, or, if you want to get really geeky, break out Network Monitor in Windows 2000 and view the TCP/IP packets and filter for HTTP data. AJ Aaron Johnson [EMAIL PROTECTED] http://cephas.net/blog/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
HTTP Analyzer = handy app.. of course wget -d url gets them too.. (www.cygwin.com) There is a http view headers plugin for mozilla at mozdev.org A little buggy though... WG -Original Message- From: Matthew Fusfield [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 16:47 To: CF-Talk Subject: RE: Set HTTP Headers Jeff, You might want to try a tool like HTTP Analyzer (www.coolfusion.com) It will easily let you see what you are sending down to the browser. getHTTPRequestData() will only show you what the browser sends you when it makes its request. Matt -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 11:27 AM To: CF-Talk Subject: Set HTTP Headers I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue When I do cfset x = getHTTPRequestData() cfdump var=#x# ... I do not see the testVar header. Thanks -- Jeff ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
_All_ headers are sent by the browser WG -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 16:50 To: CF-Talk Subject: RE: Set HTTP Headers The headers that are sent by the browser are all that I am interested in at this point. I am just trying to figure out how to pass in some test data. Thanks -- Jeff -Original Message- From: Matthew Fusfield [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 10:47 AM To: CF-Talk Subject: RE: Set HTTP Headers Jeff, You might want to try a tool like HTTP Analyzer (www.coolfusion.com) It will easily let you see what you are sending down to the browser. getHTTPRequestData() will only show you what the browser sends you when it makes its request. Matt -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 11:27 AM To: CF-Talk Subject: Set HTTP Headers I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue When I do cfset x = getHTTPRequestData() cfdump var=#x# ... I do not see the testVar header. Thanks -- Jeff ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Okay, I can see how this works. However, is there a way to set header variables such that they can be read using the getHTTPRequestData function - i.e. the same a function that read the standard HTTP headers would use to read the actual header variables? Thanks -- Jeff -Original Message- From: Andre Mohamed [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 10:43 AM To: CF-Talk Subject: RE: Set HTTP Headers Jeff, You could also do a CFHTTP call to the page you are setting the headers on. Then cfdump cfhttp.header for the raw response header you get back from your page or cfdump cfhttp.responseHeader (which is a Structure) or use cfhttp.responseHeader[testVar] to see if you get testVarValue as expected etc. André -Original Message- From: Aaron Johnson [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 16:31 To: CF-Talk Subject: RE: Set HTTP Headers Hi Jeff, I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue -- A header is something you send to the client in the response stream. So doing getHTTPRequestDate() like you do below is getting the request stream (what the client is sending to you). If you want to see the headers you're sending back to the client, there are a couple tools that plug into IE that let you see that kinda thing, or, if you want to get really geeky, break out Network Monitor in Windows 2000 and view the TCP/IP packets and filter for HTTP data. AJ Aaron Johnson [EMAIL PROTECTED] http://cephas.net/blog/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
I have an function that is to serve as an interface to another application. The other application sets a series of variables in the HTTP header that can be seen by my application using getHTTPRequestData. This is done completely transparent - I have no idea how they are actually doing it. I am trying to build a test area on my dev box to simulate the live production area described above. Basically I am trying to set various values in the HTTP header and let my function attempt to interpret them without having to be on the production server. -- Jeff -Original Message- From: Andre Mohamed [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 10:52 AM To: CF-Talk Subject: RE: Set HTTP Headers Jeff, Are you trying to read request headers i.e. those set by the browser when requesting one of your pages, or are you trying to read response headers set by another server e.g. when you request a resource/page programmatically via cfhttp? André -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 16:42 To: CF-Talk Subject: RE: Set HTTP Headers Okay, that makes since. Now let me explain the problem better. I am building some functionality to read a set of header variables and do some processing on them. As a test, I was trying to insert certain values into the header and then call my functions to make sure they work correctly. So basically you are saying that I need to set the header variables and then somehow call or go to another page that runs the function in question? Thanks -- Jeff -Original Message- From: Aaron Johnson [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 10:31 AM To: CF-Talk Subject: RE: Set HTTP Headers Hi Jeff, I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue -- A header is something you send to the client in the response stream. So doing getHTTPRequestDate() like you do below is getting the request stream (what the client is sending to you). If you want to see the headers you're sending back to the client, there are a couple tools that plug into IE that let you see that kinda thing, or, if you want to get really geeky, break out Network Monitor in Windows 2000 and view the TCP/IP packets and filter for HTTP data. AJ Aaron Johnson [EMAIL PROTECTED] http://cephas.net/blog/ ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Jeff, If you want to pass in some test data you need some kind of custom browser or HTTP client that lets you set some headers when making requests to your page. There are a few of these around, or you could write a simple Java/VB app to do it. Alternatively, a load testing tool (probably overkill) e.g. MS WAS lets you set some headers. André -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 16:50 To: CF-Talk Subject: RE: Set HTTP Headers The headers that are sent by the browser are all that I am interested in at this point. I am just trying to figure out how to pass in some test data. Thanks -- Jeff -Original Message- From: Matthew Fusfield [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 10:47 AM To: CF-Talk Subject: RE: Set HTTP Headers Jeff, You might want to try a tool like HTTP Analyzer (www.coolfusion.com) It will easily let you see what you are sending down to the browser. getHTTPRequestData() will only show you what the browser sends you when it makes its request. Matt -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 11:27 AM To: CF-Talk Subject: Set HTTP Headers I am working on a project where I need to create a new HTTP Header variable. I thought this was what the cfheader tag was for, but I am not being able to make it work. What am I missing here? cfheader name=testVar value=testVarValue When I do cfset x = getHTTPRequestData() cfdump var=#x# ... I do not see the testVar header. Thanks -- Jeff ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
The headers that are sent by the browser are all that I am interested in at this point. I am just trying to figure out how to pass in some test data. You can use telnet, netcat or some other command-line HTTP client. Or, you can use different browsers, which will send different headers; my assumption is that you're trying to differentiate between browsers. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Set HTTP Headers
Jeff Chastain wrote: The headers that are sent by the browser are all that I am interested in at this point. I am just trying to figure out how to pass in some test data. You need a custom browser for that. Telnet is a nice one ;-) The reason for this is quite simple actually. Suppose that just any website could tell any browser from now on you will send this header, with 'this' being a unique identification. Sounds like something the EFF and the /. crowd would go rather nuts about, wouldn't they? Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Okay, let me clear this up then, because setting http header variables can be done. I have an instance of a PlumTree portal sitting on a set of production servers. I am trying to put together another application that PlumTree can be nice and talk to. Now, PlumTree passes information from the portal itself to third party applications via the http header. So somehow the PlumTree portal is manipulating the http header before it calls my function. The http header when I receive it (i.e. I can dump the header variables and see the values) includes things like ... CSP-CAN-SET = 'Gadget,User' CSP-GATEWAY-TYPE = 'PlumTree' CSP-PROTOCOL-VERSION = '1.1' My function can then, through the use of getHttpRequestData, see/read/use these header values. I am attempting to test my function on a development box - separate from the PlumTree system - and was trying to figure out how to set these variables before calling my function - i.e. make it look like PlumTree is doing the calling. Hopefully this is more clear. Thanks -- Jeff -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 11:23 AM To: CF-Talk Subject: Re: Set HTTP Headers Jeff Chastain wrote: The headers that are sent by the browser are all that I am interested in at this point. I am just trying to figure out how to pass in some test data. You need a custom browser for that. Telnet is a nice one ;-) The reason for this is quite simple actually. Suppose that just any website could tell any browser from now on you will send this header, with 'this' being a unique identification. Sounds like something the EFF and the /. crowd would go rather nuts about, wouldn't they? Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Jeff, It may well be that PlumTree is manipulating the headers before calling third party pages but that doesn't necessarily mean it is doing it via CF code. You can do v.limited header manipulation using CFHTTP...well, you can set the user-agent header, and you can set some cookies but other than that I'm not aware of another way using purely CF. It is not that difficult to write a CFX or JSP Custom Tag...or indeed access java.net.URL class to open a connection to port 80 or whatever and then manually/programmatically create an HTTP request (including the desired headers) to another resource...well, its not that difficult if you know some Java, but may be you don't! As other people have suggested, a quick and dirty way of testing is to use Telnet and manually create the requests- headers included. How much work do you want to do? André -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 17:43 To: CF-Talk Subject: RE: Set HTTP Headers Okay, let me clear this up then, because setting http header variables can be done. I have an instance of a PlumTree portal sitting on a set of production servers. I am trying to put together another application that PlumTree can be nice and talk to. Now, PlumTree passes information from the portal itself to third party applications via the http header. So somehow the PlumTree portal is manipulating the http header before it calls my function. The http header when I receive it (i.e. I can dump the header variables and see the values) includes things like ... CSP-CAN-SET = 'Gadget,User' CSP-GATEWAY-TYPE = 'PlumTree' CSP-PROTOCOL-VERSION = '1.1' My function can then, through the use of getHttpRequestData, see/read/use these header values. I am attempting to test my function on a development box - separate from the PlumTree system - and was trying to figure out how to set these variables before calling my function - i.e. make it look like PlumTree is doing the calling. Hopefully this is more clear. Thanks -- Jeff -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 11:23 AM To: CF-Talk Subject: Re: Set HTTP Headers Jeff Chastain wrote: The headers that are sent by the browser are all that I am interested in at this point. I am just trying to figure out how to pass in some test data. You need a custom browser for that. Telnet is a nice one ;-) The reason for this is quite simple actually. Suppose that just any website could tell any browser from now on you will send this header, with 'this' being a unique identification. Sounds like something the EFF and the /. crowd would go rather nuts about, wouldn't they? Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
No, the PlumTree scripts are actually written in ASP. I did not mean to say that there 'had to be a way' in CF - that is what I was looking for. I will go investigate some of the other options - I just had not done any work with cfheader before and thought that was what it was for. Thanks -- Jeff -Original Message- From: Andre Mohamed [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 11:58 AM To: CF-Talk Subject: RE: Set HTTP Headers Jeff, It may well be that PlumTree is manipulating the headers before calling third party pages but that doesn't necessarily mean it is doing it via CF code. You can do v.limited header manipulation using CFHTTP...well, you can set the user-agent header, and you can set some cookies but other than that I'm not aware of another way using purely CF. It is not that difficult to write a CFX or JSP Custom Tag...or indeed access java.net.URL class to open a connection to port 80 or whatever and then manually/programmatically create an HTTP request (including the desired headers) to another resource...well, its not that difficult if you know some Java, but may be you don't! As other people have suggested, a quick and dirty way of testing is to use Telnet and manually create the requests- headers included. How much work do you want to do? André -Original Message- From: Jeff Chastain [mailto:[EMAIL PROTECTED]] Sent: 18 February 2003 17:43 To: CF-Talk Subject: RE: Set HTTP Headers Okay, let me clear this up then, because setting http header variables can be done. I have an instance of a PlumTree portal sitting on a set of production servers. I am trying to put together another application that PlumTree can be nice and talk to. Now, PlumTree passes information from the portal itself to third party applications via the http header. So somehow the PlumTree portal is manipulating the http header before it calls my function. The http header when I receive it (i.e. I can dump the header variables and see the values) includes things like ... CSP-CAN-SET = 'Gadget,User' CSP-GATEWAY-TYPE = 'PlumTree' CSP-PROTOCOL-VERSION = '1.1' My function can then, through the use of getHttpRequestData, see/read/use these header values. I am attempting to test my function on a development box - separate from the PlumTree system - and was trying to figure out how to set these variables before calling my function - i.e. make it look like PlumTree is doing the calling. Hopefully this is more clear. Thanks -- Jeff -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 11:23 AM To: CF-Talk Subject: Re: Set HTTP Headers Jeff Chastain wrote: The headers that are sent by the browser are all that I am interested in at this point. I am just trying to figure out how to pass in some test data. You need a custom browser for that. Telnet is a nice one ;-) The reason for this is quite simple actually. Suppose that just any website could tell any browser from now on you will send this header, with 'this' being a unique identification. Sounds like something the EFF and the /. crowd would go rather nuts about, wouldn't they? Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
You can do v.limited header manipulation using CFHTTP... well, you can set the user-agent header, and you can set some cookies but other than that I'm not aware of another way using purely CF. You can set any request headers you want with CFHTTP, as long as you're willing to use METHOD=POST. You'd simply use CFHTTPPARAM with TYPE=CGI. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Dave - I am not 100% following you here. Could you provide an example? Thanks -- Jeff -Original Message- From: Dave Watts [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 1:13 PM To: CF-Talk Subject: RE: Set HTTP Headers You can do v.limited header manipulation using CFHTTP... well, you can set the user-agent header, and you can set some cookies but other than that I'm not aware of another way using purely CF. You can set any request headers you want with CFHTTP, as long as you're willing to use METHOD=POST. You'd simply use CFHTTPPARAM with TYPE=CGI. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Your ad could be here. Monies from ads go to support these lists and provide more resources for the community. http://www.fusionauthority.com/ads.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
I have an instance of a PlumTree portal sitting on a set of production servers. I am trying to put together another application that PlumTree can be nice and talk to. Now, PlumTree passes information from the portal itself to third party applications via the http header. So somehow the PlumTree portal is manipulating the http header before it calls my function. The http header when I receive it (i.e. I can dump the header variables and see the values) includes things like ... CSP-CAN-SET = 'Gadget,User' CSP-GATEWAY-TYPE = 'PlumTree' CSP-PROTOCOL-VERSION = '1.1' My function can then, through the use of getHttpRequestData, see/read/use these header values. I am attempting to test my function on a development box - separate from the PlumTree system - and was trying to figure out how to set these variables before calling my function - i.e. make it look like PlumTree is doing the calling. Again, a command-line HTTP client will do this just fine. I'd use netcat for this, since it'll let you write a text file with the headers you want. You can use netcat on Unix or Windows platforms. The Windows version is available here: http://www.atstake.com/research/tools/network_utilities/ Your text file might look something like this: GET /yourdirectory/yourfile.cfm HTTP/1.0 Host: www.yourserver.com Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-powerpoint, application/vnd.ms-excel, application/msword, application/x-shockwave-flash, */* Accept-Language: en-us Accept-Encoding: gzip, deflate User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1.0.3705) Connection: Keep-Alive Csp-Can-Set: 'Gadget,User' Csp-Gateway-Type: 'PlumTree' Csp-Protocol-Version: '1.1' You could then call it like this: nc -vv www.yourserver.com 80 yourheaders.txt Note that the quotes in your headers aren't standard; I just copied the values in your example. I don't know if they should be there or not. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
You can set any request headers you want with CFHTTP, as long as you're willing to use METHOD=POST. You'd simply use CFHTTPPARAM with TYPE=CGI. Dave - I am not 100% following you here. Could you provide an example? cfhttp url=http://www.yourserver.com/yourdirectory/yourfile.cfm; method=post cfhttpparam type=cgi name=Host value=www.yourserver.com /cfhttp I seem to recall reading that you could send headers with CFHTTP using METHOD=GET if you chain them to the end of the USERAGENT parameter, too, but I haven't tried that myself. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Signup for the Fusion Authority news alert and keep up with the latest news in ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Re: Set HTTP Headers
Jeff Chastain wrote: -Original Message- From: Jochem van Dieten [mailto:[EMAIL PROTECTED]] Sent: Tuesday, February 18, 2003 11:23 AM To: CF-Talk Subject: Re: Set HTTP Headers Jeff Chastain wrote: The headers that are sent by the browser are all that I am interested in at this point. I am just trying to figure out how to pass in some test data. You need a custom browser for that. Telnet is a nice one ;-) Okay, let me clear this up then, because setting http header variables can be done. I have an instance of a PlumTree portal sitting on a set of production servers. Wouldn't PlumTree qualify as a custom browser, vs. IE and Mozilla etc as normal browsers? Jochem ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Set HTTP Headers
Wouldn't PlumTree qualify as a custom browser, vs. IE and Mozilla etc as normal browsers? Yes, but he doesn't have it installed on his development server, so that doesn't get him very far. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ voice: (202) 797-5496 fax: (202) 797-5444 ~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribeforumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq This list and all House of Fusion resources hosted by CFHosting.com. The place for dependable ColdFusion Hosting. Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4