When a module is using ctools_modal_render() to render a popup, eg adding access criteria to a panel page, JSON data is returned, but the HTTP Response has "text/html" for the Content-Type. Though this works, it doesn't allow modules to inspect responses with drupal_get_http_header() to see what type of page is being served up.

Since ctools_modal_render() essentially just calls ajax_render(), I am unsure whether this is a ctools.module problem or an ajax.module problem.