Skip to content

Resulting HAR does not conform to spec #37

@sciatro

Description

@sciatro

The HAR returned by v0.6.1 of the plugin on FF v68 does not conform to v1.2 of the HAR spec.

I've noticed two issues that cause the return value of HAR.triggerExport() to fail validation:

The Apache 2 Licensed Browsertime project includes a function which brings the plugin return value into conformity, partially reproduced here:

  HAR.triggerExport()
    .then((result) => {
      // Different handling in FF 60 and 61 :|
      if (result.log) {
        result.log.pages[0].title = document.URL;
      }
      else {
        result.pages[0].title = document.URL;
      }
      // Normalize
      return callback({'har': result.log ? result: {log: result}});
  })

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions