apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 57589] New: "If-Modified-Since" header detected in HTTP unconditional GET request
Date Wed, 18 Feb 2015 07:24:56 GMT
https://bz.apache.org/bugzilla/show_bug.cgi?id=57589

            Bug ID: 57589
           Summary: "If-Modified-Since" header detected in HTTP
                    unconditional GET request
           Product: APR
           Version: HEAD
          Hardware: PC
            Status: NEW
          Severity: normal
          Priority: P5
         Component: APR
          Assignee: bugs@apr.apache.org
          Reporter: bala@adobe.com

Our product is Adobe Media Server (AMS). It uses the Apache web server for
streaming multimedia over HTTP. There are 4 Apache httpd modules developed by
us that are included in our Apache build. One of these modules – mod_f4fhttp.so
is concerned with live streaming of multimedia using the HDS standard.

Issue: For some unconditional GET requests, querying the Apache APR API
apr_table_get for “If-Modified-Since” header field returns a valid value.

This issue is observed only in the release build of Apache web server. The
setup consists of Flash Media Live Encoder (FMLE) as the live video publisher
and 3 video subscribers (OSMF Player 2.0 instances embedded in web browsers).
With Apache httpd release build, the issue crops up within 10 minutes of live
streaming. When the debug build is used, the issue does not appear even after 2
hours of streaming.

The mod_f4fhttp.so module uses the Apache API function apr_table_get to query
the request object for the presence of “If-Modified-Since” header field. The
problem arises when this API returns a valid non-null value for the
“If-Modified-Since” header field even when it is not present (i.e. it’s an
unconditional GET) in the HTTP request.  This can be confirmed by the logs
(attached) of packet capture tools.

This behavior causes the mod_f4fhttp.so module to think that the HTTP request
is a conditional one and so it returns a 304 response code. This is a problem
for the client since it had generated an unconditional GET request.

This (querying the “If-Modified-Since” header) was done at the entry point of
the module mod_f4fhttp.so, so this eliminates the possibility of the module
itself inserting this field in the request.

It does not matter whether the debug or release version of mod_f4fhttp.so
module is used – regardless of that, the issue can be seen in the Apache httpd
release build only. The issue cannot be reproduced in the debug build of Apache
httpd.

Three different network packet capture tools were used – Wireshark, Windump and
HTTPDebugger.  There are no differences between their capture logs i.e. 304
responses for unconditional GET requests can be seen in all of them. The logs
are attached here.

Steps to reproduce the issue:
1. Install Adobe Media Player (AMS) 5.0.7. During installation, when it asks
for a serial number, leave it blank – this will install the “Starter Edition”.
Leave all other options unchanged during installation. The limitation of
“Starter Edition” is that it allows 10 minutes of streaming, which is enough to
reproduce this issue. 
2. Copy crossdomain.xml to “webroot” folder in the AMS installation.
3. Install Flash Media Live Encoder (FMLE) 3.2.
4. Launch FMLE. 
    o Ensure the following settings in the presets
    Video:
    Format: H.264
    Profile: Main
    Level: 3.1
    Keyframe Frequency: 4 seconds
    Frame Rate: 30.00 fps
    Input Size: 320x240
    Bit Rate: 200 Kbps
    Output Size: 320x240

    Audio:
    Format: Mp3
    Channels: Stereo
    Sample Rate: 44100 Hz
    Bit Rate: 96 Kbps

    o Set the following fields in the Output box
         Check “Stream to Flash Media Player”
         FMS URL: rtmp://localhost/livepkgr
         Stream: livestream?adbe-live-event=liveevent

    o Click on Connect. [The button’s caption should now change to
“Disconnect”].
    o Click on Start (the green button at the bottom of the window). This will
start the publishing stream from FMLE to AMS.
5. Launch OSMF Player instances. The player has to be hosted on an http server.
A second machine can be used for this. In a web browser, open the OSMF Player
web page. E.g. http://localhost/OSMFP/OSMFPlayer.html. The attached OSMFPlayer
build can be used. Two more instances of the player can launched – either in
the same browser or different ones. If the player launches successfully, a
control console will be visible in a smaller window on the web page. Click on
the “Eject” button to open the “Media URL” textbox. Enter the URL of the live
stream manifest in this box – http://<hostname or IP address where AMS is
installed>/hds-live/livepkgr/_definst_/liveevent/livestream.f4m - and press
Enter. The live stream should now start playing in the window.


Notes
• When caching is disabled (by commenting out "CacheEnable disk /hds-live" in
httpd.conf), this issue does not arise. 
• The same issue is also confirmed to be present in Apache httpd v2.2.21

Download links:
Adobe Media Server (AMS) -
http://www.adobe.com/in/products/adobe-media-server-standard.html
Flash Media Live Encode (FMLE) -
http://www.adobe.com/in/products/flash-media-encoder.html
OSMF Player 2.0 source -
http://sourceforge.net/projects/osmf.adobe/files/OSMF%202.0%20Release%20%28final%20source%2C%20ASDocs%2C%20pdf%20guides%20and%20release%20notes%29/


Attachments
• Packet capture logs
    o Wireshark – “wireshark-s.pcapng”. Frame 297 is the HTTP request for a
video fragment. Its response is in Frame 298.
    o Windump – “windump.log”. Check the end of the log for the 304 response.
    o HTTPDebugger – “http debugger - headers.txt”
• crossdomain.xml
• OSMF Player

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org


Mime
View raw message