Commit Graph
626 Commits
Author SHA1 Message Date
nlevitt b064d43db5 Fix HER-1792 backslashes in urls can in some cases really mean backslashes
(specifically, when they're in the query string)
* UURIFactory.java
    fixup() - replace \ with / up to the first ? in the url, instead of
    anywhere in the url
    and update comments
* UURIFactoryTest.java
    backslash test
2011-04-19 02:11:20 +00:00
gojomo 2be8af10a9 * ArchiveReaderFactory
comment about possible weakness in checking response to Range:d request
2011-04-16 08:06:03 +00:00
gojomo 8bc70dd82a [HER-1881] GZIPMembersInputStream.compressedSkip(long) ignores return value of in.skip(offset)
* GZIPMembersInputStream
    use ByteStreams.skipFully to skip desired amount or hit EOF
2011-04-16 07:43:53 +00:00
gojomo 991a67e0e4 Post 3.1.0-beta
* **/pom.xml
    chnge version-identifier to "3.1.0-SNAPSHOT"
2011-04-15 22:28:52 +00:00
gojomo 52d00a9917 Prep for 3.1.0-beta
* **/pom.xml
    increment declared version
2011-04-15 18:09:43 +00:00
gojomo 1a2ec76805 comment typo, missing serialization ID 2011-04-15 18:08:12 +00:00
nlevitt 2df2584573 Fix HER-1880 robots.txt less specific Allow overrides more specific Disallow
* RobotsDirectives.java
    - use plain ConcurrentSkipListSet<String> instead of PrefixSet, to
      maintain complete list of prefixes, so we can know the longest match
    - allows(String) - return true if longest matching Allow prefix is longer
      than or equal to longest matching Disallow prefix
* RobotstxtTest.java
    flip expected result of test of generic Allow against specific Disallow
2011-04-14 02:25:43 +00:00
nlevitt 75b7b9066c Followup to r7127 - add jna to eclipse classpath
* .classpath
    <classpathentry kind="var" path="M2_REPO/net/java/dev/jna/jna/3.2.3/jna-3.2.3.jar"/>
2011-04-13 00:54:26 +00:00
gojomo 722a8549ab [HER-1821] H3: implement hard-link-based BDB/state-dir checkpointing
* BdbModule.java
    new setting, useHardLinkCheckpoints, default true
    doCheckpoint now creates hard-links to active log files from the in-environment checkpoint-dir
    doRecover now relinks from checkpoint-dir files, when available, in preference to whatever is already in the env-dir
* pom.xml
    bring in JNA for native calls
* CLibrary
    wrapper for the link() function
2011-04-12 00:09:51 +00:00
gojomo 6388dc7605 [HER-1878] NullPointerException when parsing (some?) WARC files over slow connections
* GZIPMembersInputStream
    override OpenJDK7GZIPInputStream.readTrailer to not rely on available() as indicator of end-of-stream
    fix membersIterator hasNext() to also not rely on available() as indicator of end-of-stream
* ArchiveReader
    change innerHasNext to peek one byte (using mark/reset) rather than rely on available() as indicator of end-of-stream
    remove redundant getInputStream accessor in favor of field-name-matching getIn/setIn
* ArchiveReaderFactory, (W)ARCReaderFactory
    remove no-longer-necessary RepositionableStream references
    use getIn() rather than getInputStream()
2011-04-11 22:58:05 +00:00
gojomo bd45720bae improved comments about new naming conventions/default-template 2011-04-11 22:49:01 +00:00
nlevitt f2ad45045b * FetchWhois.java
fix whois uri syntax - add missing "/" token
2011-04-07 17:17:48 +00:00
nlevitt 020ef44551 * FetchWhois.java
class-level javadoc including informal specification of whois uri
2011-04-07 06:44:06 +00:00
gojomo f4cf64af29 [HER-1053] compressed HTTP fetch: "Accept-encoding: gzip"
[HER-728] Offer replay stream that has been un-chunked (whether because response was HTTP/1.1 or used chunked in HTTP/1.0 against spec)
[HER-1876] Offer HTTP/1.1 option - for chunked transfer-encoding (but not persistent connections) 
* (all)
    update to use new (decoded-as-necessary) content streams/CharSequences
2011-04-06 20:54:16 +00:00
gojomo 3a53da1073 adapted tests for other changes 2011-04-06 20:52:06 +00:00
gojomo e29e7dd36a comment typo 2011-04-06 20:51:40 +00:00
gojomo 9f3b8d11db * ReplayInputStream
constructor comment about using destroy()
2011-04-06 20:51:14 +00:00
gojomo c5eb3ffd53 [HER-1053] compressed HTTP fetch: "Accept-encoding: gzip"
[HER-728] Offer replay stream that has been un-chunked (whether because response was HTTP/1.1 or used chunked in HTTP/1.0 against spec)
[HER-1876] Offer HTTP/1.1 option - for chunked transfer-encoding (but not persistent connections) 
* FetchHTTP
    add 'acceptCompression' and 'useHTTP11' properties, both default false
* Recorder
    track whether recorded-input is transfer-encoded (chunked) or content-encoded (gzip etc)
    offer alternate replay streams for 
      (1) raw 'messageBody'; 
      (2) entity (un-chunked if necessary)
      (3) content (decompressed if necessary)
    always content & GenericReplayCharSequence for CharSequence replays
* GenericReplayCharSequence
    always use a stream (rather than random-access buffer)
    always decode to prefix buffer first, so short content never touches disk no matter the encoding
* InMemoryReplayCharSequence
    deleted; 'Generic' now works similarly for small content and anyway random-access for single-byte-encodings is now rarely possible (given deconding streams)
* RecordingInputStream, RecordingOutputStream
    adjust for changed stream names, functionality moved to Recorder
* ReplayCharSequence
    use Charset instances rather than names
* ReplayInputStream
    add convenience constructor (and tmp-file-destroy) for copying any other inputStream into a seekable ReplayInputStream
2011-04-06 20:42:43 +00:00
gojomo 3f98fc248b * ArchiveUtils
(readFully) return actual number of bytes read into array
* FileUtils
    (readFullyToFile) simplify; also return total bytes read
2011-04-06 20:22:30 +00:00
nlevitt b79308b2e0 Part of HER-1875 - socket timeout for whois fetcher
* FetchWhois.java
2011-04-05 01:22:01 +00:00
nlevitt 81cda7be59 HER-1875 followup - override SocketFactory to support connect timeout for ftp
data connection
2011-04-05 01:21:09 +00:00
nlevitt 653f24e713 Avoid exception - "org.springframework.beans.NotWritablePropertyException:
Invalid property 'timeoutSeconds' of bean class
[org.archive.modules.fetcher.FetchFTP]: Bean property 'timeoutSeconds' is not
writable or has an invalid setter method. Does the parameter type of the setter
match the return type of the getter?"
* FetchFTP.java
    change setTimeoutSeconds(Integer) to setTimeoutSeconds(int)
2011-04-04 20:10:54 +00:00
nlevitt 8e7b9a5fdf Fix HER-1875 FetchFTP needs socket timeout
* FetchFTP.java
    setSoTimeoutMs(), getSoTimeoutMs()
    (init) - set default value of 20000 ms, same as FetchHTTP
    fetch() - set various timeouts on FTPClient - effectively sets connect
    timeout and socket timeout on control connection, and socket timeout on
    data connection (notably, does not set connect timeout on data connection
    w/ current commons-net)
2011-04-04 19:50:56 +00:00
gojomo 1395854f9a [HER-1865] JDK6u23 breaks GzippedInputStream & W/ARCReaders with different GZIP handling
* OpenJDK7GZIPInputStream.java, OpenJDK7InflatedInputStream.java
    backport the working GZIP implementation from OpenJDK7, with minimal 
    renames/imports/private-to-protected changes to enable member-at-a-time reading
* GZIPMembersInputStream
    base on OpenJDK7 implementation to avoid pre- & post-6u23 codepaths, and 6u23/24 readHeader bug
    override readTrailer to set member-end; update comment to reflect end-uncertainty without EOF-per-member-mode
* GZIPMembersInputStreamTest, ARCWriterTest
    test tweaks
2011-03-30 02:42:26 +00:00
gojomo e6e415b9d9 [HER-1865] JDK6u23 breaks GzippedInputStream & W/ARCReaders with different GZIP handling
* OpenJDK7GZIPInputStream.java, OpenJDK7InflatedInputStream.java
    backport the working GZIP implementation from OpenJDK7, with minimal 
    renames/imports/private-to-protected changes to enable member-at-a-time reading
* GZIPMembersInputStream
    base on OpenJDK7 implementation to avoid pre- & post-6u23 codepaths, and 6u23/24 readHeader bug
    override readTrailer to set member-end; update comment to reflect end-uncertainty without EOF-per-member-mode
* GZIPMembersInputStreamTest, ARCWriterTest
    test tweaks
2011-03-30 02:42:04 +00:00
nlevitt e60fd8b0e1 * XmlMarshaller.java
marshalDocument() - SAXException can wrap other exceptions, e.g.
    EOFException when tcp connection is broken; thus, in case of IOException,
    rather than throwing a RuntimeException, re-throw the wrapped IOException
    (unfortunately in that case we still get a massive stack trace in the log,
    but at least it comes from the appropriate spot and is not too misleading)
2011-03-02 01:34:19 +00:00
nlevitt 013b5e394d Different fix for HER-1872: additional property preloadSourceUrl. Use either
that or preloadSource (a filesystem path), rather than try to handle both
possibilities with one string.
* PersistLoadProcessor.java
* PersistProcessor.java
2011-03-02 01:24:28 +00:00
nlevitt 17b12ca19b * HostsReport.java
url-encode hosts (other than "dns:") in host report, in case of hostname
    containing whitespace or other unusual characters, which can happen
2011-03-01 23:43:58 +00:00
gojomo 3fc3d324e8 * ArchiveReaderFactory
avoid misinterpreting a "c:" local path as a URI scheme
2011-02-26 01:04:26 +00:00
nlevitt d97d4aa8cb Fix HER-1872 PersistLoadProcessor preloadSource does not support url
(regression from h1)
* PersistLoadProcessor.java
    change preloadSource from ConfigFile to String, allowing the logic in
    PersistProcessor.copyPersistSourceToHistoryMap() to decide how to load it
2011-02-26 00:59:35 +00:00
gojomo 2f9a8b860d * GZIPMembersInputStream
ensure mark()ing more frequently, when reset to before current position won't be needed
* ArchiveReaderFactory
    avoid misinterpreting a "c:" local path as a URI scheme
2011-02-26 00:59:10 +00:00
gojomo fe5363feb0 * GzipMembersInputStreamTest
test with 6 small members
2011-02-24 22:13:46 +00:00
gojomo 9fef4f1f26 * ArchiveReader
better logging of caught/recovery-attempted IOException
* GZIPMemberInputStream
    handling of previously-unrecognized case in pre-JDK6u23: attempt at read() exhausts inflater with no new bytes available (previous nonzero-length read had not indicated inflater finished)
2011-02-24 19:22:50 +00:00
gojomo bb07080e02 [HER-1865] JDK6u23 breaks GzippedInputStream & W/ARCReaders with different GZIP handling
* ArchiveReaderFactoryTest
    test cases for generic reader-get methods -- one of which had obsolete STREAM_ALL=-1 problem
2011-02-23 01:09:05 +00:00
gojomo c6a94c2264 [HER-1865] JDK6u23 breaks GzippedInputStream & W/ARCReaders with different GZIP handling
* ArchiveReaderFactory
    discard obsolete -1 flag value creating problems with usual uses
2011-02-23 00:24:47 +00:00
nlevitt f03b1ac689 * URIAuthorityBasedQueueAssignmentPolicy.java
rename "whois" queue to "whois..." to avoid conflicting with queue for
    theoretical hostname "whois"
2011-02-19 02:10:39 +00:00
nlevitt b9c408cb07 Change form of generic serverless whois url to e.g. whois:archive.org
* FetchWhois.java
* UURIFactory.java
2011-02-19 02:00:18 +00:00
gojomo a6f3b7db25 * ARCWriterTest
test inspired by Erik Hetzner's HER-1865 test code
2011-02-19 00:35:09 +00:00
nlevitt 368ff65286 * FetchWhois.java
add license preamble
2011-02-17 22:52:37 +00:00
nlevitt 4991b295bc HER-1645 whois fetcher
* URIAuthorityBasedQueueAssignmentPolicy.java
    whois urls all go in special "whois" queue
* PreconditionEnforcer.java, CrawlURI.java
    move markPrerequisite() method from PreconditionEnforcer to CrawlURI
* profile-crawler-beans.cxml
    commented-out whois fetcher clause
* FetchStatusCodes.java
    new status codes for whois
* ServerCache.java
    getHostFor() - return "whois:" for whois urls, following dns: convention
* UURIFactory.java
    ugly hack for whois urls
* SchemeNotInSetDecideRule.java
    add whois to list of supported schemes
* WriterPoolProcessor.java
    shouldWrite() - we should write successful whois fetches
* WARCWriterProcessor.java
    write whois records
* FetchWhois.java
    the fetcher
2011-02-17 22:33:28 +00:00
gojomo 885a25c90c Robustify based on JUnit issues on Windows
* ArchiveReader
    improve warning message
* WriterPoolMember
    attempt pre-delete of target filename, warn on failure, for better odds on some filesystems
* ARCWriterTest, WARCWriterTest
    ensure timely close of readers/writers in case filenames are reused
    restore originally-intended unique target names
2011-02-17 01:21:48 +00:00
gojomo 9d588b9978 implement Closeable 2011-02-17 01:17:35 +00:00
gojomo b86f0afc83 * TopNSet
resolve strange type complaint in my Windows Eclipse JDK6u24 setup
2011-02-17 01:14:32 +00:00
gojomo 61dc661f47 * TopNSet
resolve strange type complaint in my Windows Eclipse JDK6u24 setup
2011-02-17 01:13:37 +00:00
gojomo 548114dbde [HER-1864] cookies are being set and sent back on TLDs/public-suffixes (like '.com') (sometimes called 'supercookies')
* CookieSpecBase
    use Guava InternetDomainName public-suffixes to both (1) prevent storing cookie on public-suffix; (2) prevent looking-up cookies for public-suffixes
* BdbCookieStorage
    correct checkpoint/relaunch behavior: don't reuse persisted cookies on normal relaunches; do reuse on resume-from-checkpoint
2011-02-16 01:18:57 +00:00
gojomo 5de965590c Update Guava library to r08
* .classpath, commons/pom.xml
    update reference
* ObjectIdentityBdbManualCache
    use new maximumSize() option on dirtyItems map
2011-02-16 01:15:13 +00:00
gojomo 9b78770027 [HER-1865] JDK6u23 breaks GzippedInputStream & W/ARCReaders with different GZIP handling
* GZIPMembersInputStream
    new workaround class that offers choice of pre/post JDK6u23 behavior and new accessors for finding member boundary offsets
* GZIPMembersInputStreamTest
    test for above
* ArchiveUtils, ARCWriter
    move static compress utilities to ArchiveUtils
* ArchiveReader, (W)ARCReaderFactory, (W)ARCWriterTest
    adapt to use GZIPMembersInputStream
* GzippedInputStream(Test)
    deleted
2011-02-16 01:12:25 +00:00
gojomo 9e53f8be7c [HER-1867] make H3 ssl adhoc self-signed certificate valid for longer (appears to expire after 90 days)
* Heritrix
    pass '-validity 3650' to KeyTool
2011-02-14 22:07:10 +00:00
nlevitt 9468cb0c1f Report total bytes, as well as breakdown, in xml version of job page, to match
html.
* CrawlJob.java
    sizeTotalsReportData() - add "total" (bytes) and "total-count" (urls) to map
* CrawledBytesHistotable.java
    new method getTotalUrls() to complement getTotalBytes()
2011-02-09 01:17:26 +00:00
gojomo f58fdcdba4 * Heritrix
use heritrix.home, if available, to find default logging.properties (to let those who launch Heritrix from elsewhere save themselves from HttpClient's copious logging)
2011-02-05 03:26:02 +00:00