Skip to content
This repository has been archived by the owner on May 30, 2023. It is now read-only.

netsniff.js fails to correctly get status of images included via Data URI for HAR #10740

Closed
mdi opened this issue Aug 30, 2012 · 3 comments
Closed
Milestone

Comments

@mdi
Copy link

mdi commented Aug 30, 2012

mich...@saltside.se commented:

Which version of PhantomJS are you using? Tip: run 'phantomjs --version'.

1.7.0 (development)

What steps will reproduce the problem?

  1. Produce an HTML file that includes an image via Data URI.
  2. phantomjs examples/netsniff.js <HTML file>
  3. Looks at produced HAR output.

What is the expected output? What do you see instead?

netsniff.js should get the proper response for images included via Data URIs

Which operating system are you using?

Mac OS X 10.8.1

Did you use binary PhantomJS or did you compile it from source?

Compiled from source and downloaded binary.

Please provide any additional information below.

Disclaimer:
This issue was migrated on 2013-03-15 from the project's former issue tracker on Google Code, Issue #740.
🌟   3 people had starred this issue at the time of migration.

@maisui99
Copy link

maisu...@gmail.com commented:

i have the same problem, can anyone tell me how to fix this problem?

@DjinnS
Copy link
Contributor

DjinnS commented Mar 19, 2013

Hi,

Same issue with 1.8.1 (binary package).

I think images via Data URI aren't part of the "network resources".

Here is a little, quick and dirty fix. A the following lines from line 28 in netsniff.js:

    // fix issue with Data URI reported in HAR file
    // I think we don't need this entries
    if (request.url.match(/(^data:image\/.*)/i)) {
        return;
    }

@ariya
Copy link
Owner

ariya commented Mar 21, 2013

Landed as one squashed commit and tweaked commit message. Thanks!

@ariya ariya closed this as completed Mar 21, 2013
vitallium pushed a commit to vitallium/phantomjs that referenced this issue May 28, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants