FrameResource.lastModified is null if server didn't return Last-Modified header
Reported by
fastest...@gmail.com,
Feb 26 2017
|
||||||
Issue descriptionSteps to reproduce the problem: 1. Load http://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js 2. Call Page.getResourceTree 3. Observe that lastModified on that resource is null What is the expected behavior? I expect it to be undefined or 0. What went wrong? null is returned which isn't a "number" and breaks statically typed languages interacting with the debugging protocol Did this work before? N/A Chrome version: 58.0.3018.3 Channel: dev
,
Feb 27 2017
Tested the issue on Ubuntu 14.04 using chrome version 58.0.3018.3 with below steps 1. navigated to provided URL and saved the file in js format. 2. Loaded the js file and typed the "Page.getResourceTree"command in console 3. Got the following error "Uncaught ReferenceError: Page is not defined" Could you please let us know any steps i have missed while reproducing the scenario. Thank You...
,
Feb 27 2017
#2: This is about the DevTools command - when used in headless mode.
,
Feb 27 2017
Which DevTools bindings are you using? C++ or Javascript? Which page are you navigating to -- this looks like just a standalone js file? In any case, FrameResource.lastModified is an optional field, so the bindings should make it clear that it's not there when the server didn't provide one.
,
Feb 27 2017
I'm using the Javascript bindings and yeah navigating to that page made it easy to expose the issue but actually I'm just going to any page with that script on it. It's an internal page so I can't really share but here's an example: http://gobin.io/YRpy that page loads http://pagead2.googlesyndication.com/pagead/show_ads.js that doesn't send a Last-Modified header. Ideally the lastModified would be undefined or 0.
,
Feb 27 2017
@skyostil: are these your js bindings? i don't think we could have passed null through our backend codegen. Btw, as per our code, it is not optional, but rather 0-able. + @lushnikov to fix the protocol file and document behavior.
,
Feb 28 2017
,
Mar 1 2017
Hmm, we (headless team) don't provide Javascript DevTools bindings so I'm not sure what we're talking about here :) Do you mean https://github.com/cyrus-and/chrome-remote-interface? I know those bindings do very little validation.
,
Mar 3 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/22e8735948a7c60d393250be79c9959d218faafe commit 22e8735948a7c60d393250be79c9959d218faafe Author: lushnikov <lushnikov@chromium.org> Date: Fri Mar 03 05:25:35 2017 DevTools: fix FrameResource.lastModified to be optional when not present This patch fixes FrameResource.lastModified to be optional when not returned by server. BUG= 696358 Review-Url: https://codereview.chromium.org/2727393002 Cr-Commit-Position: refs/heads/master@{#454516} [modify] https://crrev.com/22e8735948a7c60d393250be79c9959d218faafe/third_party/WebKit/Source/core/inspector/InspectorPageAgent.cpp
,
Mar 3 2017
Hopefully the patch fixes the issue. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by nyerramilli@chromium.org
, Feb 27 2017