0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

(調査中)reactor-nettyのリクエストヘッダーの初期値

Last updated at Posted at 2024-10-20
項目 初期値
Connection 明示的に設定しない場合は、keep-alive
Host HTTPヘッダーにキーが無い場合は、リクエストの送信先ホスト名とポートが自動で設定
https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientConnect.java#L541
User-Agent HTTPヘッダーにキーが無かったら設定される初期値の定数の値
https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClient.java#L116
public static final String USER_AGENT = String.format("ReactorNetty/%s", reactorNettyVersion());
設定しているところ
https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientConnect.java#L537
例: User-Agent: ReactorNetty/1.0.0
Accept HTTPヘッダーにキーが無かったら設定される初期値の定数の値
https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientConnect.java#L694
static final AsciiString ALL = new AsciiString("*/*");
設定しているところ
https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientConnect.java#L546
例: Accept: */*
Content-Length 値が設定されていてもHTTPのbodyのサイズで更新
https://github.com/reactor/reactor-netty/blob/main/reactor-netty-http/src/main/java/reactor/netty/http/client/HttpClientOperations.java#L857
requestHeaders.setInt(HttpHeaderNames.CONTENT_LENGTH, body.readableBytes());

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?