Tomcat отправляет 100 также для 401 неаутентифицированного дела, которое на самом деле не отправляет ни одно тело.
Согласно RFC2616 , сервер должен либо указать 100, либо фактический код состояния (в данном случае 401), когда тело не читает, но не оба.
Кажется, нарушение определения RFC.
Можем ли мы изменить поведение кота так, чтобы оно совпадало с определением RFC?
Требования к серверам происхождения HTTP / 1.1:
- Upon receiving a request which includes an Expect request-header
field with the "100-continue" expectation, an origin server MUST
either respond with 100 (Continue) status and continue to read
from the input stream, or respond with a final status code. The
origin server MUST NOT wait for the request body before sending
the 100 (Continue) response. If it responds with a final status
code, it MAY close the transport connection or it MAY continue
to read and discard the rest of the request. It MUST NOT
perform the requested method if it returns a final status code.
Вот журнал wireshark: