Ticket #188 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

content type is set wrong

Reported by: Michiel.Schok Owned by: Michiel.Schok
Priority: trivial Milestone: MediaMosa 2.1
Component: Core Version: 2.1.1
Keywords: Cc:
MoSCoW: Should Have Estimated time after impact analysis:
Related to project: none Tested: yes
Accepted: yes Estimated Hours:

Description (last modified by Michiel.Schok) (diff)

In the case when an EGA issues a playrequest on a Windows Media file, and gives timing parameters, an object is returned specifying an .asx as the source. That is all correct.
The <content_type> of that object is set as "video/x-ms-asx" where it should be "text/html"
The <content_type> is correctly set on a similar playrequest without timing parameters.

Example:

[GET] asset/SchwHslM4RCxJ3AVv3ZbTTtF/play?mediafile_id=PWQhm8utwKNjA4AUZhvEMADc&amp;response=object&amp;user_id=foo&amp;start=10000&amp;end=20000

 <items>
    <item id="1">
      <output>... snip ...</output>
      <content_type>video/x-ms-asx</content_type>
    </item>
  </items>

while the call without timing parameters has the correct content_type

[GET] asset/SchwHslM4RCxJ3AVv3ZbTTtF/play?mediafile_id=PWQhm8utwKNjA4AUZhvEMADc&amp;response=object&amp;user_id=foo

 <items>
    <item id="1">
      <output>... snip ...</output>
      <content_type>text/html</content_type>
    </item>
  </items>

As it does not lead to any problems on the SURFmedia EGA, priority is set to trivial.

Change History

  Changed 4 years ago by Michiel.Schok

  • description modified (diff)

  Changed 3 years ago by Frans

  • milestone changed from MediaMosa 1.7 to MediaMosa 2.1

Moved to MediaMosa 2.1

  Changed 3 years ago by Frans

  • moscow set to Should Have

  Changed 3 years ago by robert

  • owner set to Michiel.Schok
  • status changed from new to assigned

needs re-testing with 2.1, the way play-requests are handled in 2.1 has been rewritten.

  Changed 3 years ago by Michiel.Schok

  • status changed from assigned to closed
  • tested set to yes
  • accepted changed from no to yes
  • resolution set to fixed

The content-type is now correctly set:

[GET] asset/3NdbOcNDTm5VEuRuKwDBTve5/play?mediafile_id=OVuDCymll2HcDE0fdb0tv7Nr&amp;response=metafile&amp;user_id=foo&amp;start=10000&amp;end=15000</request_uri>

    <item id="1">
      <output> ... snip ... </output>
      <content_type>video/x-ms-asf</content_type>
...
    </item>

  Changed 3 years ago by Michiel.Schok

  • status changed from closed to reopened
  • moscow changed from Should Have to Must Have
  • accepted changed from yes to no
  • resolution fixed deleted

Aargh... too early on the day... too less coffee... two mistakes in my previous post ...

copy/pasted out of the wrong testcase. Output content type is correctly set to

<content_type>text/html</content_type>

on the testcases.

BUT, and there is the catch, when given the timing parameters to the object call, we no more get an .asx reference, but the timing parameters are ignored in the response. I observe an error in the response (no such file).

