fix: correctly detect format OBSVER1 if there is no header, just data
This is required for OBS compatibility, which drops the header line on upload.
This commit is contained in:
parent
f8bb6e7ab7
commit
598c6620d7
|
@ -73,6 +73,13 @@ function detectFormat(body) {
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// If we immediately start with data (a date, formatted as DD.MM.YYYY), then
|
||||||
|
// we have an old OBS not sending the header. It must therefore be old
|
||||||
|
// format, too.
|
||||||
|
if (/^[0-9]{2}\.[0-9]{2}\.[0-9]{4};/.test(firstLine)) {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
|
||||||
return 'invalid';
|
return 'invalid';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue