apache-modules

Is it possible to splice advertisements or messages dynamically into an MP3 file via a standard GET request?

随声附和 提交于 2020-03-26 05:21:24
问题 Say you have an MP3 file and it's 60,000,000 bytes, and you also have an MP3 advertisement that's 500,000 bytes, both encoded at the same bit rate. Would it be possible using an nginx or apache module to change the MP3 "Content-Length" header value to 60,500,000 and then control the incoming "Content-Range" requests so the first 500,000 bytes return the advertisement audio, and any range request greater than 500,000 begins returning the regular audio file with a 500,000 byte offset? Or is it

Is it possible to splice advertisements or messages dynamically into an MP3 file via a standard GET request?

我们两清 提交于 2020-03-26 05:20:50
问题 Say you have an MP3 file and it's 60,000,000 bytes, and you also have an MP3 advertisement that's 500,000 bytes, both encoded at the same bit rate. Would it be possible using an nginx or apache module to change the MP3 "Content-Length" header value to 60,500,000 and then control the incoming "Content-Range" requests so the first 500,000 bytes return the advertisement audio, and any range request greater than 500,000 begins returning the regular audio file with a 500,000 byte offset? Or is it

URL Rewriting doesn't seem to work. Apache2

自古美人都是妖i 提交于 2020-02-27 22:54:12
问题 I would like it so that when the user goes to http://mysite.com/home that it redirects him to http://mysite.com/page.php?id=home . This is what I put in my .htaccess, but it doesn't seem to work. RewriteEngine On RewriteRule ^/(.+)$ page.php?id=$1 [NC,L] It just sends me to the /home directory, with a nice 404. Help is appreciated. Thanks. Edit: I've tried some rewrite I know work, so now I'm certain it's not that my problem. I checked with phpinfo() and yes, mod rewrite is running, I set up

URL Rewriting doesn't seem to work. Apache2

雨燕双飞 提交于 2020-02-27 22:54:08
问题 I would like it so that when the user goes to http://mysite.com/home that it redirects him to http://mysite.com/page.php?id=home . This is what I put in my .htaccess, but it doesn't seem to work. RewriteEngine On RewriteRule ^/(.+)$ page.php?id=$1 [NC,L] It just sends me to the /home directory, with a nice 404. Help is appreciated. Thanks. Edit: I've tried some rewrite I know work, so now I'm certain it's not that my problem. I checked with phpinfo() and yes, mod rewrite is running, I set up

Global variables in Apache Server

我的梦境 提交于 2020-01-03 17:29:15
问题 I'm writing some apache (2.2) modules in C and I'm pretty new at it, so I was wondering: I need to know if it's possible to create a global variable that will be initiated whenever the apache server starts to run. See, I need to have a list of host names (that will be "privileged"), so that every request I get, I need to check if the host name appears in the list (to check if it's "previleged"). So the list should be global (so that every server instance will have the same instance of the

Apache module command parser prototype

旧巷老猫 提交于 2020-01-01 17:12:03
问题 I am creating an Apache2 module and experiencing a weird compilation problem. This is prototype of my function used to parse config command named " analytics_ip ": static const char *apr_cfg_set_analytics_ip(cmd_parms *cmd, void *config, const char *data); This is array of command_rec structures containing pointers to this function: static const command_rec apr_cmds[] = { AP_INIT_TAKE1("analytics_ip", apr_cfg_set_analytics_ip, NULL, OR_ALL, ""), { NULL } }; Structure command_rec is declared

Install apache module X-Sendfile on MAMP

两盒软妹~` 提交于 2019-12-24 20:04:18
问题 How can I install X-Sendfile apache module so that MAMP can use it? I have followed these instructions to install X-Sendfile, but it didn't work (it seems like it just installed it for the default apache installation). I also tried to manually copy /usr/libexec/apache2/mod_xsendfile.so to /Applications/MAMP/Library/modules/ , but that produced the following error when restarting Apache: Cannot load /Applications/MAMP/Library/modules/mod_xsendfile.so into server: cannot create object file

Failed to compile project with Excel library connected

柔情痞子 提交于 2019-12-24 18:43:36
问题 Trying to compile project with Excel libraries, for to read and write *.xls and *.xlsx files. Also I have imported com.android.support:multidex:1.0.3 library and set multiDexEnabled to true in default config. Libraries are the last 5 entries in my build.gradle dependencies: apply plugin: 'com.android.application' android { compileSdkVersion 28 buildToolsVersion '28.0.3' defaultConfig { applicationId "com.hand.measurements" minSdkVersion 14 targetSdkVersion 28 versionCode 1 versionName "1.0"

Failed to compile project with Excel library connected

半世苍凉 提交于 2019-12-24 18:42:21
问题 Trying to compile project with Excel libraries, for to read and write *.xls and *.xlsx files. Also I have imported com.android.support:multidex:1.0.3 library and set multiDexEnabled to true in default config. Libraries are the last 5 entries in my build.gradle dependencies: apply plugin: 'com.android.application' android { compileSdkVersion 28 buildToolsVersion '28.0.3' defaultConfig { applicationId "com.hand.measurements" minSdkVersion 14 targetSdkVersion 28 versionCode 1 versionName "1.0"

segfault happens when I serialize nested class in apache module

ぃ、小莉子 提交于 2019-12-24 07:46:36
问题 Serializing simple class "A" in Apache module done without error but when I tried to serialize my complex object like "X" which has a member, type of "A", I got segfault in Apache module. ( this doesn't happen to a executable console application ) ------------------------- here is my code : --------------------- class A { private: friend class boost::serialization::access; // to enable boost "access" class to call private "serialize" method of class "A" template<class ArchT> void serialize