@@ -1457,9 +1457,9 @@ void ProcessHttpRequest(InputMessageBase *msg) {
14571457 return svc->CallMethod (md, cntl, NULL , NULL , done);
14581458 }
14591459
1460- const Server::MethodProperty* const sp =
1460+ const Server::MethodProperty* const mp =
14611461 FindMethodPropertyByURI (path, server, &req_header._unresolved_path );
1462- if (NULL == sp ) {
1462+ if (NULL == mp ) {
14631463 if (security_mode) {
14641464 std::string escape_path;
14651465 WebEscape (path, &escape_path);
@@ -1468,36 +1468,36 @@ void ProcessHttpRequest(InputMessageBase *msg) {
14681468 cntl->SetFailed (ENOMETHOD, " Fail to find method on `%s'" , path.c_str ());
14691469 }
14701470 return ;
1471- } else if (sp ->service ->GetDescriptor () == BadMethodService::descriptor ()) {
1471+ } else if (mp ->service ->GetDescriptor () == BadMethodService::descriptor ()) {
14721472 BadMethodRequest breq;
14731473 BadMethodResponse bres;
14741474 butil::StringSplitter split (path.c_str (), ' /' );
14751475 breq.set_service_name (std::string (split.field (), split.length ()));
1476- sp ->service ->CallMethod (sp ->method , cntl, &breq, &bres, NULL );
1476+ mp ->service ->CallMethod (mp ->method , cntl, &breq, &bres, NULL );
14771477 return ;
14781478 }
14791479 // Switch to service-specific error.
14801480 non_service_error.release ();
1481- MethodStatus* method_status = sp ->status ;
1481+ MethodStatus* method_status = mp ->status ;
14821482 resp_sender.set_method_status (method_status);
14831483 if (method_status) {
14841484 int rejected_cc = 0 ;
14851485 if (!method_status->OnRequested (&rejected_cc)) {
14861486 cntl->SetFailed (ELIMIT, " Rejected by %s's ConcurrencyLimiter, concurrency=%d" ,
1487- sp ->method ->full_name ().c_str (), rejected_cc);
1487+ mp ->method ->full_name ().c_str (), rejected_cc);
14881488 return ;
14891489 }
14901490 }
14911491
14921492 if (span) {
1493- span->ResetServerSpanName (sp ->method ->full_name ());
1493+ span->ResetServerSpanName (mp ->method ->full_name ());
14941494 }
14951495 // NOTE: accesses to builtin services are not counted as part of
14961496 // concurrency, therefore are not limited by ServerOptions.max_concurrency.
1497- if (!sp ->is_builtin_service && !sp ->params .is_tabbed ) {
1497+ if (!mp ->is_builtin_service && !mp ->params .is_tabbed ) {
14981498 if (socket->is_overcrowded () &&
14991499 !server->options ().ignore_eovercrowded &&
1500- !sp ->ignore_eovercrowded ) {
1500+ !mp ->ignore_eovercrowded ) {
15011501 cntl->SetFailed (EOVERCROWDED, " Connection to %s is overcrowded" ,
15021502 butil::endpoint2str (socket->remote_side ()).c_str ());
15031503 return ;
@@ -1522,8 +1522,8 @@ void ProcessHttpRequest(InputMessageBase *msg) {
15221522 return ;
15231523 }
15241524
1525- google::protobuf::Service* svc = sp ->service ;
1526- const google::protobuf::MethodDescriptor* method = sp ->method ;
1525+ google::protobuf::Service* svc = mp ->service ;
1526+ const google::protobuf::MethodDescriptor* method = mp ->method ;
15271527 accessor.set_method (method);
15281528 RpcPBMessages* messages = server->options ().rpc_pb_message_factory ->Get (*svc, *method);;
15291529 resp_sender.set_messages (messages);
@@ -1535,7 +1535,7 @@ void ProcessHttpRequest(InputMessageBase *msg) {
15351535 cntl->SetFailed (" Fail to new req or res" );
15361536 return ;
15371537 }
1538- if (sp ->params .allow_http_body_to_pb &&
1538+ if (mp ->params .allow_http_body_to_pb &&
15391539 method->input_type ()->field_count () > 0 ) {
15401540 // A protobuf service. No matter if Content-type is set to
15411541 // applcation/json or body is empty, we have to treat body as a json
@@ -1604,10 +1604,10 @@ void ProcessHttpRequest(InputMessageBase *msg) {
16041604 butil::IOBufAsZeroCopyInputStream wrapper (req_body);
16051605 std::string err;
16061606 json2pb::Json2PbOptions options;
1607- options.base64_to_bytes = sp ->params .pb_bytes_to_base64 ;
1608- options.array_to_single_repeated = sp ->params .pb_single_repeated_to_array ;
1609- cntl->set_pb_bytes_to_base64 (sp ->params .pb_bytes_to_base64 );
1610- cntl->set_pb_single_repeated_to_array (sp ->params .pb_single_repeated_to_array );
1607+ options.base64_to_bytes = mp ->params .pb_bytes_to_base64 ;
1608+ options.array_to_single_repeated = mp ->params .pb_single_repeated_to_array ;
1609+ cntl->set_pb_bytes_to_base64 (mp ->params .pb_bytes_to_base64 );
1610+ cntl->set_pb_single_repeated_to_array (mp ->params .pb_single_repeated_to_array );
16111611 if (!json2pb::JsonToProtoMessage (&wrapper, req, options, &err)) {
16121612 cntl->SetFailed (EREQUEST, " Fail to parse http body as %s, %s" ,
16131613 req->GetDescriptor ()->full_name ().c_str (), err.c_str ());
0 commit comments