<?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>189084</bug_id>
          
          <creation_ts>2018-08-29 09:48:33 -0700</creation_ts>
          <short_desc>Mobile Safari silently retries non-idempotent network requests</short_desc>
          <delta_ts>2018-08-30 10:17:09 -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>WebKit Misc.</component>
          <version>Safari 11</version>
          <rep_platform>Unspecified</rep_platform>
          <op_sys>iOS 11</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="Joel Riley">joelriley</reporter>
          <assigned_to name="Nobody">webkit-unassigned</assigned_to>
          <cc>ap</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>1454802</commentid>
    <comment_count>0</comment_count>
    <who name="Joel Riley">joelriley</who>
    <bug_when>2018-08-29 09:48:33 -0700</bug_when>
    <thetext>Spec allows browsers to silently retry requests (https://tools.ietf.org/html/rfc2616#section-8.2.4) if the network connection prematurely closes. This can happen, for instance, when a mobile device is switching away from a poor network or switching between wifi and cellular network. If a client (javascript) issues only one network request, the browser may issue two requests if the first request is interrupted, and the payload of the second request is returned back to the client, which is unaware two requests took place. This behavior is problematic in the case of non-idempotent requests (such as POST), since those requests can have side effects. One examples is an HTTP POST request to create a new comments on a message board could in turn cause two comments to be posted if the browser retries request due to network disconnect. Safari should not retry non-idempotent requests. Chrome currently handles this correctly.

RFC that states retries should not happen for non-idempotent requests: https://tools.ietf.org/html/rfc7230#section-6.3.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>1455260</commentid>
    <comment_count>1</comment_count>
    <who name="Alexey Proskuryakov">ap</who>
    <bug_when>2018-08-30 10:17:09 -0700</bug_when>
    <thetext>Thank you for the report!

This is implemented at a lower level than WebKit, so we can&apos;t track this problem in WebKit bugzilla. Could you please report it via https://bugreport.apple.com, so that Apple engineers responsible for networking could take a look? Also, they would most likely need steps to reproduce, or at least a tcpdump.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>