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

Add several missing headers to HTTP request #676

Merged
merged 1 commit into from Apr 21, 2021

Conversation

ma8ma
Copy link
Collaborator

@ma8ma ma8ma commented Apr 18, 2021

HTTPリクエストヘッダーに Accept, Accept-Language, DNT, Upgrade-Insecure-Requestsを追加します。

修正にあたり不具合報告をしていただきありがとうございました。
https://mao.5ch.net/test/read.cgi/linux/1615781919/419

https://developer.mozilla.org/ja/docs/Web/HTTP/Headers/Accept
https://developer.mozilla.org/ja/docs/Web/HTTP/Headers/Accept-Language
https://developer.mozilla.org/ja/docs/Web/HTTP/Headers/DNT
https://developer.mozilla.org/ja/docs/Web/HTTP/Headers/Upgrade-Insecure-Requests


パッチの適応方法

git clone コマンドを使う方法 (一時的なcloneで使い捨てる)

edit(2021-04-19): URLのユーザー名を訂正
edit(2021-04-21): ブランチが削除されたためこの方法は使えなくなりました

git clone -b idea-fix-http-request --depth 1 https://github.com/ma8ma/JDim.git temp
cd temp

meson debugdir
meson compile -C debugdir

# 実行
./debugdir/src/jdim

# パッチの削除
cd ../
rm -rf temp

curl と patch コマンドを使う場合

※ git pullなどでmasterブランチを更新してから行うことを推奨します。

git chechout master
git pull
curl -L https://github.com/JDimproved/JDim/pull/676.patch | patch -p1
meson debugdir
meson compile -C debugdir

# 実行
./debugdir/src/jdim

# パッチの削除
rm -rf debugdir
git reset --hard master

hub コマンドを使う場合

hub checkout https://github.com/JDimproved/JDim/pull/676
meson debugdir
meson compile -C debugdir

# 実行
./debugdir/src/jdim

# パッチの削除
rm -rf debugdir
git checkout master
git branch -D idea-fix-http-request

@ma8ma ma8ma added the bug バグの追跡 label Apr 18, 2021
@ma8ma ma8ma added this to In progress in State of JDim-v0.5.0+ via automation Apr 18, 2021
HTTPリクエストヘッダーに Accept, Accept-Language, DNT,
Upgrade-Insecure-Requestsを追加します。

https://mao.5ch.net/test/read.cgi/linux/1615781919/419
@ma8ma
Copy link
Collaborator Author

ma8ma commented Apr 18, 2021

force pushしました。
push前にブランチを取得していた場合はgit resetで移動するか一度削除してやり直しをお願いします。

Copy link
Collaborator Author

@ma8ma ma8ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

たくさんの報告ありがとうございます
早めにマージしたいと思います

@@ -1093,6 +1096,7 @@ std::string Loader::create_msg_send()
// その他のフィールド
if( ! m_data.ex_field.empty() ) msg << m_data.ex_field;

msg << "DNT: 1\r\n";
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

無くても問題ないかもしれません。

@@ -1103,6 +1107,7 @@ std::string Loader::create_msg_send()
msg << m_data.str_post;
msg << "\r\n";
}
msg << "Upgrade-Insecure-Requests: 1\r\n";
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

無くても問題ないかもしれません。

@ma8ma ma8ma marked this pull request as ready for review April 21, 2021 14:23
@ma8ma ma8ma changed the title [IDEA] Loader: Fix HTTP request Add several missing headers to HTTP request Apr 21, 2021
@ma8ma ma8ma merged commit eddf241 into JDimproved:master Apr 21, 2021
State of JDim-v0.5.0+ automation moved this from In progress to Done Apr 21, 2021
@ma8ma ma8ma deleted the idea-fix-http-request branch April 21, 2021 14:25
@ma8ma
Copy link
Collaborator Author

ma8ma commented Apr 21, 2021

snap版はedgeチャンネル(開発版)が更新されます
(ビルドが終わるまで1~2時間ほどかかります)

edgeチャンネルをインストールする方法

snap install jdim --channel=edge

edgeチャンネルに切り替える方法

snap refresh jdim --channel=edge

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug バグの追跡
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

1 participant