Skip to content
This repository has been archived by the owner on Nov 21, 2018. It is now read-only.

Update ClueWeb09WarcRecord.java #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions src/main/java/org/clueweb/clueweb09/ClueWeb09WarcRecord.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Locale;
import java.util.Map.Entry;
import java.util.Set;

Expand Down Expand Up @@ -210,7 +211,7 @@ private static byte[] readNextRecord(DataInputStream in, StringBuffer headerBuff
headerBuffer.append(NEWLINE);
String[] thisHeaderPieceParts = line.split(":", 2);
if (thisHeaderPieceParts.length == 2) {
if (thisHeaderPieceParts[0].toLowerCase().startsWith("content-length")) {
if (thisHeaderPieceParts[0].toLowerCase(Locale.US).startsWith("content-length")) {
foundContentLength = true;
try {
contentLength = Integer.parseInt(thisHeaderPieceParts[1].trim());
Expand Down Expand Up @@ -494,7 +495,7 @@ public void setWarcDate(String dateString) {
* Sets the WARC uuid string
*
* @param UUID
*/
*/l
public void setWarcUUID(String UUID) {
warcHeader.UUID = UUID;
}
Expand Down