Results 1 to 3 of 3

Thread: Denying cuppertino session with 404 not 403

  1. #1

    Default Denying cuppertino session with 404 not 403

    Hi!

    I am writing a plugin to return status: 404 for a non published cuppertino live stream.

    public void onHTTPSessionCreate(IHTTPStreamerSession httpSession)
    {
        httpSession.setUserHTTPHeader("Status", "404");
        //httpSession.rejectSession();
    }
    If I use the above setUserHTTPHeader method, it doesn't override the status. The call gets forwarded down to:

    HTTPStreamerAdapterCupertinoStreamer.onPlaylist: Stream not found [live/myStream/playlist.m3u8]: myStream
    The response is still Status 200 with a playlist (and then empty chunklist).

    If I actually use rejectSession(), I get a Status 403 response (even if i use setuserhttpstatus beforehand). Is there any way to override this to a 404?

    I also tried:
    httpSession.rejectSession();
    httpSession.setUserHTTPHeader("Status", "404");
    To no avail, the status returned is still 403.

    (I omitted most of the function logic, these are the lines that should change wowza, the rest is just listing publishedStreamNames and matching it to the requested stream name).

  2. #2

    Default

    Hi,

    The only way to do this currently is to do a redirection, but set 404 and an empty Location so

    httpSession.redirectSession("",404);

    If you do a debug from a client connection you would see

    GET /vod/mp4:sample.mp4/playlist.m3u8

    HTTP/1.1 404 Not Found
    Date: Fri, 13 Jun 2014 11:04:41 GMT
    Location:
    Accept-Ranges: bytes
    Server: FlashCom/3.5.7
    Content-Length: 0

    It should do what you need.

    Andrew.

  3. #3

    Default

    Quote Originally Posted by andrew_k View Post
    Hi,

    The only way to do this currently is to do a redirection, but set 404 and an empty Location so

    httpSession.redirectSession("",404);

    If you do a debug from a client connection you would see

    GET /vod/mp4:sample.mp4/playlist.m3u8

    HTTP/1.1 404 Not Found
    Date: Fri, 13 Jun 2014 11:04:41 GMT
    Location:
    Accept-Ranges: bytes
    Server: FlashCom/3.5.7
    Content-Length: 0

    It should do what you need.

    Andrew.
    Perfect, works like a charm. Any idea if this behavior will change in the future?

Similar Threads

  1. Engine Manager Forbidden (403) error
    By kalmatv in forum General Forum
    Replies: 4
    Last Post: 03-06-2014, 09:20 AM
  2. Cuppertino streaming log
    By Luca066 in forum General Forum
    Replies: 2
    Last Post: 08-02-2012, 03:10 AM
  3. HLS + Transcoder plugin failing with 403 error
    By Vladimir Troyanovsky in forum General Forum
    Replies: 14
    Last Post: 05-11-2012, 12:55 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •