|
|

07-26-2008, 04:33 PM
|
|
Senior Member
|
|
Join Date: Jul 2008
Posts: 147
|
|
mod_headers/files compatibility
Hi there
I've planned to force WMV files to be downloaded instead of stream by Windows Media Player in some IE browsers without Download Managers
should add some special response Headers when it requests WMV files
This is my Apache configuration which works charmly:
Code:
<Files "\.(wmv|WMV)$">
Header add Content-Description "File Transfer"
Header add Content-Type "video/x-ms-wmv"
Header add Content-Disposition "attachment"
</Files>
But when i add this into LSWS Apache Style configurations doesnt work properly
no any extra response headers will be added
Whats wrong? something with my configurations? or it doesnt support Files or Header directives?
Thanks LSWS Developers, specially Geroge that i know he will answer n probably solve this issue
Last edited by IrPr; 07-26-2008 at 04:49 PM..
|

07-26-2008, 04:44 PM
|
|
Senior Member
|
|
Join Date: Jul 2008
Posts: 147
|
|
Edit:
I've tried SetEnvIf instead, but still same problem, no header will be added
Code:
SetEnvIf Request_URI "\.wmv$" requested_wmv=wmv
Header add Content-Description "File Transfer" env=requested_wmv
Header add Content-Disposition "Attachment" env=requested_wmv
Seems to be Header directive incompatibility to me, but it supports, George said here
PS: i dont restart whole LSWS, just gracefully restart, aint need inital daemon restart to apply?
Last edited by IrPr; 07-26-2008 at 04:50 PM..
|

07-28-2008, 05:45 PM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,585
|
|
|
The configuration in the first post should work with latest 3.3.16 build. The "Header" directive was not supported.
|

07-29-2008, 02:52 AM
|
|
Senior Member
|
|
Join Date: Jul 2008
Posts: 147
|
|
|
Thanks George
I've upgraded to latest 3.3.16 release but still not workin properly
|

07-29-2008, 11:46 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,585
|
|
|
Try header add in .htaccess, if the whole directory hold wmv, get rid of the "<files...>"
|

07-29-2008, 12:59 PM
|
|
Senior Member
|
|
Join Date: Jul 2008
Posts: 147
|
|
Quote:
Originally Posted by mistwang
Try header add in .htaccess, if the whole directory hold wmv, get rid of the "<files...>"
|
Ok, Thanks
i will test and reply
|

07-30-2008, 03:05 AM
|
|
Senior Member
|
|
Join Date: Jul 2008
Posts: 147
|
|
Quote:
Originally Posted by mistwang
Try header add in .htaccess, if the whole directory hold wmv, get rid of the "<files...>"
|
Header directive in htaccess is working well:
.htaccess:
Code:
Header add Content-Description "File Transfer"
#Header add Content-Type "video/x-ms-wmv"
Header add Content-Disposition "attachment"
Request:
Code:
GET /test/wmv HTTP/1.1
Host: localhost
Response header:
Code:
HTTP/1.1 200 OK
Date: Wed, 30 Jul 2008 09:58:12 GMT
Server: LiteSpeed
Accept-Ranges: bytes
Connection: Keep-Alive
Keep-Alive: timeout=5, max=100
ETag: "a6eb915-4804c40d-1cc8118"
Last-Modified: Tue, 15 Apr 2008 15:04:45 GMT
Content-Type: application/octet-stream
Content-Length: 175028501
Content-Description: File Transfer
Content-Disposition: attachment
But no way to set any condition, <Files> or SetEnfIf
would be implemented please?
PS: Files directive isnt supported in htaccess files by httpd, just global/vh configurations
|

07-30-2008, 10:40 AM
|
|
LiteSpeed Staff
|
|
Join Date: May 2003
Location: New Jersey
Posts: 7,585
|
|
|
<Files> should work in .htaccess as well.
|
| Thread Tools |
|
|
| Display Modes |
Hybrid Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 12:14 PM.
|
|