Skip to content

[WAT extraction] Empty HTTP header fields are filled with value from preceding field #11

@sebastian-nagel

Description

@sebastian-nagel

If a HTTP header field is empty in the WARC response record, the WAT extractor does not use the empty value but uses the field value from the preceding HTTP header field.

WARC record HTTP header with empty "Server" name:

HTTP/1.1 200 OK
Content-Type: text/html; charset=utf-8
Content-Length: 28676
...
Expires: Fri, 28 Apr 2017 14:46:35 GMT
Server: 
Set-Cookie: FixedFacetDefaults=None; path=/
...

WAT record extracted, "Server" name set to "Expires" date:

  "Envelope": {
    "Format": "WARC/1.0",
    ...,
    "Payload-Metadata": {
      "Actual-Content-Type": "application/http; msgtype=response",
      "HTTP-Response-Metadata": {
        "Headers-Length": "1092",
        ...,
        "Headers": {
          "X-Cache": "Miss from cloudfront",
          "Server": "Fri, 28 Apr 2017 14:46:35 GMT",
          "Connection": "keep-alive",
          ...,
         "Expires": "Fri, 28 Apr 2017 14:46:35 GMT",
          ...,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions