<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugs.webkit.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4.1"
          urlbase="https://bugs.webkit.org/"
          
          maintainer="admin@webkit.org"
>

    <bug>
          <bug_id>188364</bug_id>
          
          <creation_ts>2018-08-06 16:27:43 -0700</creation_ts>
          <short_desc>Prefetching drops parameters, page loads anew once committed</short_desc>
          <delta_ts>2018-08-07 12:07:46 -0700</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebKit</product>
          <component>Page Loading</component>
          <version>WebKit Local Build</version>
          <rep_platform>Mac</rep_platform>
          <op_sys>macOS 10.13</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>INVALID</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>Normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Danil Sapegin">danil.sapegin</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
    
    <cc>beidson</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1448278</commentid>
    <comment_count>0</comment_count>
    <who name="Danil Sapegin">danil.sapegin</who>
    <bug_when>2018-08-06 16:27:43 -0700</bug_when>
    <thetext>I have very strange situation, while developing my web-app.

ONLY IF typing url address by myself (not pasting, not clicking link) browser loads destination url twice.

Using Google Chrome browser UA (Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.84 Safari/537.36)


nginx log with custom php error message with $_SERVER[&apos;REQUEST_TIME_FLOAT&apos;] variable:
=============================================
2018/08/07 01:20:45 [error] 23861#23861: *62965279 FastCGI sent in stderr: &quot;PHP message: +++++)_1533594045.681_(++++&quot; while reading respo
nse header from upstream, client: 213.170.70.199, server: admin.smi.dev.parohod.biz, request: &quot;GET /tags/groups/manage/ HTTP/1.1&quot;, upstre
am: &quot;fastcgi://unix:/run/php/php7.1-fpm.sock:&quot;, host: &quot;admin.smi.dev.parohod.biz&quot;
2018/08/07 01:20:45 [error] 23861#23861: *62965279 FastCGI sent in stderr: &quot;PHP message: +++++)_1533594045.8943_(++++&quot; while reading resp
onse header from upstream, client: 213.170.70.199, server: admin.smi.dev.parohod.biz, request: &quot;GET /tags/groups/manage/ HTTP/1.1&quot;, upstr
eam: &quot;fastcgi://unix:/run/php/php7.1-fpm.sock:&quot;, host: &quot;admin.smi.dev.parohod.biz&quot;
=============================================

but request for first time sent to server without GET params (REQUEST_URI variable doesn&apos;t content any ?foo=bar), executed and than sent second time as expected (with GET params)


one more time.
I typed URL /tags/groups/manage/?foo=bar
Pressed enter (once)
and here more nginx log (with my comments between ###)
=============================================
### this is processed request without ?foo=bar ###
2018/08/07 02:19:47 [error] 24159#24159: *62985029 FastCGI sent in stderr: &quot;PHP message: REQUEST_TIME_FLOAT: 1533597587.0024
PHP message: REQUEST_URI: /tags/groups/manage/&quot; while reading response header from upstream, client: 213.170.70.199, server: admin.smi.dev.parohod.biz, request: &quot;GET /tags/groups/manage/ HTTP/1.1&quot;, upstream: &quot;fastcgi://unix:/run/php/php7.1-fpm.sock:&quot;, host: &quot;admin.smi.dev.parohod.biz&quot;

### this is processed original request as expected, with GET vars ###
2018/08/07 02:19:48 [error] 24159#24159: *62985029 FastCGI sent in stderr: &quot;PHP message: REQUEST_TIME_FLOAT: 1533597587.9976
PHP message: REQUEST_URI: /tags/groups/manage/?foo=bar&quot; while reading response header from upstream, client: 213.170.70.199, server: admin.smi.dev.parohod.biz, request: &quot;GET /tags/groups/manage/?foo=bar HTTP/1.1&quot;, upstream: &quot;fastcgi://unix:/run/php/php7.1-fpm.sock:&quot;, host: &quot;admin.smi.dev.parohod.biz&quot;
=============================================

it is looks like error in my app logic, but I think it&apos;s not true, I spent for 5 hours debugging and it&apos;s not my bug..


I repeated this behavior in Yandex.Browser (18.6.1.768 (64-bit)), Safari (Version 11.1.2 (13605.3.8)) and it works same, BUT in firefox (61.0.1 (64-bit)) same page works perfect!</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1448529</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2018-08-07 12:07:46 -0700</bug_when>
    <thetext>Loading while typing a URL is intentional prefetching. Obviously, a second load seems unexpected, as the prefetched page should be used - and it also seems unexpected that the parameters get omitted in prefetch.

However, prefetching is implemented in Safari, not in WebKit. Please file a bug for Safari via https://bugreport.apple.com for Apple engineers to take a look.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>