Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

amazon plugin: support HTTP Found response and discard wrong stored cache #809

Merged
merged 1 commit into from
Aug 15, 2019
Merged

amazon plugin: support HTTP Found response and discard wrong stored cache #809

merged 1 commit into from
Aug 15, 2019

Conversation

dai-vdr
Copy link
Contributor

@dai-vdr dai-vdr commented Aug 15, 2019

amazonプラグインにて

undefined method `has_item?' for nil:NilClass (NoMethodError)

(plugin/amazon.rb):305:in `rescue in amazon_get'
(plugin/amazon.rb):279:in `amazon_get'
(plugin/amazon.rb):387:in `isbn_image'

というエラーが出るため調べたところ、XMLであるはずのキャッシュが true という文字列のみになっていました。

HTTP Redirection 以外に HTTP Found でもリダイレクトしていたためそれを追加、また既に間違って true をキャッシュしていた場合は取得し直すようにしました。

@tdtds tdtds self-assigned this Aug 15, 2019
@tdtds tdtds self-requested a review August 15, 2019 09:57
@tdtds tdtds added the bug label Aug 15, 2019
@tdtds
Copy link
Member

tdtds commented Aug 15, 2019

ありがとうございます。なるほど、良さそうです。とりこみますね。

@tdtds tdtds merged commit fdbbf1e into tdiary:master Aug 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants