[BUG?] Unexpected/breaking "Link" header change

Based on the documentation (see Resources in the REST API - GitHub Docs) the “Link” header is expected to match

Link: < uri-reference >; rel="value";

Since yesterday, however, the “Link” header returned when doing Web application flow, i.e.

POST  login/oauth/access_token
  • has rel with no quotations
  • there is an integrity param in between
  • there is no space after each ,

For example:

link: "<https://github.githubassets.com/assets/chunk-frameworks-aaac5e7e.js>; integrity=sha512-qqxefjEZzhP8x0ed+F3sDEdSogyDs+0ThK6EYXtqye9PJ26t5C996Q9EuRBr+296TAbc1rimsOSeZjZXJac1cA==; rel=preload; crossorigin=anonymous; as=script,<https://github.githubassets.com/assets/chunk-vendor-6594a208.js>; integrity=sha512-ZZSiCHJ85gkTIyggKfuBXsl3a7e+GPhw6iUguJ6eki2dXkGnOFBpQlUUG+gcTSJzgE8ii1cYyM7aLYXZeSeDbA==; rel=preload; crossorigin=anonymous; as=script,<https://github.githubassets.com/assets/behaviors-bf28db4d.js>; integrity=sha512-vyjbTdEGTiemoiT41KyVSh3+NxJv285wa1qlccyGrTsQsAAvhBSUrT0t1LZbJVEfccSTx+zLAyTekiljOX2wKA==; rel=preload; crossorigin=anonymous; as=script,<https://github.githubassets.com/assets/environment-f0adafbf.js>; integrity=sha512-8K2vvwbW+6H27Nad5ydg8PA2/aMD/LKq+EiK9s0U0hhVZxCI2tWBsYk9beAtisRw2j+Or5k2/F+6dk02nmj/PA==; rel=preload; crossorigin=anonymous; as=script"

As a result of that, Octokit.rb, due to dependency on sawyer crashes with:

NoMethodError: undefined method `captures' for nil:NilClass
.../vendor/bundle/ruby/2.6.0/gems/sawyer-0.8.2/lib/sawyer/response.rb:52:in `block in process_rels'
.../vendor/bundle/ruby/2.6.0/gems/sawyer-0.8.2/lib/sawyer/response.rb:51:in `map'
.../vendor/bundle/ruby/2.6.0/gems/sawyer-0.8.2/lib/sawyer/response.rb:51:in `process_rels'
.../vendor/bundle/ruby/2.6.0/gems/sawyer-0.8.2/lib/sawyer/response.rb:20:in `initialize'
.../vendor/bundle/ruby/2.6.0/gems/sawyer-0.8.2/lib/sawyer/agent.rb:107:in `new'
.../vendor/bundle/ruby/2.6.0/gems/sawyer-0.8.2/lib/sawyer/agent.rb:107:in `call'
.../vendor/bundle/ruby/2.6.0/gems/octokit-4.19.0/lib/octokit/connection.rb:156:in `request'
.../vendor/bundle/ruby/2.6.0/gems/octokit-4.19.0/lib/octokit/connection.rb:28:in `post'
.../vendor/bundle/ruby/2.6.0/gems/octokit-4.19.0/lib/octokit/client/users.rb:57:in `exchange_code_for_token'

Obviously sawyer is not codded in a very generic way and should be fix, but as the above change is breaking all deployed production environments depending on it out there it should better be immediate GitHub’s API adjustment!

It looks like GitHub fix the problem on their side - see Crash on response 'Link" header parsing · Issue #1325 · octokit/octokit.rb · GitHub