Login

    Register

Managed Hosting

PROJECT CATEGORIES

 

Paragator
Project Home Known Issues Contact Project

Paragator Issue: Can not fetch feeds through proxy

Name: Can not fetch feeds through proxy
ID: 1
Project: Paragator
Type: Enhancement
Area: Code
Severity: Normal
Status: Open
Related URL:
Creator: Tom Chiverton
Created: 08/04/09 5:57 AM
Updated: 08/04/09 6:10 AM
Description: Paragator can not pass proxy details to CFFEED, so if these are needed, it's not able to work.

A patch should follow shortly.
History: Created by tom.chiverton@halliwells.com (Tom Chiverton) : 08/04/09 5:57 AM

Comment by tom.chiverton@halliwells.com (Tom Chiverton) : 08/04/09 6:10 AM
--- aggregator.cfc.orig 2008-02-14 17:11:43.000000000 +0000
+++ aggregator.cfc 2009-08-04 11:09:46.000000000 +0100
@@ -6,17 +6,31 @@
History : feedtitle, feeddescription support (6/10/07 tsharp)
: added opmlToFeedQuery (6/10/07 tsharp)
: Use request scope counter instead of createUUID, thanks to Dan S for idea (6/10/07)
- : bug in search and caseinsenstive (rkc 2/12/08)
- : use updateddate for atom feeds (rkc 2/14/08)
+ : bug in search and caseinsenstive (rkc 2/12/08)8)
+ : use updateddate for atom feeds (rkc 2/14/08)8)
+ : http proxy support (tjc 4/8/09)
--->

-
<cfcomponent displayName="Paragator" output="false">

<!--- Use this column list since not all feeds return the same cols. --->
<cfset variables.collist = "authoremail,authorname,authoruri,categorylabel,categoryscheme,categoryterm,comments,content,contentmode,contentsrc,contenttype,contributoremail,contributorname,contributoruri,createddate,expirationdate,feedtitle,feeddescription,id,idpermalink,linkhref,linkhreflang,linklength,linkrel,linktitle,publisheddate,rights,rsslink,source,sourceurl,summary,summarymode,summarysrc,summarytype,title,updateddate,uri,xmlbase,link,version,[date]">
<!--- used for naming --->
<cfset variables.requestkey = "AggregatorCFCThread">
+
+ <cfset variables.useProxy=false>
+
+ <cffunction name="setProxyDetails" output="false">
+ <cfargument name="host" _required="true" _type="string">
+ <cfargument name="port" _required="false" default="8080" _type="numeric">
+ <cfargument name="user" _required="false" default="" _type="string">
+ <cfargument name="password" _required="false" default="" _type="string">
+ <cfset variables.useProxy=true>
+ <cfset variables.proxyHost=arguments.host>
+ <cfset variables.proxyPort=arguments.port>
+ <cfset variables.proxyUser=arguments.user>
+ <cfset variables.proxyPassword=arguments.password>
+ </cffunction>

<cffunction name="getCounter" access="private" returnType="numeric" output="false">
<cfset var needInit = false>
@@ -63,9 +77,17 @@

<cfloop index="x" from="1" to="#arrayLen(arguments.feeds)#">
<cfset tname = "thread_#getCounter()#">
- <cfthread action="run" name="#tname#" url="#arguments.feeds[x]#">
- <cffeed source="#attributes.url#" query="thread.entries" properties="thread.metadata" timeout="10">
- <!--- based on the type of feeds, lets munge things a bit --->
+ <cfthread action="run" name="#tname#" url="#arguments.feeds[x]#">
+ <cfif variables.useProxy>
+ <cffeed source="#attributes.url#" query="thread.entries" properties="thread.metadata" timeout="10"
+ proxyServer="#variables.proxyHost#"
+ proxyPort="#variables.proxyPort#"
+ proxyUser="#variables.proxyUser#"
+ proxyPassword="#variables.proxyPassword#">
+ <cfelse>
+ <cffeed source="#attributes.url#" query="thread.entries" properties="thread.metadata" timeout="10">
+ </cfif>
+ <!--- based on the type of feeds, lets munge things a bit --->
<cfset queryAddColumn(thread.entries, "link", "varchar", arrayNew(1))>
<cfset queryAddColumn(thread.entries, "version", "varchar", arrayNew(1))>
<cfset queryAddColumn(thread.entries, "date", "date", arrayNew(1))>

To add a comment to this bug, please login using the link above.