How to enable mp3 content type in SAP Authoring Tool

Answer

String range = request.getHeader("Range");
MediaLoader.ByteRange rangeSpec = null;
if ((range != null) && (range.startsWith("bytes=")))
{
  range = range.substring(6);
  int inx = range.indexOf("-");
  if (inx > 0)
  {
    int start = Integer.parseInt(range.substring(0, inx).trim());
    int end = Integer.parseInt(range.substring(inx + 1).trim());

    rangeSpec = new MediaLoader.ByteRange(start, end);
  }
}

First it extracts "Range" from header and expect to be in format "bytes=-" So valid value could be "bytes=0-100" or bytes=0-200 for example But in our case "Range" has value "bytes=0-" so it fails on parsing on:

int end = Integer.parseInt(range.substring(inx + 1).trim());

Inside catch section during error handling at the end it returns 404:

response.sendError(404, "404 (NOT FOUND): " + path);

which is false information.

SAP is handling error on header attribute parsing in a very problematic way - it says that such resource not exists!

All sap Questions

Ask your interview questions on sap

Write Your comment or Questions if you want the answers on sap from sap Experts
Name* :
Email Id* :
Mob no* :
Question
Or
Comment* :
 





Disclimer: PCDS.CO.IN not responsible for any content, information, data or any feature of website. If you are using this website then its your own responsibility to understand the content of the website

--------- Tutorials ---