Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 82417 Details for
Bug 206260
HTTP Import: log on dialog not show up for some urls
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed Patch
206260.txt (text/plain), 4.18 KB, created by
Rohit Shetty
on 2007-11-08 04:44:00 EST
(
hide
)
Description:
Proposed Patch
Filename:
MIME Type:
Creator:
Rohit Shetty
Created:
2007-11-08 04:44:00 EST
Size:
4.18 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.tptp.monitoring.logui >Index: src/org/eclipse/tptp/monitoring/logui/internal/wizards/ImportLogWizard.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.logui/src/org/eclipse/tptp/monitoring/logui/internal/wizards/ImportLogWizard.java,v >retrieving revision 1.105 >diff -u -r1.105 ImportLogWizard.java >--- src/org/eclipse/tptp/monitoring/logui/internal/wizards/ImportLogWizard.java 26 Aug 2007 19:44:59 -0000 1.105 >+++ src/org/eclipse/tptp/monitoring/logui/internal/wizards/ImportLogWizard.java 8 Nov 2007 09:41:21 -0000 >@@ -1996,7 +1996,7 @@ > } > LocalLogImportJob job = new LocalLogImportJob(LogUIMessages._7, handler, element); > final String filePath = (String) element.getValues().get("file_path"); >- if (filePath != null && (filePath.startsWith("ftp://") || filePath.startsWith("http://"))) { >+ if (filePath != null && (filePath.startsWith("ftp://") || filePath.startsWith("http://") || filePath.startsWith("https://"))) { > Authenticator authenticator = new Authenticator(){ > ImportPasswordAuthentication importLogAuthentication = null; > >#P org.eclipse.tptp.monitoring.la.core >Index: cbe.import/org/eclipse/tptp/monitoring/log/internal/core/CBEServiceFactoryImpl.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.la.core/cbe.import/org/eclipse/tptp/monitoring/log/internal/core/CBEServiceFactoryImpl.java,v >retrieving revision 1.2 >diff -u -r1.2 CBEServiceFactoryImpl.java >--- cbe.import/org/eclipse/tptp/monitoring/log/internal/core/CBEServiceFactoryImpl.java 18 Sep 2006 19:37:05 -0000 1.2 >+++ cbe.import/org/eclipse/tptp/monitoring/log/internal/core/CBEServiceFactoryImpl.java 8 Nov 2007 09:41:26 -0000 >@@ -23,7 +23,7 @@ > IImportHandler handler = null; > if (element.isLocalhost()){ > final String filePath = (String) element.getValues().get("file_path"); >- if (filePath != null && (filePath.startsWith("ftp://") || filePath.startsWith("http://"))) { >+ if (filePath != null && (filePath.startsWith("ftp://") || filePath.startsWith("http://") || filePath.startsWith("https://"))) { > handler = new LocalDownloadImportHandler(element ,context); > } > else{ >Index: cbe.import/org/eclipse/tptp/monitoring/log/internal/core/LocalDownloadImportHandler.java >=================================================================== >RCS file: /cvsroot/tptp/monitoring/org.eclipse.tptp.monitoring.la.core/cbe.import/org/eclipse/tptp/monitoring/log/internal/core/LocalDownloadImportHandler.java,v >retrieving revision 1.4 >diff -u -r1.4 LocalDownloadImportHandler.java >--- cbe.import/org/eclipse/tptp/monitoring/log/internal/core/LocalDownloadImportHandler.java 1 Mar 2007 17:13:15 -0000 1.4 >+++ cbe.import/org/eclipse/tptp/monitoring/log/internal/core/LocalDownloadImportHandler.java 8 Nov 2007 09:41:27 -0000 >@@ -19,6 +19,7 @@ > import java.io.InputStream; > import java.io.OutputStream; > import java.net.Authenticator; >+import java.net.HttpURLConnection; > import java.net.URL; > import java.net.URLConnection; > import java.util.Date; >@@ -61,8 +62,28 @@ > File file; > String key = GLAHelper.getAdapterPathKey(parserInput); > try { >- >+ > URLConnection connection = (new URL(fileURL)).openConnection(); >+ //fix for bugzilla 206260 >+ if(connection instanceof HttpURLConnection) >+ { >+ // Redirect a maximum of five times. This is a generally accepted check which makes sure that >+ // multiple redirects are supported, but this is not infinite. >+ for(int i =0; i < 5;i++) >+ { >+ int retCode = ((HttpURLConnection)connection).getResponseCode(); >+ if(retCode == HttpURLConnection.HTTP_MOVED_PERM || retCode == HttpURLConnection.HTTP_MOVED_TEMP) >+ { >+ String location = connection.getHeaderField("location"); >+ connection = (new URL(location)).openConnection(); >+ } >+ else >+ { >+ break; >+ } >+ } >+ } >+ //end of fix for bugzilla 206260 > InputStream inputStream = connection.getInputStream(); > SimpleDateFormat format = new SimpleDateFormat("yyyymmddhhMMss"); //$NON-NLS-1$ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 206260
:
82417
|
82555
|
82560
|
82621
|
82640
|
83937
|
83938