Opened 12 years ago

Closed 12 years ago

#3990 closed patch (fixed)

Fix streaming/direct download in mythweb when going via an apache/mod_proxy server

Reported by: anonymous Owned by: Rob Smith
Priority: minor Milestone: unknown
Component: mythweb Version: unknown
Severity: medium Keywords:
Cc: Ticket locked: no

Description

The video_url() function in includes/utils.php does not work correctly when going via an apache/mod_proxy server.

The server that manages my DSL Connection/Firewall?/NAT etc. also runs Apache, and I've configured (using mod_proxy) to proxy requests through to my MythTV system.

When I access mythweb from within my network (ie not going via mod_proxy) I get correct URL's using private IP addresses within my network, however when I'm at work I connect into mythweb via mod_proxy and the URL's still contain private IP's - meaning that I cannot download/steam my recordings.

This patch fixes that by using HTTP headers that mod_proxy inserts.

Attachments (3)

apache_mod_proxy.patch (1.9 KB) - added by bradley.kite@… 12 years ago.
Fix video_url function to return correct URL's when going via an Apache/mod_proxy server
apache_mod_proxy.2.patch (2.9 KB) - added by bradley.kite@… 12 years ago.
Fix video_url function to return correct URL's when going via an Apache/mod_proxy server
apache_mod_proxy.3.patch (3.5 KB) - added by bradley.kite@… 12 years ago.
Fix video_url function to return correct URL's when going via an Apache/mod_proxy server

Download all attachments as: .zip

Change History (7)

Changed 12 years ago by bradley.kite@…

Attachment: apache_mod_proxy.patch added

Fix video_url function to return correct URL's when going via an Apache/mod_proxy server

Changed 12 years ago by bradley.kite@…

Attachment: apache_mod_proxy.2.patch added

Fix video_url function to return correct URL's when going via an Apache/mod_proxy server

comment:1 Changed 12 years ago by Rob Smith

Owner: changed from xris to Rob Smith
Status: newassigned

comment:2 Changed 12 years ago by Rob Smith

Care to re-write this to use a define (in includes/defines.php) called http_host?

I'll get around to it, but if you do it, it'll likely be done sooner.

Changed 12 years ago by bradley.kite@…

Attachment: apache_mod_proxy.3.patch added

Fix video_url function to return correct URL's when going via an Apache/mod_proxy server

comment:3 Changed 12 years ago by bradley.kite@…

Patch re-written as requested. Unfortunatley there is also a perl handler.pl script which is affected too and this cannot use the php defines - I hope this is OK.

comment:4 Changed 12 years ago by Rob Smith

Resolution: fixed
Status: acceptedclosed

(In [15492]) Fixes #3990, this allows streaming over https via mod_proxy and the like. Thanks bradley.kite

Note: See TracTickets for help on using tickets.