<?xml version="1.0" encoding="UTF-8"?>
<response>
  <header>
    <item_count>1</item_count>
    <item_count_total>1</item_count_total>
    <item_offset>0</item_offset>
    <request_class>mediamosa_rest_call_asset_mediafile_play</request_class>
    <request_matched_method>GET</request_matched_method>
    <request_matched_uri>/asset/$asset_id/play</request_matched_uri>
    <request_process_time>0.053</request_process_time>
    <request_result>success</request_result>
    <request_result_description></request_result_description>
    <request_result_id>601</request_result_id>
    <request_uri>[GET] asset/3NdbOcNDTm5VEuRuKwDBTve5/play?mediafile_id=OVuDCymll2HcDE0fdb0tv7Nr&amp;response=object&amp;user_id=foo&amp;start=10000&amp;end=15000</request_uri>
    <version>2.1.0.471:4baaff770915</version>
    <request_query_count>18</request_query_count>
    <errors>
      <error>Warning: fopen(data/stills/G1TJgbNULTKWaUcejBkj5ENe.asx): failed to open stream: No such file or directory, mediamosa_asset_mediafile_play_proxy::create_response()() in file /var/opt/www/vpcore/htdocs/sites/all/modules/mediamosa/core/asset/mediafile/play_proxy/mediamosa_asset_mediafile_play_proxy.inc on line 529.</error>
    </errors>
  </header>
  <items>
    <item id="1">
      <output>&#13;
&lt;object id='OVuDCymll2HcDE0fdb0tv7Nr' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' standby='Loading Media Player components...' type='application/x-oleobject' width='' height=''&gt;&#13;
&lt;param name='filename' value='mms://wms.acceptatie.streaming.kennisnet.nl/vpx-test/5/G1TJgbNULTKWaUcejBkj5ENe' /&gt;&#13;
&lt;param name='autostart' value='true' /&gt;&#13;
&lt;embed type='application/x-mplayer2' src='mms://wms.acceptatie.streaming.kennisnet.nl/vpx-test/5/G1TJgbNULTKWaUcejBkj5ENe' autostart='1' name='OVuDCymll2HcDE0fdb0tv7Nr' width='' height=''/&gt;&#13;
&lt;/embed&gt;&#13;
&lt;/object&gt;</output>
      <content_type>text/html</content_type>
      <ticket_id>G1TJgbNULTKWaUcejBkj5ENe</ticket_id>
    </item>
  </items>
</response>

Will reopen this one, because the 'content type error' in the startpost was introduced when we got an .asx file.
Moreover, promoted to 'must have', because this solution at the moment does not work, and the solution in MM1.7.3.2 does work.

follow-up: ↓ 11   Changed 3 years ago by robert

  • status changed from reopened to closed
  • resolution set to fixed
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <header>
    <item_count>1</item_count>
    <item_count_total>1</item_count_total>
    <item_offset>0</item_offset>
    <request_class>mediamosa_rest_call_asset_mediafile_play</request_class>
    <request_matched_method>GET</request_matched_method>
    <request_matched_uri>/asset/$asset_id/play</request_matched_uri>
    <request_process_time>0.0949</request_process_time>
    <request_result>success</request_result>
    <request_result_description></request_result_description>
    <request_result_id>601</request_result_id>
    <request_uri>[GET] asset/o2nfYhLMpFqPWFJMHTVQ3Uh1/play?user_id=admin&amp;mediafile_id=qVtVhFml6OcekjSVfcB0E3DU&amp;response=object&amp;start=1000&amp;autostart=true</request_uri>
    <version>2.1.1.474:da1ea9975509</version>
    <request_query_count>19</request_query_count>
  </header>
  <items>
    <item id="1">
      <output>&#13;
&lt;object id='qVtVhFml6OcekjSVfcB0E3DU' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' standby='Loading Media Player components...' type='application/x-oleobject' width='' height=''&gt;&#13;
&lt;param name='filename' value='http://download.mediamosa.local/still/B1tYuQRdXMMr6vXjPHS0grVb.asx' /&gt;&#13;
&lt;param name='autostart' value='true' /&gt;&#13;
&lt;embed type='application/x-mplayer2' src='http://download.mediamosa.local/still/B1tYuQRdXMMr6vXjPHS0grVb.asx' autostart='1' name='qVtVhFml6OcekjSVfcB0E3DU' width='' height=''/&gt;&#13;
&lt;/embed&gt;&#13;
&lt;/object&gt;</output>
      <content_type>video/x-ms-asx</content_type>
      <ticket_id>B1tYuQRdXMMr6vXjPHS0grVb</ticket_id>
    </item>
  </items>
</response>

Fixed in 2.1.1 (build 474+)

  Changed 3 years ago by robert

  • tested changed from yes to no

  Changed 3 years ago by robert

Ow btw, there is no 'end' parameter. Checked 1.7.2, and its not in that version either. What do see is the parameter 'duration'.

  Changed 3 years ago by Michiel.Schok

yeah, you are right. The 'end' or 'stop' parameter is a SURFmedia parameter. In SURFmedia we compute the difference between 'start' and 'end', and put that into a VP-Core call.

I'm testing SURFmedia 2.3 and VP-Core 2.1 simultaneously, and can assure you: it's easy to mix up parameters...

in reply to: ↑ 7   Changed 3 years ago by Michiel.Schok

  • status changed from closed to reopened
  • resolution fixed deleted

Replying to robert:

{{{
<request_uri>[GET] asset/o2nfYhLMpFqPWFJMHTVQ3Uh1/play?user_id=admin&amp;mediafile_id=qVtVhFml6OcekjSVfcB0E3DU&amp;response=object&amp;start=1000&amp;autostart=true</request_uri>

<content_type>video/x-ms-asx</content_type>
}}}

Fixed in 2.1.1 (build 474+)

And now we are back to the 'opening post' where I proposed a different content_type, 'text/html' as this object is no different than an object without timing parameters.

  Changed 3 years ago by Michiel.Schok

  • moscow changed from Must Have to Should Have

  Changed 3 years ago by robert

  • status changed from reopened to closed
  • resolution set to fixed
<?xml version="1.0" encoding="UTF-8"?>
<response>
  <header>
    <item_count>1</item_count>
    <item_count_total>1</item_count_total>
    <item_offset>0</item_offset>
    <request_class>mediamosa_rest_call_asset_mediafile_play</request_class>
    <request_matched_method>GET</request_matched_method>
    <request_matched_uri>/asset/$asset_id/play</request_matched_uri>
    <request_process_time>0.0565</request_process_time>
    <request_result>success</request_result>
    <request_result_description></request_result_description>
    <request_result_id>601</request_result_id>
    <request_uri>[GET] asset/o2nfYhLMpFqPWFJMHTVQ3Uh1/play?user_id=admin&amp;mediafile_id=qVtVhFml6OcekjSVfcB0E3DU&amp;response=object&amp;start=1000&amp;autostart=true</request_uri>
    <version>2.1.1.478:acc4226e8ec1</version>
    <request_query_count>19</request_query_count>
  </header>
  <items>
    <item id="1">
      <output>&#13;
&lt;object id='qVtVhFml6OcekjSVfcB0E3DU' classid='CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95' standby='Loading Media Player components...' type='application/x-oleobject' width='' height=''&gt;&#13;
&lt;param name='filename' value='http://download.mediamosa.local/still/K1bVmW9jRWYeTKfAvHKKOwZr.asx' /&gt;&#13;
&lt;param name='autostart' value='true' /&gt;&#13;
&lt;embed type='application/x-mplayer2' src='http://download.mediamosa.local/still/K1bVmW9jRWYeTKfAvHKKOwZr.asx' autostart='1' name='qVtVhFml6OcekjSVfcB0E3DU' width='' height=''/&gt;&#13;
&lt;/embed&gt;&#13;
&lt;/object&gt;</output>
      <content_type>text/html</content_type>
      <ticket_id>K1bVmW9jRWYeTKfAvHKKOwZr</ticket_id>
    </item>
  </items>
</response>

Content-type is now 'text/html'.

  Changed 3 years ago by robert

  • version set to 2.1.1

  Changed 3 years ago by Michiel.Schok

  • tested changed from no to yes
  • accepted changed from no to yes

Content-type is indeed correct.

We now observe that the generated and referenced .asx file is not downloadable from the server. I will create a seperate ticket for that case.

Note: See TracTickets for help on using tickets.