After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 440928 - Improved RTSP version support, and added Date header
Improved RTSP version support, and added Date header
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other All
: Normal normal
: 0.10.6
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2007-05-24 12:38 UTC by Peter Kjellerstedt
Modified: 2007-06-01 13:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Improved RTSP version support, and added Date header (17.34 KB, patch)
2007-05-24 12:39 UTC, Peter Kjellerstedt
none Details | Review
Improved RTSP version support, and added Date header (13.01 KB, patch)
2007-06-01 11:29 UTC, Peter Kjellerstedt
committed Details | Review

Description Peter Kjellerstedt 2007-05-24 12:38:54 UTC
Please describe the problem:
The attached patch fixes the following:

* Improves version checking, allowing an RTSP server to reply with "505 RTSP Version not supported".
* Adds a Date header to all messages.
* Replies with RTSP_EPARSE rather than RTSP_EINVALID in cases where we want to be able to send a response even if something in the request was invalid.
* Do not handle an invalid method in parse_request_line(). Defer this to the caller so it can respond with "405 Method Not Allowed".
* Improves parsing of the timeout parameter to the Session header, allowing whitespace after the semicolon. Also avoids a compiler warning due to timeout variable shadowing a function argument.


Steps to reproduce:


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Peter Kjellerstedt 2007-05-24 12:39:41 UTC
Created attachment 88730 [details] [review]
Improved RTSP version support, and added Date header
Comment 2 Peter Kjellerstedt 2007-06-01 11:29:33 UTC
Created attachment 89175 [details] [review]
Improved RTSP version support, and added Date header

This is almost the same patch as before, only that the version to use is no longer passed as an argument to rtsp_message_init_response() and rtsp_message_init_request() as suggested by Wim.

It also fixes a compiler warning in rtspconnection.c when -Wshadow is used by changing sin to sa_in in rtsp_connection_connect().
Comment 3 Wim Taymans 2007-06-01 13:07:18 UTC
        Patch by: Peter Kjellerstedt  <pkj at axis com>

        * gst/rtsp/rtspconnection.c: (rtsp_connection_create),
        (rtsp_connection_connect), (add_date_header),
        (rtsp_connection_send), (parse_response_status),
        (parse_request_line), (parse_line), (rtsp_connection_receive):
        * gst/rtsp/rtspdefs.c: (rtsp_version_as_text):
        * gst/rtsp/rtspdefs.h:
        * gst/rtsp/rtspmessage.c: (key_value_foreach),
        (rtsp_message_init_request), (rtsp_message_init_response),
        (rtsp_message_remove_header), (rtsp_message_append_headers),
        (rtsp_message_dump):
        * gst/rtsp/rtspmessage.h:
        Improves version checking, allowing an RTSP server to reply with "505
        RTSP Version not supported.
        Adds a Date header to all messages.
        Replies with RTSP_EPARSE rather than RTSP_EINVALID in cases where we
        want to be able to send a response even if something in the request was
        invalid. EINVAL is only used when passing wrong arguments to functions.
        Do not handle an invalid method in parse_request_line(). Defer this to
        the caller so it can respond with "405 Method Not Allowed".
        Improves parsing of the timeout parameter to the Session header,
        allowing whitespace after the semicolon.
        Avoids a compiler warning due to variables shadowing a function argument.