manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1430980 - in /manifoldcf/trunk/connectors: livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/ meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/ rss/connector/src/main/java/or...
Date Wed, 09 Jan 2013 18:00:39 GMT
Author: kwright
Date: Wed Jan  9 18:00:39 2013
New Revision: 1430980

URL: http://svn.apache.org/viewvc?rev=1430980&view=rev
Log:
Add accept headers everywhere, since httpclient no longer does this automatically

Modified:
    manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
    manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/CommonsHTTPSender.java
    manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ThrottledFetcher.java
    manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/CommonsHTTPSender.java
    manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
    manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java

Modified: manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java?rev=1430980&r1=1430979&r2=1430980&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
(original)
+++ manifoldcf/trunk/connectors/livelink/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/livelink/LivelinkConnector.java
Wed Jan  9 18:00:39 2013
@@ -517,6 +517,7 @@ public class LivelinkConnector extends o
 
       HttpClient client = getInitializedClient(contextMsg);
       HttpGet method = new HttpGet(getHost().toURI() + ingestHttpAddress);
+      method.setHeader(new BasicHeader("Accept","*/*"));
       try
       {
         int statusCode = executeMethodViaThread(client,method);
@@ -3850,6 +3851,8 @@ public class LivelinkConnector extends o
     Long readSize = null;
 
     HttpGet method = new HttpGet(getHost().toURI() + ingestHttpAddress);
+    method.setHeader(new BasicHeader("Accept","*/*"));
+
     ExecuteMethodThread methodThread = new ExecuteMethodThread(client,method);
     methodThread.start();
     try
@@ -4070,6 +4073,7 @@ public class LivelinkConnector extends o
     if (Logging.connectors.isDebugEnabled())
       Logging.connectors.debug("Livelink: Session authenticating via http "+contextMsg+"...");
     HttpGet authget = new HttpGet(getHost().toURI() + createLivelinkLoginURI());
+    authget.setHeader(new BasicHeader("Accept","*/*"));
     try
     {
       if (Logging.connectors.isDebugEnabled())

Modified: manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/CommonsHTTPSender.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/CommonsHTTPSender.java?rev=1430980&r1=1430979&r2=1430980&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/CommonsHTTPSender.java
(original)
+++ manifoldcf/trunk/connectors/meridio/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/meridio/CommonsHTTPSender.java
Wed Jan  9 18:00:39 2013
@@ -305,6 +305,8 @@ public class CommonsHTTPSender extends B
         msg.getContentType(msgContext.getSOAPConstants())));
     }
     
+    method.setHeader(new BasicHeader("Accept","*/*"));
+
     method.setHeader(new BasicHeader(HTTPConstants.HEADER_SOAP_ACTION,
       "\"" + action + "\""));
     method.setHeader(new BasicHeader(HTTPConstants.HEADER_USER_AGENT, Messages.getMessage("axisUserAgent")));

Modified: manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ThrottledFetcher.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ThrottledFetcher.java?rev=1430980&r1=1430979&r2=1430980&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ThrottledFetcher.java
(original)
+++ manifoldcf/trunk/connectors/rss/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/rss/ThrottledFetcher.java
Wed Jan  9 18:00:39 2013
@@ -384,6 +384,8 @@ public class ThrottledFetcher
       // Set all appropriate headers
       executeMethod.setHeader(new BasicHeader("User-Agent",userAgent));
       executeMethod.setHeader(new BasicHeader("From",from));
+      executeMethod.setHeader(new BasicHeader("Accept","*/*"));
+
       if (lastETag != null)
         executeMethod.setHeader(new BasicHeader("ETag",lastETag));
       if (lastModified != null)

Modified: manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/CommonsHTTPSender.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/CommonsHTTPSender.java?rev=1430980&r1=1430979&r2=1430980&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/CommonsHTTPSender.java
(original)
+++ manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/CommonsHTTPSender.java
Wed Jan  9 18:00:39 2013
@@ -305,6 +305,8 @@ public class CommonsHTTPSender extends B
         msg.getContentType(msgContext.getSOAPConstants())));
     }
     
+    method.setHeader(new BasicHeader("Accept","*/*"));
+
     method.setHeader(new BasicHeader(HTTPConstants.HEADER_SOAP_ACTION,
       "\"" + action + "\""));
     method.setHeader(new BasicHeader(HTTPConstants.HEADER_USER_AGENT, Messages.getMessage("axisUserAgent")));

Modified: manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java?rev=1430980&r1=1430979&r2=1430980&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
(original)
+++ manifoldcf/trunk/connectors/webcrawler/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/webcrawler/ThrottledFetcher.java
Wed Jan  9 18:00:39 2013
@@ -1493,6 +1493,7 @@ public class ThrottledFetcher
       // Set all appropriate headers and parameters
       fetchMethod.setHeader(new BasicHeader("User-Agent",userAgent));
       fetchMethod.setHeader(new BasicHeader("From",from));
+      fetchMethod.setHeader(new BasicHeader("Accept","*/*"));
         
       // Use a custom cookie store
       CookieStore cookieStore = new OurBasicCookieStore();

Modified: manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java?rev=1430980&r1=1430979&r2=1430980&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
(original)
+++ manifoldcf/trunk/connectors/wiki/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/wiki/WikiConnector.java
Wed Jan  9 18:00:39 2013
@@ -1671,6 +1671,7 @@ public class WikiConnector extends org.a
     HttpGet method = new HttpGet(URL);
     if (userAgent != null)
       method.setHeader(new BasicHeader("User-Agent",userAgent));
+    method.setHeader(new BasicHeader("Accept","*/*"));
     return method;
   }
 



Mime
View raw message