make sure the etag header fits in the database field

This commit is contained in:
Athou
2013-05-22 22:15:53 +02:00
parent f20a772603
commit dbda3a9484

View File

@@ -50,7 +50,8 @@ public class FeedFetcher {
fetchedFeed = parser.parse(feedUrl, result.getContent());
Feed feed = fetchedFeed.getFeed();
feed.setLastModifiedHeader(result.getLastModifiedSince());
feed.setEtagHeader(result.geteTag());
feed.setEtagHeader(org.apache.commons.lang.StringUtils.substring(
result.geteTag(), 0, 255));
fetchedFeed.setFetchDuration(result.getDuration());
return fetchedFeed;
}