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 default_content_type setting in Japanese readme #1650

Merged
merged 2 commits into from
Feb 5, 2022

Conversation

decoch
Copy link
Contributor

@decoch decoch commented Oct 6, 2020

Copy link
Member

@namusyaka namusyaka left a comment

Choose a reason for hiding this comment

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

@decoch I'm sorry for the late reply. Thanks for your first contribution.
I've just reviewed and left some comments. PTAL.

README.ja.md Outdated
@@ -2003,6 +2003,15 @@ set :protection, :session => true
<dt>bind</dt>
<dd>バインドするIPアドレス(デフォルト: `environment`がdevelopmentにセットされているときは、<tt>0.0.0.0</tt> <em>または</em> <tt>localhost</tt>)。ビルトインサーバでのみ使われる。</dd>

<dt>default_content_type</dt>
<dd>
不明なときに仮定される Content-Type (デフォルトは<tt>"text/html"</tt>)。
Copy link
Member

Choose a reason for hiding this comment

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

I don't think this is clear expression.
You don't need to stick to the original sentence in English :)

How about this?
Content-Type がセットされていない場合に適用される (デフォルトは<tt>"text/html"</tt>)。

README.ja.md Outdated
<dt>default_content_type</dt>
<dd>
不明なときに仮定される Content-Type (デフォルトは<tt>"text/html"</tt>)。
<tt>nil</tt> を設定するとすべてのレスポンスでデフォルトの Content-Type が設定されなくなる。
Copy link
Member

Choose a reason for hiding this comment

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

<tt>default_content_type</tt> に <tt>nil</tt> を設定すると、すべてのレスポンスにデフォルトの Content-Type が設定されなくなる。

README.ja.md Outdated
不明なときに仮定される Content-Type (デフォルトは<tt>"text/html"</tt>)。
<tt>nil</tt> を設定するとすべてのレスポンスでデフォルトの Content-Type が設定されなくなる。
このように設定した場合、コンテンツを出力するときに Content-Type を手動で設定する必要がある。
そうしないと、user-agenet はコンテンツを盗み見る必要がある。
Copy link
Member

Choose a reason for hiding this comment

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

そうしなければ、user-agent がそれを推測しなければならなくなります。
or そうしなければ、user-agent が Content sniffing をしなければなりません。

README.ja.md Outdated
<tt>nil</tt> を設定するとすべてのレスポンスでデフォルトの Content-Type が設定されなくなる。
このように設定した場合、コンテンツを出力するときに Content-Type を手動で設定する必要がある。
そうしないと、user-agenet はコンテンツを盗み見る必要がある。
(または、もし Rack::Protection::XSSHeader の <tt>nosniff</tt> が有効な場合、<tt>application/octet-stream</tt> と仮定される。)
Copy link
Member

Choose a reason for hiding this comment

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

仮定します or 決め込みます

@decoch
Copy link
Contributor Author

decoch commented Jun 25, 2021

@namusyaka I'm sorry for the late reply.
Thanks for the review.
I fixed it.

@jkowens jkowens merged commit d6439c1 into sinatra:master Feb 5, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants