[NAS-2485] Definitions-add-event-seeds.jsp should ignore lines prefixed with # or // Created: 20/Jan/16  Updated: 01/Feb/16  Resolved: 27/Jan/16

Status: Resolved
Project: NetarchiveSuite
Component/s: None
Affects Version/s: 5.1
Fix Version/s: None

Type: Improvement Priority: Minor
Reporter: Søren Vejrup Carlsen (Inactive) Assignee: Søren Vejrup Carlsen (Inactive)
Resolution: Fixed  
Labels: None
Remaining Estimate: Not Specified
Time Spent: 5m
Original Estimate: Not Specified

Verification:

TEST1 1 verifies if you keep the comments in the seedlist


 Description   

Definitions-add-event-seeds.jsp should ignore lines prefixed with # or //
Currently it misunderstands these lines as a URL with a lacking http://

These lines should just be skipped during ingest



 Comments   
Comment by Søren Vejrup Carlsen (Inactive) [ 01/Feb/16 ]

Verified as part of TEST1

Comment by Søren Vejrup Carlsen (Inactive) [ 22/Jan/16 ]

Now fixed. The fix also allows for Urls beginning with Uppercase HTTP:// or HTTPS:// .
Changed from

 if (seed.length() != 0) {
            if (!(seed.startsWith("http://") || seed.startsWith("https://"))) {
                seed = "http://" + seed; 

to

if (seed.length() != 0 && !seed.startsWith("#") && !seed.startsWith("//")) { // ignore empty lines and comments           
            if (!(seed.toLowerCase().startsWith("http://") || seed.toLowerCase().startsWith("https://"))) {
                 seed = "http://" + seed; 
Comment by Søren Vejrup Carlsen (Inactive) [ 20/Jan/16 ]

More precisely, the method PartialHarvest.processSeed() needs to filter out all lines starting with // or #

Comment by Søren Vejrup Carlsen (Inactive) [ 20/Jan/16 ]

The methods to correct is the EventHarvestUtil.addconfiguration*
.harvester/harvester-core/src/main/java/dk/netarkivet/harvester/webinterface/EventHarvestUtil.java
or maybe only the PartialHarvest.addSeeds() and PartialHarvest.addSeedsFromFile

Generated at Thu Mar 28 09:54:17 CET 2024 using Jira 9.4.15#940015-sha1:bdaa9cbecfb6791ea579749728cab771f0dfe90b.