Google 服务器在隐私浏览模式下的第一个请求给出服务器错误

Google Server gives a server error with the first request in private browsing mode

每当我 运行 url https://scholar.google.com/citations?user=N7m4vIQAAAAJ&hl=en 私人 windows 的 Safari 和 Google Chrome, Google 给出一个错误。

它只发生在隐私浏览模式下的第一个请求上。

有人知道为什么这只发生在特定的环境中吗? 这种情况从 3 天前就开始了。

-- 一个错误信息和一个捕获

Server Error We're sorry but it appears that there has been an internal server error while processing your request. Our engineers have been notified and are working to resolve the issue. Please try again later.

--- 添加

头文件包含

http header response Cache-Control: no-cache, must-revalidate Content-Encoding: gzip Content-Type: text/html; charset=UTF-8 Date: Mon, 16 Nov 2015 19:35:39 GMT Expires: Fri, 01 Jan 1990 00:00:00 GMT Pragma: no-cache Server: citations Set-Cookie: NID=73=eF98qod1NpYg7nb03RUToiSiacFgqNoZxQ4CuzqwGlQn53SoR7rHlzO0OExsmYkpRazROCQ3WqKoCsWKFPxp8dZr5pBra6nD1HPcxWUILl9gVAf5Q7GSQc3B0O3TP4gu; expires=Tue, 17-May-2016 19:35:39 GMT; path=/; domain=.google.com; HttpOnly X-Firefox-Spdy: h2 X-Frame-Options: SAMEORIGIN X-XSS-Protection: 1; mode=block p3p: CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657 for more info." x-content-type-options: no sniff

通过在请求 URL 时使用 cookie 解决了这个问题。参考:PHP cURL how to add the User Agent value OR overcome the Servers blocking cURL requests?

我使用 php 脚本来检索和放置一些 cookie 选项。

一个代码片段是

    $curl = curl_init($url);
    $dir                   = dirname(__FILE__);
    $config['cookie_file'] = $dir . '/cookies/' . md5($_SERVER['REMOTE_ADDR']) . '.txt';

    curl_setopt($curl, CURLOPT_COOKIEFILE, $config['cookie_file']);
    curl_setopt($curl, CURLOPT_COOKIEJAR, $config['cookie_file']);

    curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
    curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);

    $data = curl_exec($curl);
    curl_close($curl);