Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PUT request generates SPDY protocol errors only in Chrome or Opera?

I have an Angular 1.5 app that uses the Angular $resource provider to handle all calls to the API backend. I recently added a feature that has a drag and drop interface, and once an item is dropped into a particular bucket I perform a PUT request with all relevant data to the public API method to save said data.

I developed it a few months back, and even uncovered an odd bug in the Mac-only version of Chrome in one particular version (we're already 2 or 3 versions past that), but otherwise it worked perfectly.

I just recently released it after doing some more testing on my own, only to realize that Chrome and Opera browsers both error out on the PUT call, the API never receives the request. The only piece of information I get is this description in the Chrome console:

PUT https://www.phpdraft.com/api/draft/59/pick/5026/depth_chart/37 net::ERR_SPDY_PROTOCOL_ERROR

To see this for yourself, here's the URL where that call or similar ones can be made: PHPDraft

I suspect that the fact that my server is using HTTPS may be the issue at hand here, but the Google searches I've done on ERR_SPDY_PROTOCOL_ERROR so far are cryptic at best and don't sound as if they apply to my situation.

Here's how I'm using $resource within my Angular app to make this PUT call (and all other calls similarly):

angular.module('app').factory('api', function($resource, ENV) {
  return {
    DepthChartPosition: $resource(ENV.apiEndpoint + "commish/draft/:id/depthchartposition/:position_id", {
      draft_id: '@draft_id',
      position_id: '@position_id',
      draft_sport: '@draft_sport',
      manager_id: '@manager_id',
      pick_id: '@pick_id'
    }, {
      'update': {
        method: 'PUT',
        url: ENV.apiEndpoint + "draft/:draft_id/pick/:pick_id/depth_chart/:position_id"
      }
    })
  };
});

And here's what the request itself that is generated by the above code looks like:

General
Request URL:  https://www.phpdraft.com/api/draft/59/pick/5026/depth_chart/37

Request Headers
Accept:application/json, text/plain, */\*
Content-Type:  application/json;charset=UTF-8
Origin:  https://www.phpdraft.com
Referer:  https://www.phpdraft.com/draft/59/depth_chart
User-Agent:  Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/52.0.2743.116 Safari/537.36

Request Payload
{draft_id: "59", position_id: "37", pick_id: "5026"}

The response window for this request is empty, and devtools shows the request as "stalled". Any ideas what's going on here?

like image 222
Mattygabe Avatar asked Oct 30 '22 22:10

Mattygabe


1 Answers

As of May 15th of this year, Chrome no longer supports SPDY and is no longer included in the current version.

... starting on May 15th — the anniversary of the HTTP/2 RFC — Chrome will no longer support SPDY.

...SPDY and NPN support will be removed with the release of Chrome 51.

like image 159
Rob Avatar answered Nov 09 '22 15:11

Rob