2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-15 22:26:04 +00:00

02_HTTPSRV: reverted addition of backslash (it does not work as intended and it is not downward compatible)

git-svn-id: https://svn.fhem.de/fhem/trunk@8781 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2015-06-20 07:36:16 +00:00
parent 422dde947a
commit a7782eee91
2 changed files with 5 additions and 12 deletions

View File

@ -13,8 +13,6 @@
- bugfix: 70_Pushalot: corrected parameter order for image
- change: 70_Pushalot: changed http call to non-blocking
- feature: 70_Pushalot: module to send push notification to Windows Phone
- change: 02_HTTPSRV: require trailing slash in infix to foster
integration of TabletUI
- feature: 59_Weather: polish translations (Lukasz)
- changed: 57_CALVIEW.pm: code cleanup
- bugfix: 30_pilight_*: restore (StateFn), trigger changes twice

View File

@ -63,9 +63,6 @@ HTTPSRV_Define($$) {
return "Usage: define <name> HTTPSRV <infix> <directory> <friendlyname>" if(int(@a) != 5);
my $name= $a[0];
my $infix= $a[2];
if($infix !~ m-/$-) {
$infix = "$infix/";
}
my $directory= $a[3];
my $friendlyname= $a[4];
@ -117,7 +114,7 @@ sub HTTPSRV_CGI() {
my ($request) = @_; # /$infix/filename
if($request =~ m,^(/[^/]+/)((.*)?)?$,) {
if($request =~ m,^(/[^/]+)(/(.*)?)?$,) {
my $link= $1;
my $filename= $3;
my $name;
@ -183,7 +180,7 @@ sub HTTPSRV_CGI() {
<h3>HTTPSRV</h3>
<ul>
Provides a mini HTTP server plugin for FHEMWEB. It serves files from a given directory.
It optionally accepts a query string to set readings of this device if an attribute allows the given reading.<p>
It optionally accepts a query string to set readings of this device if an attribute allows the given reading<p>
HTTPSRV is an extension to <a href="HTTPSRV">FHEMWEB</a>. You must install FHEMWEB to use HTTPSRV.</p>
@ -194,16 +191,14 @@ sub HTTPSRV_CGI() {
Defines the HTTP server. <code>&lt;infix&gt;</code> is the portion behind the FHEMWEB base URL (usually
<code>http://hostname:8083/fhem</code>), <code>&lt;directory&gt;</code> is the absolute path the
files are served from, and <code>&lt;friendlyname&gt;</code> is the name displayed in the side menu of
FHEMWEB. <code>&lt;infix&gt;</code> should contain a trailing slash, which is automatically added to
the definition if it is missing in the define statement.<p><p>
files are served from, and <code>&lt;friendlyname&gt;</code> is the name displayed in the side menu of FHEMWEB.<p><p>
Example:
<ul>
<code>define myJSFrontend HTTPSRV jsf /usr/share/jsfrontend/ My little frontend</code><br>
<code>define myJSFrontend HTTPSRV jsf /usr/share/jsfrontend My little frontend</code><br>
or <br>
<code>
define kindleweb HTTPSRV kindle /opt/fhem/kindle/ Kindle Web<br>
define kindleweb HTTPSRV kindle /opt/fhem/kindle Kindle Web<br>
attr kindleweb readings KindleBatt
</code><br>
</ul>