Skip to main content
Participant
April 12, 2006
Question

cfhttp GET cookie issue

  • April 12, 2006
  • 3 replies
  • 560 views
I want to cfhttp get a file from a yahoo groups site that I belong to. I am trying to use cfhttp GET to do this. You wouldn't think it'd be rocket science... but maybe it is. Here's the code, stripped for privacy:

{cfhttp
method = "Get"
url=" http://groups.yahoo.com/group/stargate/message/1.html"
path="C:\Inetpub\wwwroot\Domains\ [etc matching my hard drive] "
userAgent = "Cold Fusion"
resolveURL = "no"
throwOnError = "no"
file="1.html"}
{cfhttpparam name="G" type="Cookie" value="long-ol-string-entered-as-cookie-in-myfilezilla-cookies-area"}
{/cfhttp}

With or without adding in the username/pw params, no matter what I do, it gets the first part, writes the file which tells me in the html content:

{div class="ygrp-contentblock"}
Your browser is not accepting our cookies. To view this page,
please set your browser preferences to accept cookies. (Code 2)
{a href=" http://groups.yahoo.com/group/stargate/message/1.html"}Try Again{/a}
{/div}

I am guessing that CF's idea to "encrypt" cookies is somehow related to this, that yahoo is not recognizing the cookie that I am providing. Surely this has got to be a very common need of people! -- to get a page which requires a cookie to be passed -- and I can't believe there is so little decent documentation on it on the livedocs area.

Does anybody know of a solution to this? Is there any way to get CF *not* to encrypt the cookie? Or some other work around??
This topic has been closed for replies.

3 replies

BKBK
Community Expert
Community Expert
June 6, 2006
There is one way to test. Visit the pages manually, to get them to deposit all the cookies. Copy the cookie details to your Coldfusion code.

Participant
June 5, 2006
Is there any way to determine all the cookies the page wants? Is there any way for the site to save cookies to the coldfusion browser that can be caught/used by the application?
Participating Frequently
April 12, 2006
Most likely you are not providing all cookies that are expected.