Why would that CFIF statement in the onRequestStart method
interfere
with the CFHTTP block in index.cfm?
Because it is doing exactly what you are telling it to do.
The if statement says if the page is not index.cfm and
session.loggedIn
is not defined, then go to login.cfm.
Then you run a cfhttp tag which makes a request to a page
named
testPost.cfm which is NOT index.cfm. And since the CF client
used to
make that http request has not been LOGGED in and does not
have a
session.loggedIn value, the request is redirected to
login.cfm. A bit
of an endless loop there.
Remember when one uses <CFHTTP...> it is creating
normal http request
just like any other client using a very basic built in
'browser'. It is
subject to any and all restrictions applied to requests.