Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Bogus error locations for HTTP Headers [1.2] #2209

Closed
antross opened this issue Apr 11, 2019 · 3 comments

Comments

Projects
None yet
3 participants
@antross
Copy link
Member

commented Apr 11, 2019

Hints like hint-content-type which point to HTTP headers also include a location, however this location appears to point to a location in the HTML file that triggered the request (as opposed to the listed resource that contains the HTTP header).

This should be fixed to omit line/column information in these cases as it doesn't make sense.

Actual:

'content-type' header charset value should be 'utf-8'
https://www.google-analytics.com/analytics.js:1:17293

Expected:

'content-type' header charset value should be 'utf-8'
https://www.google-analytics.com/analytics.js

@antross antross added the type:bug label Apr 11, 2019

@molant molant added this to the 1904-2 milestone Apr 12, 2019

@sarvaje sarvaje self-assigned this Apr 17, 2019

@sarvaje

This comment has been minimized.

Copy link
Member

commented Apr 17, 2019

@antross @molant what do you think about adding a new option isServerConfig (please, feel free to suggest a new name hehehe) to the report method, so if that option is true, the location will be omitted?

@molant

This comment has been minimized.

Copy link
Member

commented Apr 17, 2019

Is this the only scenario where we are sending an HTML element but we want to report the error somewhere else (or we actually don't want to show the HTML)?

E.g.: If I create a hint to validate the metadata of images, report is going to receive an element but the issue will be inside the image. What should we do in this cases? Maybe we need a richer way to report issues and provide more context?

@sarvaje

This comment has been minimized.

Copy link
Member

commented Apr 17, 2019

I also realize that the position of the element has more priority than the location in the options.

I have change this and right now the priority is:

  1. omitLocation
  2. location in options
  3. location in element

sarvaje added a commit to sarvaje/hint that referenced this issue Apr 17, 2019

antross added a commit that referenced this issue Apr 18, 2019

@sarvaje sarvaje changed the title [Bug] Bogus error locations for HTTP Headers [Bug] Bogus error locations for HTTP Headers [1.2] Apr 18, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.