hayamiz / twittering-mode

An Emacs major mode for Twitter
http://twmode.sourceforge.net/
545 stars 92 forks source link

New Twitter API uses HTTP 2.0 #114

Closed fvaresi closed 8 years ago

fvaresi commented 8 years ago

Since the new Twitter API uses HTTP 2.0, current code is unable to parse response headers properly and I get the error "Failed to retrieve a request token".

I fixed this by modifying a couple of regex in https://github.com/fvaresi/twittering-mode/commit/7bef84ced528b62f10b51c6af5cc7064e0b8352e

dfranganillo commented 8 years ago

Thanks, but It's not working for me.

fvaresi commented 8 years ago

Hi. If you provide more details I might be able to help. How are you using this fix? Did you checkout the topic branch with the fix or applied the fix manually?

dfranganillo commented 8 years ago

I checked your repo. It still says upon loading the token 'something something nil' Thanks. El 4 feb. 2016 12:55 p. m., "Fernando Varesi" notifications@github.com escribió:

Hi. If you provide more details I might be able to help. How are you using this fix? Did you checkout the topic branch with the fix or applied the fix manually?

— Reply to this email directly or view it on GitHub https://github.com/hayamiz/twittering-mode/issues/114#issuecomment-179789310 .

fvaresi commented 8 years ago

Make sure you checkout the topic branch http2_support (I didn't apply the fix to master since I was expecting the pull request to be approved). Also, make sure you are loading the library from the correct path. I added the following line to my init.file (modify it with the path where you did the checkout):

(add-to-list 'load-path "~/projects/twittering-mode")

dfranganillo commented 8 years ago

Thanks, that worked!

cvmat commented 8 years ago

@fvaresi Thanks for your contribution. I have expected that the response should be sent in HTTP/1.1 if the request is sent in HTTP/1.1. But according to the behavior, the Twitter server may return a response in HTTP/2 even if a request is sent in HTTP/1.1 (the default behavior of curl).

@multiSnow has already written the patches for HTTP/2 ( hayamiz/twittering-mode#103 ). It is essentially equivalent to yours except that it also replaces regexps in twittering-pre-process-buffer-curl. I have imported the patch. Unfortunately, I do not have an environment, where HTTP/2 is available via curl.

Please try it. Thank you very much.

fvaresi commented 8 years ago

Hi @cvmat . I tried current master with the patch from @multiSnow and it works fine for me.

Closing this issue. Thanks!