House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Search cf-talk

July 04, 2009

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
       1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31   

Home /  Groups /  ColdFusion Talk (CF-Talk)

problems with cflocation and redirect will never complete

  << Previous Post |  RSS |  Sort Oldest First |  Sort Latest First |  Subscribe to this Group Next >> 
Hi,
Casey Dougall
04/25/08 02:18 P
Casey,
Marco Antonio C. Santos
04/25/08 03:48 P
Casey Dougall wrote:
Ian Skinner
04/25/08 04:04 P
Casey Dougall wrote:
Ian Skinner
04/25/08 04:32 P
Ian Skinner wrote:
Ian Skinner
04/25/08 04:35 P
Cfhttp to the rescue ;)
Dominic Watson
04/25/08 04:33 P
@ Casey
Gerald Guido
04/25/08 04:52 P
>@Dom
Dominic Watson
04/25/08 05:01 P
I'll try this some more in the morning...
Casey Dougall
04/25/08 06:25 P
Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Casey Dougall
04/25/2008 02:18 PM

Hi, I'm having troubles with a cflocation script. First Script finds the ID that it needs and then should perform a <cflocation> the the script that runs a process that generates an xml file. At that end of that script, it should do another cflocation back to the original script and find the next ID that needs and run through this process all over again. When I try running this in the browser, firefox returns the following. Firefox has detected that the server is redirecting the request for this address in a way that will never complete. I'm trying to select 1 ID at a time, run the process, then <cflocation> back to the original script and run again until it's finished but it only goes through 5 to 10 id's before I hit this error. Coldfusion Scheduled task didn't complete this as I had hoped either. Any ideas of how I can get around this issue. If you need to generate an XML file for 1000 ID's each may end up being 1 to 2 meg in size. This was the best way I could figure to get around script timeouts. Now I get "Firefox has detected that the server is redirecting the request for this address in a way that will never complete." -- Casey

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Marco Antonio C. Santos
04/25/2008 03:48 PM

Casey, my suggestion is to change your cflocation with Java redirect routine. Please try this: <cfscript>             getPageContext().getResponse().sendRedirect(local.YourURL); </cfscript> Cheers Marco Antonio On Fri, Apr 25, 2008 at 3:17 PM, Casey Dougall < casey@uberwebsitesolutions.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Casey Dougall
04/25/2008 03:59 PM

On Fri, Apr 25, 2008 at 3:47 PM, Marco Antonio C. Santos < marcoacsantos@gmail.com> wrote: ----- Excess quoted text cut - see Original Post for more ----- Still no luck...  It runs for about the same amount of time and then thinks it's in an infinite loop and quits. This is also a BlueDragon .Net Server. I haven't had a project on one of those before. Maybe there is another way to get around due to this...

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Skinner
04/25/2008 04:04 PM

Casey Dougall wrote: > Any ideas of how I can get around this issue. If you need to generate an XML > file for 1000 ID's each may end up being 1 to 2 meg in size. This was the > best way I could figure to get around script timeouts. >   What about resetting the script timeouts to a value large enough to accomplish your task either globally in the administrator or locally with the <cfsetting...> tag? > Now I get "Firefox > has detected that the server is redirecting the request for this address in > a way that will never complete." Well, from Firefox's point of view that is exactly what you are doing.   It can't see what the server is doing and understand that it is involved in an iterative loop that will eventually end.  It can only see that is is getting the same sequence of 301 redirects over and over.  The developers of browsers have intelligently made them so that they do not get trapped in an endless loop like this.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Casey Dougall
04/25/2008 04:16 PM

----- Excess quoted text cut - see Original Post for more ----- Right, so i tried appending a URL variable to the end that changes everytime the script runs, but that didn't work either.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Skinner
04/25/2008 04:32 PM

Casey Dougall wrote: > > Right, so i tried appending a URL variable to the end that changes everytime > the script runs, but that didn't work either. Well a different query, AKA url, variable does not change the resource redirected to.  If this where to work you would somehow have to change the base path somehow.  Probably using some type of "Search Safe" URL scheme. But my gut tells me that tricking the browser to make 1000 requests|redirects is the best way to resolve this requirement.

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Ian Skinner
04/25/2008 04:35 PM

Ian Skinner wrote: > But my gut tells me that tricking the browser to make 1000 > requests|redirects is the best way to resolve this requirement. ... is **NOT** the best way to resolve this ...

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dominic Watson
04/25/2008 04:33 PM

Cfhttp to the rescue ;) <cfloop query="theIds">     <cfhttp url="addressthatProcessesTheId" method="get">         <cfhttpparam type="url" name="theId" value="#theId#" />     </cfhttp> </cfloop> HTH Dominic ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Gerald Guido
04/25/2008 04:52 PM

@ Casey You said that it was a problem with Time outs? You can override the servers default time out using cfsetting. ex: <cfsetting requestTimeOut = "5000"> If that doesn't solve the problem Dom's idea looks good. @Dom Stop making sense. ;) HTH, G On Fri, Apr 25, 2008 at 4:32 PM, Dominic Watson < watson.dominic@googlemail.com> wrote: ----- Excess quoted text cut - see Original Post for more -----

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dominic Watson
04/25/2008 05:01 PM

>@Dom > > Stop making sense. ;) Once it was better than chocolate and then I thought no I want to select more than one at a time how can I do that please :p How's that? Back to sense and using cfhttp, you will more than likely still need to set an extended timeout to stop the request timing out (@Gerald, I think the original problem was that the original request was maxing out memory because of huge amounts of Xml strings): <cfsetting requesttimeout="#appropriateTimeout#" /> <cfloop query="theIds">    <cfhttp url="addressthatProcessesTheId" method="get">        <cfhttpparam type="url" name="theId" value="#theId#" />    </cfhttp> </cfloop> Anyways, Domininc -- Blog it up: http://fusion.dominicwatson.co.uk

Top  |   Parent  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Casey Dougall
04/25/2008 06:25 PM

I'll try this some more in the morning... Thanks Casey

Top  |   Reply  |   Original Post  |   RSS Feed  |   Subscribe to this Group
Author:
Dave Watts
04/25/2008 07:29 PM

----- Excess quoted text cut - see Original Post for more ----- Why not do this asynchronously? Redirecting the browser a thousand times strikes me as a bad idea even if it did work. But if you do need a synchronous solution in CF, why not use a META refresh? <meta http-equiv="refresh" content="5;url=http://yourserver.com/yourfile?id=#whatever#"/>; Processing #whatever# of #total# ... Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ Fig Leaf Training: Adobe/Google/Paperthin Certified Partners http://training.figleaf.com/ WebManiacs 2008: the ultimate conference for CF/Flex/AIR developers! http://www.webmaniacsconference.com/


<< Previous Thread Today's Threads Next Thread >>

Mailing Lists