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

lantern: data uris include server response time #9833

Closed
paulirish opened this issue Oct 12, 2019 · 2 comments · Fixed by #9932
Closed

lantern: data uris include server response time #9833

paulirish opened this issue Oct 12, 2019 · 2 comments · Fixed by #9932

Comments

@paulirish
Copy link
Member

I noticed in the simulator that non-network URLs get treated, I believe, as actual network requests that will use a connection, etc.

Clearly there shouldn't be any server response time, though I think a non-zero RTT makes sense.. probably more like 5-10ms ish.

@patrickhulce can you help me think about how we'd fix this? Looking through the lantern code I'm not sure where we'd handle this case.

image

@patrickhulce
Copy link
Collaborator

Ooooo, yikes, yes let's fix that in simulateDownloadUntil! Check if it's a non-network protocol and have some constant/option for dealing with the RTT/server response time

/**
* Simulates a network download of a particular number of bytes over an optional maximum amount of time
* and returns information about the ending state.
*
* See https://hpbn.co/building-blocks-of-tcp/#three-way-handshake and
* https://hpbn.co/transport-layer-security-tls/#tls-handshake for details.
*
* @param {number} bytesToDownload
* @param {DownloadOptions} [options]
* @return {DownloadResults}
*/
simulateDownloadUntil(bytesToDownload, options) {

@patrickhulce
Copy link
Collaborator

Given #9834 too we should probably do an audit of our network request usage for data URI mistakes and/or add more data URIs to our smokes :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants