mirror of
https://github.com/moparisthebest/spdylay
synced 2024-11-04 16:45:07 -05:00
shrpx: Remove upstream_spdy_stream and upstream_spdy_stream_close
upstream_response logs more detailed information.
This commit is contained in:
parent
90eebbc88c
commit
8c456674cf
@ -63,31 +63,6 @@ void upstream_connect(const std::string& client_ip)
|
||||
}
|
||||
}
|
||||
|
||||
void upstream_spdy_stream(const std::string& client_ip, int32_t stream_id)
|
||||
{
|
||||
char datestr[64];
|
||||
get_datestr(datestr);
|
||||
fprintf(stderr, "%s [%s] SYN_STREAM %d\n", client_ip.c_str(), datestr,
|
||||
stream_id);
|
||||
fflush(stderr);
|
||||
if(get_config()->use_syslog) {
|
||||
syslog(LOG_INFO, "%s SYN_STREAM %d\n", client_ip.c_str(), stream_id);
|
||||
}
|
||||
}
|
||||
|
||||
void upstream_spdy_stream_close(const std::string& client_ip,
|
||||
int32_t stream_id)
|
||||
{
|
||||
char datestr[64];
|
||||
get_datestr(datestr);
|
||||
fprintf(stderr, "%s [%s] STREAM_CLOSE %d\n",
|
||||
client_ip.c_str(), datestr, stream_id);
|
||||
fflush(stderr);
|
||||
if(get_config()->use_syslog) {
|
||||
syslog(LOG_INFO, "%s STREAM_CLOSE %d\n", client_ip.c_str(), stream_id);
|
||||
}
|
||||
}
|
||||
|
||||
namespace {
|
||||
const char* status_code_color(int status_code)
|
||||
{
|
||||
|
@ -34,9 +34,6 @@ namespace shrpx {
|
||||
class Downstream;
|
||||
|
||||
void upstream_connect(const std::string& client_ip);
|
||||
void upstream_spdy_stream(const std::string& client_ip, int32_t stream_id);
|
||||
void upstream_spdy_stream_close(const std::string& client_ip,
|
||||
int32_t stream_id);
|
||||
void upstream_response(const std::string& client_ip, int status_code,
|
||||
Downstream *downstream);
|
||||
|
||||
|
@ -99,10 +99,6 @@ void on_stream_close_callback
|
||||
<< " is being closed";
|
||||
}
|
||||
Downstream *downstream = upstream->find_downstream(stream_id);
|
||||
if(get_config()->accesslog) {
|
||||
upstream_spdy_stream_close(upstream->get_client_handler()->get_ipaddr(),
|
||||
stream_id);
|
||||
}
|
||||
if(downstream) {
|
||||
if(downstream->get_request_state() == Downstream::CONNECT_FAIL) {
|
||||
upstream->remove_downstream(downstream);
|
||||
@ -219,10 +215,6 @@ void on_ctrl_recv_callback
|
||||
upstream->rst_stream(downstream, SPDYLAY_INTERNAL_ERROR);
|
||||
return;
|
||||
}
|
||||
if(get_config()->accesslog) {
|
||||
upstream_spdy_stream(upstream->get_client_handler()->get_ipaddr(),
|
||||
frame->syn_stream.stream_id);
|
||||
}
|
||||
downstream->set_request_state(Downstream::HEADER_COMPLETE);
|
||||
if(frame->syn_stream.hd.flags & SPDYLAY_CTRL_FLAG_FIN) {
|
||||
downstream->set_request_state(Downstream::MSG_COMPLETE);
|
||||
|
Loading…
Reference in New Issue
Block a user