New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 783439 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Last visit > 30 days ago
Closed: Nov 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 2
Type: Bug



Sign in to add a comment

chrome://inspect issues invalid HTTP requests during network target discovery

Reported by bitcor...@gmail.com, Nov 9 2017

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/61.0.3163.100 Safari/537.36

Steps to reproduce the problem:
1. Run a program that embeds V8 and supports Inspector.
2. Navigate to chrome://inspect.
3. Click "Configure..." and specify host and port.
4. Click "Done".

What is the expected behavior?
A debugger link for the application should appear on the chrome://inspect page.

What went wrong?
No debugger link appears.

This is because Chrome issues invalid HTTP GET requests to retrieve network target information. Chrome's requests look like this:

  GET /json HTTP/1.1

This is invalid because an HTTP/1.1 request must have a Host header. Node.js apparently doesn't care, but other web servers respond with 400 (Bad Request).

Chrome should either add a Host header or specify "HTTP/1.0".

Did this work before? N/A 

Chrome version: 61.0.3163.100  Channel: stable
OS Version: 10.0
Flash Version:
 
Cc: brajkumar@chromium.org
Labels: Needs-Feedback Needs-Milestone
bitcortex@ Thanks for the report! Could you please elaborate step-1? Is there any sample test case file available to check this issue from chrome-TE end?

Note: Upgrade your chrome to latest stable #62.0.3202.89 and recheck for this issue, if issue still persists please reply to this comment.

Thanks!

Comment 2 by bitcor...@gmail.com, Nov 13 2017

@brajkumar Thanks for your response!

In step 1 I'm running a custom program that embeds V8 and supports Inspector. It uses an HTTP/WebSocket support library provided by the OS (Windows). When Chrome attempts to retrieve my program's V8 information via "GET /json HTTP/1.1", its request is rejected because it's missing a Host header. My program has no chance to process it.

I'm not a Chrome developer, so I don't know what "chrome-TE" is, and I can't post any relevant source code, but you can reproduce the issue with Node.js. If you point chrome://inspect at a running Node.js application and capture Chrome's request using a network traffic analyzer, you'll see that the request specifies HTTP/1.1 but provides no Host header. Node.js's internal Inspector HTTP server doesn't care, but general-purpose HTTP servers are required to reject such requests.

"All Internet-based HTTP/1.1 servers MUST respond with a 400 (Bad Request) status code to any HTTP/1.1 request message which lacks a Host header field." https://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html

Chrome's behavior in version 62.0.3202.89 is identical.
Project Member

Comment 3 by sheriffbot@chromium.org, Nov 13 2017

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "brajkumar@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot

Comment 4 by l...@chromium.org, Nov 13 2017

Owner: eostroukhov@chromium.org
Status: Assigned (was: Unconfirmed)
eostroukhov@, could you please take a look?
Project Member

Comment 5 by bugdroid1@chromium.org, Nov 22 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/dea9637f90190fc234d2cbb8b3f768fd0ffd6cfc

commit dea9637f90190fc234d2cbb8b3f768fd0ffd6cfc
Author: Eugene Ostroukhov <eostroukhov@chromium.org>
Date: Wed Nov 22 23:16:02 2017

[DevTools] Send Host header

Bug:  783439 
Change-Id: Id6a3ed5bed787ef498f175a93b69ea39182055d6
TBR: mmenke (trivial change to devtools server)
Reviewed-on: https://chromium-review.googlesource.com/777475
Commit-Queue: Eugene Ostroukhov <eostroukhov@chromium.org>
Reviewed-by: Pavel Feldman <pfeldman@chromium.org>
Cr-Commit-Position: refs/heads/master@{#518792}
[modify] https://crrev.com/dea9637f90190fc234d2cbb8b3f768fd0ffd6cfc/chrome/browser/devtools/device/adb/mock_adb_server.cc
[modify] https://crrev.com/dea9637f90190fc234d2cbb8b3f768fd0ffd6cfc/chrome/browser/devtools/device/android_device_manager.cc
[modify] https://crrev.com/dea9637f90190fc234d2cbb8b3f768fd0ffd6cfc/net/server/web_socket_encoder.cc

Status: Fixed (was: Assigned)

Sign in to add a comment