我正试图通过弹出的网页发布一个表单“”。它在Chromium中运行良好。但是,在Google Chrome中,查询会被取消。
F12控制台快照:
我在Chrome中测试了我的扩展程序(Win10-x64,不起作用),Chromium(ArchLinux-x64,运行良好)和Chrome(ArchLinux-x64,不起作用)。这是私人使用,所以我没有将其上传到Chrome扩展商店。 以下是我认为重要的一些信息。更多细节以zip形式附上。
-----系统信息-----
<form action="https://www.recolic.net/p/origin.php" method='post'>
Domain name:<input id="insertHere" type='text' name='domainName' value=''><br>
Key: <input type='password' name='keyForKey'><br>
<input type='submit'>
</form>
- - - - - - - - popup.html
{
"manifest_version": 2,
"name": "Private Password Generator",
"description": "This is Recolic's generator to securely get password.",
"version": "1.1",
"icons": { "16": "icon16.png",
"48": "icon48.png",
"128": "icon128.png" },
"browser_action": {
"default_icon": "icon.png",
"default_popup": "popup.html"
},
"permissions": [
"activeTab",
"https://www.recolic.net/p/origin.php"
]
}
- - - - - - - - 的manifest.json
--> delegate_blocked_by = "NavigationResourceThrottle"
----------------------编辑:
尝试使用chrome:// net-internals /#events并获取日志。
t=2476 [st= 0] +REQUEST_ALIVE [dt=72]
--> priority = "HIGHEST"
--> url = "https://www.recolic.net/p/origin.php"
t=2476 [st= 0] DELEGATE_INFO [dt=3]
--> delegate_blocked_by = "NavigationResourceThrottle"
t=2479 [st= 3] URL_REQUEST_DELEGATE [dt=0]
t=2479 [st= 3] +URL_REQUEST_START_JOB [dt=68]
--> load_flags = 37121 (MAIN_FRAME_DEPRECATED | MAYBE_USER_GESTURE | VALIDATE_CACHE | VERIFY_EV_CERT)
--> method = "POST"
--> upload_id = "1493551191453224"
--> url = "https://www.recolic.net/p/origin.php"
t=2480 [st= 4] URL_REQUEST_DELEGATE [dt=0]
t=2480 [st= 4] HTTP_CACHE_GET_BACKEND [dt=0]
t=2480 [st= 4] HTTP_CACHE_OPEN_ENTRY [dt=0]
--> net_error = -2 (ERR_FAILED)
t=2480 [st= 4] HTTP_CACHE_CREATE_ENTRY [dt=0]
t=2480 [st= 4] HTTP_CACHE_ADD_TO_ENTRY [dt=0]
t=2480 [st= 4] +HTTP_STREAM_REQUEST [dt=2]
t=2480 [st= 4] HTTP_STREAM_JOB_CONTROLLER_BOUND
--> source_dependency = 22281 (HTTP_STREAM_JOB_CONTROLLER)
t=2482 [st= 6] HTTP_STREAM_REQUEST_BOUND_TO_JOB
--> source_dependency = 22282 (HTTP_STREAM_JOB)
t=2482 [st= 6] -HTTP_STREAM_REQUEST
t=2482 [st= 6] UPLOAD_DATA_STREAM_INIT [dt=0]
--> is_chunked = false
--> net_error = 0 (?)
--> total_size = 27
t=2482 [st= 6] +HTTP_TRANSACTION_SEND_REQUEST [dt=1]
t=2482 [st= 6] HTTP_TRANSACTION_SEND_REQUEST_HEADERS
--> POST /p/origin.php HTTP/1.1
Host: www.recolic.net
Connection: keep-alive
Content-Length: 27
Cache-Control: max-age=0
Origin: null
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.81 Safari/537.36
Content-Type: application/x-www-form-urlencoded
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.8,zh-CN;q=0.6,zh;q=0.4
t=2482 [st= 6] UPLOAD_DATA_STREAM_READ [dt=0]
--> current_position = 0
t=2482 [st= 6] HTTP_TRANSACTION_SEND_REQUEST_BODY
--> did_merge = true
--> is_chunked = false
--> length = 27
t=2483 [st= 7] -HTTP_TRANSACTION_SEND_REQUEST
t=2483 [st= 7] +HTTP_TRANSACTION_READ_HEADERS [dt=63]
t=2483 [st= 7] HTTP_STREAM_PARSER_READ_HEADERS [dt=63]
t=2546 [st=70] HTTP_TRANSACTION_READ_RESPONSE_HEADERS
--> HTTP/1.1 200 OK
Server: nginx
Date: Sun, 30 Apr 2017 11:19:51 GMT
Content-Type: text/html; charset=UTF-8
Transfer-Encoding: chunked
Connection: keep-alive
t=2546 [st=70] -HTTP_TRANSACTION_READ_HEADERS
t=2547 [st=71] HTTP_CACHE_WRITE_INFO [dt=0]
t=2547 [st=71] HTTP_CACHE_WRITE_DATA [dt=0]
t=2547 [st=71] HTTP_CACHE_WRITE_INFO [dt=0]
t=2547 [st=71] URL_REQUEST_DELEGATE [dt=0]
t=2547 [st=71] -URL_REQUEST_START_JOB
t=2547 [st=71] +URL_REQUEST_DELEGATE [dt=1]
t=2547 [st=71] DELEGATE_INFO [dt=1]
--> delegate_blocked_by = "NavigationResourceThrottle"
t=2548 [st=72] -URL_REQUEST_DELEGATE
t=2548 [st=72] CANCELLED
t=2548 [st=72] -REQUEST_ALIVE
我提到过(googlesource.com)[https://chromium.googlesource.com/chromium/src/+/lkgr/net/docs/crash-course-in-net-internals.md]但我对如何解决它并不了解......
{{1}}
答案 0 :(得分:1)
您可能需要检查chrome.webRequest以了解可能用于取消请求的事件,然后检查您的代码中是否包含这些事件。如请求的生命周期中所述,您可以使用这些事件来观察和分析流量。某些同步事件将允许您拦截,阻止或修改请求。
尝试使用chrome://net-internals/#events
,它会显示您要发送的请求的详细信息 - 包括隐藏的重定向/有关根据此SO post建议发送的Cookie的安全信息。