Re: Weird issue with CFHTTP and redirect with cookie
Do I need to grab that session ID manually? I thought I might have to do that so I have tried to set redirect=false, but I can't get the session ID returned in the header You will need to read the cookies and send them on subsequent requests. The ASP.NET session ID is almost certainly a cookie. You should be able to get it without disabling the redirect, but you can always disable the redirect, read the cookie, then request the target of the redirect in a second CFHTTP call. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ http://training.figleaf.com/ Fig Leaf Software is a Veteran-Owned Small Business (VOSB) on GSA Schedule, and provides the highest caliber vendor-authorized instruction at our training centers, online, or onsite ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346641 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Weird issue with CFHTTP and redirect with cookie
On Tue, Aug 9, 2011 at 2:42 PM, kbutte...@yahoo.com kbutte...@yahoo.com kbutte...@yahoo.com wrote: Hi all, I am working on a screen-scraper app, and I have a site that has an disclaimer front page. You have to click on the I understand button and then you are redirected to the inspections page that I need to get to. I can get to the disclaimer page, but I cannot get cfhttp to get past that. Using httpFox, when I click the button, this is the sequence: Method Result Type URL POST 302 Redirect http:// .../_health/disclaimer_inspections.aspx GET200 text/htmlhttp://.../_health/inspections.aspx The values being posted are: Parameter:Value: __VIEWSTATE /wEPDwUJMzM5MDA2Nzk1ZGQ91EYKFinXdbt91hRyVwUbewQnFw== __EVENTVALIDATION /wEWAgKmztb+CwLdkpmPAXZ27WIyDXuA5VtsQPUU8V4WPmj9 btnOK I Understand The viewstate and eventvalidation are static values. Now, normally I don't have any problem with redirects, but I cannot get to the inspections page; the cfhttp keeps returning the disclaimer page. When I look at the headers, the disclaimer_inspections.aspx page is receiving an ASP.NET SessionID in the response header which is then being passed to the inspections.aspx Do I need to grab that session ID manually? I thought I might have to do that so I have tried to set redirect=false, but I can't get the session ID returned in the header Any ideas, suggestions, references would be greatly appreciated. Best, K Ben Nadel's cfhttpSession.cfc might be something that could assist you in your quest here. http://www.bennadel.com/blog/1171-CFHTTPSession-cfc-For-Multi-CFHttp-Requests-With-Maintained-Session.htm CFHTTPSession.cfc For Multi-CFHttp Requests With Maintained Session ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346643 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Weird issue with CFHTTP and redirect with cookie
Hi all, I am working on a screen-scraper app, and I have a site that has an disclaimer front page. You have to click on the I understand button and then you are redirected to the inspections page that I need to get to. I can get to the disclaimer page, but I cannot get cfhttp to get past that. Using httpFox, when I click the button, this is the sequence: Method Result Type URL POST 302 Redirect http://.../_health/disclaimer_inspections.aspx GET200 text/htmlhttp://.../_health/inspections.aspx The values being posted are: Parameter:Value: __VIEWSTATE /wEPDwUJMzM5MDA2Nzk1ZGQ91EYKFinXdbt91hRyVwUbewQnFw== __EVENTVALIDATION /wEWAgKmztb+CwLdkpmPAXZ27WIyDXuA5VtsQPUU8V4WPmj9 btnOK I Understand The viewstate and eventvalidation are static values. Now, normally I don't have any problem with redirects, but I cannot get to the inspections page; the cfhttp keeps returning the disclaimer page. When I look at the headers, the disclaimer_inspections.aspx page is receiving an ASP.NET SessionID in the response header which is then being passed to the inspections.aspx Do I need to grab that session ID manually? I thought I might have to do that so I have tried to set redirect=false, but I can't get the session ID returned in the header Any ideas, suggestions, references would be greatly appreciated. Best, Kathryn ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346610 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm
Re: Weird issue with CFHTTP and redirect with cookie
To clarify the below post, when I try to get the cookie by setting redirect=false in my cfhttp call, I get an error and the message from cfcatch is 302 Moved Temporarily So that's why I can't get the cookie. Hi all, I am working on a screen-scraper app, and I have a site that has an disclaimer front page. You have to click on the I understand button and then you are redirected to the inspections page that I need to get to. I can get to the disclaimer page, but I cannot get cfhttp to get past that. Using httpFox, when I click the button, this is the sequence: Method Result Type URL POST 302 Redirect http://... /_health/disclaimer_inspections.aspx GET200 text/html http://.../_health/inspections.aspx The values being posted are: Parameter:Value: __VIEWSTATE /wEPDwUJMzM5MDA2Nzk1ZGQ91EYKFinXdbt91hRyVwUbewQnFw== __EVENTVALIDATION /wEWAgKmztb+CwLdkpmPAXZ27WIyDXuA5VtsQPUU8V4WPmj9 btnOK I Understand The viewstate and eventvalidation are static values. Now, normally I don't have any problem with redirects, but I cannot get to the inspections page; the cfhttp keeps returning the disclaimer page. When I look at the headers, the disclaimer_inspections.aspx page is receiving an ASP.NET SessionID in the response header which is then being passed to the inspections.aspx Do I need to grab that session ID manually? I thought I might have to do that so I have tried to set redirect=false, but I can't get the session ID returned in the header Any ideas, suggestions, references would be greatly appreciated. Best, Kathryn ~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:346613 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm