MCPcopy Create free account
hub / github.com/apache/trafficserver / handle_100_continue_response

Method handle_100_continue_response

src/proxy/http/HttpTransact.cc:4081–4104  ·  view source on GitHub ↗

void HttpTransact::handle_100_continue_response(State* s) We've received a 100 continue response. Determine if we should just swallow the response 100 or forward it the client. http-1.1-spec-rev-06 section 8.2.3

Source from the content-addressed store, hash-verified

4079// the client. http-1.1-spec-rev-06 section 8.2.3
4080//
4081void
4082HttpTransact::handle_100_continue_response(State *s)
4083{
4084 bool forward_100 = false;
4085
4086 HTTPVersion ver = s->hdr_info.client_request.version_get();
4087 if (ver == HTTP_1_1) {
4088 forward_100 = true;
4089 } else if (ver == HTTP_1_0) {
4090 if (s->hdr_info.client_request.value_get_int(MIME_FIELD_EXPECT, MIME_LEN_EXPECT) == 100) {
4091 forward_100 = true;
4092 }
4093 }
4094
4095 if (forward_100) {
4096 // We just want to copy the server's response. All
4097 // the other build response functions insist on
4098 // adding stuff
4099 build_response_copy(s, &s->hdr_info.server_response, &s->hdr_info.client_response, s->client_info.http_version);
4100 TRANSACT_RETURN(SM_ACTION_INTERNAL_100_RESPONSE, HandleResponse);
4101 } else {
4102 TRANSACT_RETURN(SM_ACTION_SERVER_PARSE_NEXT_HDR, HandleResponse);
4103 }
4104}
4105
4106// void HttpTransact::build_response_copy
4107//

Callers

nothing calls this directly

Calls 2

version_getMethod · 0.80
value_get_intMethod · 0.80

Tested by

no test coverage detected