provisional headers are shown

Description of the problem:
     An ajax request fails, and the browser's performance is that provisional headers are shown in the HTTP request headers, and in the network tab, the network request status is shown as failed. First of all, according to the explanation on the Internet, provisional headers are shown, indicating that the currently requested data is not sent to the server (actually not the case).

There are generally two reasons for the above problem:
1. The request is to fetch data from the cache
2. The request is due to a certain Some reasons are interrupted, for example: the iframe is deleted before the ajax request is sent in the iframe; the ajax request is also issued at the same time as the form is submitted; and the ajax request times out;

but the above two problems are not found through the code, and then according to the network As mentioned above, use the tools that come with chrome to view specific network request events.
     
Enter chrome://net-internals in the browser, find the event option to
view event record: see the bold part
237851: URL_REQUEST
http://pay.gyyx.cn/GyyxCardPay/PayGYB?r=0.519311266924479
Start Time: 2017-09-22 15:51:35.169

t=12472482 [st= 0] +REQUEST_ALIVE [dt=51]
  --> priority = "HIGHEST"
  --> url = "http://pay.gyyx.cn/GyyxCardPay/PayGYB?r=0.519311266924479"
t=12472483 [st= 1] URL_REQUEST_DELEGATE [dt=0]
t=12472483 [st= 1] +URL_REQUEST_START_JOB [dt=50]
  --> load_flags = 49408 (IGNORE_LIMITS | MAYBE_USER_GESTURE | VERIFY_EV_CERT)
  --> method = "POST"
  --> upload_id = "0"
  --> url = "http://pay.gyyx.cn/GyyxCardPay/PayGYB?r=0.519311266924479"
t=12472483 [st= 1] URL_REQUEST_DELEGATE [dt=0]
t=12472483 [st= 1] HTTP_CACHE_GET_BACKEND [dt=0]
t=12472483 [st= 1] +HTTP_STREAM_REQUEST [dt=0]
t=12472483 [st= 1] HTTP_STREAM_JOB_CONTROLLER_BOUND
  --> source_dependency = 237853 (HTTP_STREAM_JOB_CONTROLLER)
t=12472483 [st= 1] HTTP_STREAM_REQUEST_BOUND_TO_JOB
  --> source_dependency = 237854 (HTTP_STREAM_JOB)
t=12472483 [st= 1] -HTTP_STREAM_REQUEST
t=12472483 [st= 1] +UPLOAD_DATA_STREAM_INIT [dt=0]
t=12472483 [st= 1] UPLOAD_DATA_STREAM_INIT [dt=0]
  --> is_chunked = false
  --> net_error = 0 (?)
  --> total_size = 195
t=12472483 [st= 1] -UPLOAD_DATA_STREAM_INIT
  --> is_chunked = false
  --> net_error = 0 (?)
  --> total_size = 195
t=12472483 [st= 1] +HTTP_TRANSACTION_SEND_REQUEST [dt=1]
t=12472483 [st= 1] HTTP_TRANSACTION_SEND_REQUEST_HEADERS
  -->[b] POST http://pay.gyyx.cn/GyyxCardPay/PayGYB?r=0.519311266924479 HTTP/1.1
  Host: pay.gyyx.cn
  Proxy-Connection: keep-alive
  Content-Length: 195
  Accept: application/json, text/javascript, */*; q=0.01
  Origin: http://pay.gyyx.cn
  X-Requested-With: XMLHttpRequest
  User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.101 Safari/537.36
  Content-Type: application/x-www-form-urlencoded; charset=UTF-8
  Referer: http://pay.gyyx.cn/gamepay/paygyb
  Accept-Encoding: gzip, deflate
  Accept-Language: zh-CN,zh;q=0.8
  Cookie: [352 bytes were stripped][/b]
t=12472484 [st= 2] HTTP_TRANSACTION_SEND_REQUEST_BODY
  --> did_merge = false
  --> is_chunked = false
  --> length = 195
t=12472484 [st= 2] +UPLOAD_DATA_STREAM_READ [dt=0]
  --> current_position = 0
t=12472484 [st= 2] UPLOAD_DATA_STREAM_READ [dt=0]
  --> current_position = 0
t=12472484 [st= 2] -UPLOAD_DATA_STREAM_READ
t=12472484 [st= 2] UPLOAD_DATA_STREAM_READ [dt=0]
  --> current_position = 195
t=12472484 [st= 2] -HTTP_TRANSACTION_SEND_REQUEST
t=12472484 [st= 2] +HTTP_TRANSACTION_READ_HEADERS [dt=48]
t=12472484 [st= 2] HTTP_STREAM_PARSER_READ_HEADERS [dt=47]
t=12472531 [st=49] HTTP_STREAM_PARSER_READ_HEADERS [dt=1]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_STREAM_PARSER_READ_HEADERS [dt=0]
t=12472532 [st=50] HTTP_TRANSACTION_READ_RESPONSE_HEADERS
  -->[b] HTTP/1.1 302 Found
  Content-Length: 189
  Cache-Control: private
  Content-Type: text/html; charset=utf-8
  Date: Fri, 22 Sep 2017 07:51:36 GMT
  Gy-Log-Id: vQN3u2-8a902410711a9-029-3MziEf-8afcd
  Keep-Alive: timeout=38
  Location: http://static.gyyx.cn/error/index.html?aspxerrorpath=/GyyxCardPay/PayGYB
  Server: Microsoft-IIS/7.5
  Set-Cookie: [55 bytes were stripped]
  X-Aspnet-Version: 4.0.30319
  X-Aspnetmvc-Version: 4.0
  X-Powered-By: ASP.NET[/b]
t=12472532 [st=50] -HTTP_TRANSACTION_READ_HEADERS
t=12472532 [st=50] URL_REQUEST_DELEGATE [dt=0]
t=12472532 [st=50] URL_REQUEST_DELEGATE [dt=1]
t=12472533 [st=51] [b]CANCELLED[/b]
t=12472533 [st=51] -URL_REQUEST_START_JOB
  --> [b]net_error = -3 (ERR_ABORTED)[/b]
t=12472533 [st=51] URL_REQUEST_DELEGATE [dt=0]
t=12472533 [st=51] -REQUEST_ALIVE


From this, you can see that there is normal request data in the front, and continue to look back. There is a network response at the end and it is returned from the server. There is a 302 network response result returned here, so the problem is coming. How can the status be failed instead of 302? The 302 status is only an intermediate result in the above log. At the end of the log, you can see that the request has been CANCELLED and ERR_ABORTED. What is the specific reason, I will not study it first.


Since 302 is returned, there must be an exception on the server side. It was confirmed that the server-side data was wrong, causing the server to give a 302 message.

Summary:

Finding provisional headers are shown in the browser does not necessarily mean that the problem is only on the front end and not on the server side.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326446325&siteId=291194637
Recommended