744 |
|
|
745 |
const char * request_uri = HTTPExchange_get_request_uri(client_exchange); |
const char * request_uri = HTTPExchange_get_request_uri(client_exchange); |
746 |
Stream * output_stream = Stream_new(0); |
Stream * output_stream = Stream_new(0); |
747 |
instrument_js(request_uri, jscoverage_encoding, input_stream, output_stream); |
char * encoding = HTTPMessage_get_charset(HTTPExchange_get_response_message(server_exchange)); |
748 |
|
if (encoding == NULL) { |
749 |
|
instrument_js(request_uri, jscoverage_encoding, input_stream, output_stream); |
750 |
|
} |
751 |
|
else { |
752 |
|
instrument_js(request_uri, encoding, input_stream, output_stream); |
753 |
|
free(encoding); |
754 |
|
} |
755 |
|
|
756 |
/* send the headers to the client */ |
/* send the headers to the client */ |
757 |
for (const HTTPHeader * h = HTTPExchange_get_response_headers(server_exchange); h != NULL; h = h->next) { |
for (const HTTPHeader * h = HTTPExchange_get_response_headers(server_exchange); h != NULL; h = h->next) { |