<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>12217</bug_id>
          
          <creation_ts>2011-03-02 04:56:59 +0000</creation_ts>
          <short_desc>Suggestion: Allow other &apos;Content-Type&apos;s to result from javascript: scheme URI dereferencing</short_desc>
          <delta_ts>2011-08-04 05:16:31 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>HTML WG</product>
          <component>LC1 HTML5 spec</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>All</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>WONTFIX</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Luis">l0mars01</reporter>
          <assigned_to name="Ian &apos;Hixie&apos; Hickson">ian</assigned_to>
          <cc>ian</cc>
    
    <cc>julian.reschke</cc>
    
    <cc>l0mars01</cc>
    
    <cc>mike</cc>
    
    <cc>public-html-admin</cc>
    
    <cc>public-html-wg-issue-tracking</cc>
    
    <cc>shadow2531</cc>
    
    <cc>w3c</cc>
          
          <qa_contact name="HTML WG Bugzilla archive list">public-html-bugzilla</qa_contact>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>46170</commentid>
    <comment_count>0</comment_count>
    <who name="Luis">l0mars01</who>
    <bug_when>2011-03-02 04:56:59 +0000</bug_when>
    <thetext>http://www.w3.org/TR/html5/webappapis.html#javascript-protocol
Currently, dereferencing a javascript: scheme URI treats its script evaluation result as the body of an HTTP response with Content-Type &apos;text/html&apos;. Navigation then uses Media Type Sniffing to adjust this Content-Type and dispatch corresponding processing.
http://www.w3.org/TR/html5/fetching-resources.html#content-type-sniffing-0
According to &apos;Media Type Sniffing&apos;, the sniffed content type is either &apos;text/html&apos;, &apos;application/rss+xml&apos;, or &apos;application/atom+xml&apos;. This precludes processing for other media types (eg, other XML media types like &apos;application/xhtml+xml&apos; or &apos;image/svg+xml&apos;) a javascript: URI could generate.

I propose allowing the script result to explicitly specify the HTTP &apos;Content-Type&apos; entity header as if it were a partial HTTP response lacking a start-line. Eg, evaluating the script could result in a string like this:
Content-Type: &lt;media-type&gt;

&lt;message-body&gt;
The user-agent could supply a function to facilitate writing these correctly (inserting field-names, colons, and carriage return linefeed sequences; cleaning the content; etc). I invite the reader to consider other options if this one is unsatisfactory.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>46213</commentid>
    <comment_count>1</comment_count>
    <who name="Adam Barth">w3c</who>
    <bug_when>2011-03-03 07:27:04 +0000</bug_when>
    <thetext>I doubt WebKit would implement this behavior.  Please use data URLs instead.  JavaScript URLs exist only to service legacy content.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>48140</commentid>
    <comment_count>2</comment_count>
    <who name="Ian &apos;Hixie&apos; Hickson">ian</who>
    <bug_when>2011-05-06 00:22:25 +0000</bug_when>
    <thetext>EDITOR&apos;S RESPONSE: This is an Editor&apos;s Response to your comment. If you are satisfied with this response, please change the state of this bug to CLOSED. If you have additional information and would like the editor to reconsider, please reopen this bug. If you would like to escalate the issue to the full HTML Working Group, please add the TrackerRequest keyword to this bug, and suggest title and text for the tracker issue; or you may create a tracker issue yourself, if you are able to do so. For more details, see this document:
   http://dev.w3.org/html5/decision-policy/decision-policy.html

Status: Rejected
Change Description: no spec change
Rationale: see comment 1. This is just legacy behaviour.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>53706</commentid>
    <comment_count>3</comment_count>
    <who name="Michael[tm] Smith">mike</who>
    <bug_when>2011-08-04 05:16:31 +0000</bug_when>
    <thetext>mass-move component to LC1</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>