I don't know how this *ever* worked. One cannot have both content *and* a redirect in a response. <cflocation> sets the HTTP status header to do a 302 redirect, but for that to work, one must've have yet sent any content down to the browser. Because the first thing that gets sent in a response are the headers. Once the response has started being sent to the browser one cannot change the HTTP status code, so one cannot use <cflocation> to redirect.
The only difference perhaps is that CF9 didn't used to send any content down to the browser until the end of the request or a <cfflush> is encountered, but maybe CF10 starts spooling the response down to the browser as soon as it has [some amount] of content there? Either way, the code is "wrong", and relies on a vagary of CF's behaviour to work, rather than it working by design. -- Adam On Wednesday, 20 November 2013 07:08:18 UTC, Mark Picker wrote: > > Hi, > > > > I did post this to stackoverflow a month or so ago ( > http://stackoverflow.com/questions/19416810/cflocation-no-longer-working-in-cf10) > > but didn’t end up with any follow up answers after working out the real > source of the problem. Hoping someone on here has some ideas. > > > > I have a multi-step process that runs overnight. The process is made up of > about 10 files that chain together using cflocation (only follows > cflocation if no errors were detected). This was working fine until I > moved from CF9 to CF10. Code works fine until it hits cflocation tag. Has > anyone seen an issue with cflocation not working in CF10 vs. CF9? > > > > I’ve been able to reproduce this problem with 2 files: > > > *index.cfm* > > > <h1>Testing cflocation</h1> > > > > <cfloop index="i" from="1" to="7000" ><!--- For me it stops working once > the loop goes beyond 6808 rows ---> > > row <cfoutput>#i#</cfoutput>: > abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789abcdefghijklmnopqrstuvwxyz0123456789<br/> > > </cfloop> > > > > <p>Now loading resultpage via cflocation</p> > > <cflocation url="resultpage.cfm" addtoken="false"> > > > *resultpage.cfm* > > > <h1>Made it!</h1> > > <p>Reload the <a href="index.cfm">first page</a></p> > > > > In my testing I found that if I looped 6808 times it works but 6809 times > fails. With 7000 records we are only talking about a 36 KB file….any clues > why this is failing only in CF10? > > > > Cheers > > Mark > -- You received this message because you are subscribed to the Google Groups "cfaussie" group. To unsubscribe from this group and stop receiving emails from it, send an email to cfaussie+unsubscr...@googlegroups.com. To post to this group, send email to cfaussie@googlegroups.com. Visit this group at http://groups.google.com/group/cfaussie. For more options, visit https://groups.google.com/groups/opt_out.