[ 
https://issues.apache.org/jira/browse/TS-2157?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14369793#comment-14369793
 ] 

ASF GitHub Bot commented on TS-2157:
------------------------------------

Github user ericcarlschwartz commented on a diff in the pull request:

    https://github.com/apache/trafficserver/pull/182#discussion_r26780087
  
    --- Diff: proxy/http/HttpTransact.cc ---
    @@ -5453,13 +5455,16 @@ void
     HttpTransact::initialize_state_variables_for_origin_server(State* s, 
HTTPHdr* incoming_request, bool second_time)
     {
       if (s->server_info.name && !second_time) {
    -    ink_assert(s->server_info.port != 0);
    +    ink_assert(s->server_info.dst_addr.port() != 0);
       }
     
       int host_len;
       const char *host = incoming_request->host_get(&host_len);
       s->server_info.name = s->arena.str_store(host, host_len);
    -  s->server_info.port = incoming_request->port_get();
    +  ats_ip_copy(&s->server_info.dst_addr, &s->request_data.src_ip); 
//initialize w/ junk
    +  s->server_info.dst_addr.port() = incoming_request->port_get();
    +  ip_port_text_buffer ip_s;
    +  DebugTxn("http_trans", "init_for_origin server: %s port: %d incoming 
port: %d", ats_ip_nptop(&s->server_info.dst_addr.sa, ip_s, sizeof(ip_s)), 
s->server_info.dst_addr.port(), incoming_request->port_get());
    --- End diff --
    
    i found these additional messages in the debug logs to be very helpful but 
can drop them if others want them gone.


> Replace "addr" with appropriate "src_addr" and "dst_addr" in 
> ConnectionAttributes
> ---------------------------------------------------------------------------------
>
>                 Key: TS-2157
>                 URL: https://issues.apache.org/jira/browse/TS-2157
>             Project: Traffic Server
>          Issue Type: New Feature
>          Components: Network
>            Reporter: Leif Hedstrom
>            Assignee: Eric Schwartz
>             Fix For: 6.0.0
>
>
> This would more clearly let us encapsulate the two endpoint's (IpEndpoint) 
> for each connection. In addition, we ought to be able to remove the "port" 
> member from ConnectionAttributes as well, and its convoluted and overloaded 
> semantics. The appropriate IpEndpoint (src_addr or dst_addr) would hold the 
> port information as necessary.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to