/[jscoverage]/tags/jscoverage-0.4/jscoverage-server.c
ViewVC logotype

Diff of /tags/jscoverage-0.4/jscoverage-server.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 134 by siliconforks, Thu Jun 19 05:54:02 2008 UTC revision 146 by siliconforks, Thu Jun 19 19:33:05 2008 UTC
# Line 883  Line 883 
883    
884      const char * content_type = get_content_type(filesystem_path);      const char * content_type = get_content_type(filesystem_path);
885      HTTPExchange_set_response_header(exchange, HTTP_CONTENT_TYPE, content_type);      HTTPExchange_set_response_header(exchange, HTTP_CONTENT_TYPE, content_type);
886      const char * request_uri = HTTPExchange_get_request_uri(exchange);      if (strcmp(content_type, "text/javascript") == 0 && ! is_no_instrument(abs_path)) {
     if (strcmp(content_type, "text/javascript") == 0 && ! is_no_instrument(request_uri)) {  
887        Stream * input_stream = Stream_new(0);        Stream * input_stream = Stream_new(0);
888        Stream * output_stream = Stream_new(0);        Stream * output_stream = Stream_new(0);
889    
890        Stream_write_file_contents(input_stream, f);        Stream_write_file_contents(input_stream, f);
891    
892        instrument_js(request_uri, input_stream, output_stream);        instrument_js(abs_path, input_stream, output_stream);
893    
894        if (HTTPExchange_write_response(exchange, output_stream->data, output_stream->length) != 0) {        if (HTTPExchange_write_response(exchange, output_stream->data, output_stream->length) != 0) {
895          HTTPServer_log_err("Warning: error writing to client\n");          HTTPServer_log_err("Warning: error writing to client\n");

Legend:
Removed from v.134  
changed lines
  Added in v.146

  ViewVC Help
Powered by ViewVC 1.1.24