• Justin DeWitt's avatar
    [Offline Pages] Allow same-page snapshots for POST requests. · 8e3141ae
    Justin DeWitt authored
    Previously we disabled POST requests from being snapshotted by OPC.
    However, this inadvertently prevented SnapshotController from marking
    a WebContents as snapshottable, so any POST requests would be unable to
    complete - they would hang in downloading state until Chrome exited.
    After that, the background loader would take over and error out because
    it does not support non-GET requests and would use a GET HTTP request
    for a POST resource which typically fails or redirects to a login page
    of some kind.
    
    Additionally, extends NavigationSimulator to use the method from
    SetMethod when committing navigations, rather than the currently-hardcoded
    "GET" method.
    
    Bug: 859403
    Change-Id: Ic10dd0b088da9e3ebf2a42e3cca6096eea449d16
    Reviewed-on: https://chromium-review.googlesource.com/1125031Reviewed-by: default avatarCamille Lamy <clamy@chromium.org>
    Reviewed-by: default avatarCarlos Knippschild <carlosk@chromium.org>
    Commit-Queue: Justin DeWitt <dewittj@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#573516}
    8e3141ae
navigation_simulator.cc 37.9 KB