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.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to