398 |
} |
} |
399 |
} |
} |
400 |
|
|
401 |
static bool should_instrument_request(HTTPExchange * exchange) { |
static bool should_instrument_request(HTTPExchange * exchange, const char * uri) { |
402 |
if (! is_javascript(exchange)) { |
if (! is_javascript(exchange)) { |
403 |
return false; |
return false; |
404 |
} |
} |
405 |
|
|
406 |
if (is_no_instrument(HTTPExchange_get_request_uri(exchange))) { |
if (is_no_instrument(uri)) { |
407 |
return false; |
return false; |
408 |
} |
} |
409 |
|
|
865 |
|
|
866 |
HTTPExchange_set_status_code(client_exchange, HTTPExchange_get_status_code(server_exchange)); |
HTTPExchange_set_status_code(client_exchange, HTTPExchange_get_status_code(server_exchange)); |
867 |
|
|
868 |
if (HTTPExchange_response_has_body(server_exchange) && should_instrument_request(server_exchange)) { |
if (HTTPExchange_response_has_body(server_exchange) && should_instrument_request(server_exchange, HTTPExchange_get_request_uri(client_exchange))) { |
869 |
/* needs instrumentation */ |
/* needs instrumentation */ |
870 |
Stream * input_stream = Stream_new(0); |
Stream * input_stream = Stream_new(0); |
871 |
if (HTTPExchange_read_entire_response_entity_body(server_exchange, input_stream) != 0) { |
if (HTTPExchange_read_entire_response_entity_body(server_exchange, input_stream) != 0) { |