code: public void writeHeaders(HttpResponse response,Resource resource, long count)
          throws IOException
      {
          ResourceCache.ResourceMetaData metaData =
              (ResourceCache.ResourceMetaData)resource.getAssociate();
  
          response.setContentType(metaData.getMimeType());
          if (count != -1)
          {
              if (count==resource.length())
                  response.setField(HttpFields.__ContentLength,metaData.getLength());
              else
                  response.setContentLength((int)count);
          }
  
          response.setField(HttpFields.__LastModified,metaData.getLastModified());
          
          if (_acceptRanges && response.getHttpRequest().getDotVersion()>0)
              response.setField(HttpFields.__AcceptRanges,"bytes");
      }
docs: /* ------------------------------------------------------------