Added first draft for RESTful library
note: the interfaces are likely to change in the future
This commit is contained in:
26
library/server/request/rest/tests/htdocs/.htaccess
Normal file
26
library/server/request/rest/tests/htdocs/.htaccess
Normal file
@@ -0,0 +1,26 @@
|
||||
Options Indexes FollowSymLinks ExecCGI
|
||||
|
||||
<IfModule mod_fcgid.c>
|
||||
AddHandler fcgid-script .eapp
|
||||
FcgidWrapper c:/_dev/Dev-Process/web-library/library/server/rest/tests/htdocs/../EIFGENs/rest_sample_cgi/W_code/sample.exe .eapp
|
||||
|
||||
</IfModule>
|
||||
|
||||
Options +ExecCGI
|
||||
AddHandler cgi-script exe
|
||||
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteBase /REST
|
||||
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} !=/favicon.ico
|
||||
RewriteRule ^(.*)$ sample.eapp/$1
|
||||
|
||||
# To let CGI app knows about HTTP_AUTHORIZATION
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
||||
|
||||
</IfModule>
|
||||
31
library/server/request/rest/tests/htdocs/README.txt
Normal file
31
library/server/request/rest/tests/htdocs/README.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
= How to make this works with Apache =
|
||||
* In the apache's configuration file, be sure to add the following, or similar
|
||||
LoadModule fcgid_module modules/mod_fcgid.so
|
||||
<IfModule mod_fcgid.c>
|
||||
FcgidIdleTimeout 60
|
||||
FcgidBusyScanInterval 120
|
||||
FcgidProcessLifeTime 1600
|
||||
#7200
|
||||
FcgidMaxProcesses 5
|
||||
FcgidMaxProcessesPerClass 100
|
||||
FcgidMinProcessesPerClass 100
|
||||
FcgidConnectTimeout 8
|
||||
FcgidIOTimeout 3000
|
||||
FcgidBusyTimeout 3200
|
||||
FcgidMaxRequestLen 10000000
|
||||
FcgidPassHeader Authorization
|
||||
</IfModule>
|
||||
|
||||
|
||||
alias /REST/ "c:/_dev/Dev-Process/src/server/htdocs/"
|
||||
<directory "c:/_dev/Dev-Process/src/server/htdocs/">
|
||||
AllowOverride All
|
||||
Order allow,deny
|
||||
Allow from all
|
||||
</directory>
|
||||
|
||||
* You can use <Location>, but then the AllowOverride All, should be somewhere else, since <Location> does not allow it.
|
||||
|
||||
* And then, check the .htaccess from this folder for additional settings (but required)
|
||||
|
||||
|
||||
24
library/server/request/rest/tests/htdocs/build.eant
Normal file
24
library/server/request/rest/tests/htdocs/build.eant
Normal file
@@ -0,0 +1,24 @@
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<project name="update_htdocs" default="menu">
|
||||
|
||||
<target name="menu">
|
||||
<echo message="1 - update_cgi_link" />
|
||||
<echo message="2 - update_htaccess" />
|
||||
<echo message="0 - quit" />
|
||||
<input message="Your choice :" variable="answer" defaultvalue="0" validargs="1,2,0" answer_required="true" />
|
||||
<geant target="update_cgi_link" if="$answer=1" />
|
||||
<geant target="update_htaccess" if="$answer=2" />
|
||||
</target>
|
||||
|
||||
<target name="update_cgi_link">
|
||||
<echo message="Update CGI link" />
|
||||
<exec executable="junction CGI ..\EIFGENs\rest_sample_cgi\W_code" accept_errors="true" exit_code_variable="return_code" dir="$cwd" />
|
||||
</target>
|
||||
|
||||
<target name="update_htaccess">
|
||||
<replace file="htaccess" to_file=".htaccess" token="##SAMPLE-CGI-DIR##" replace="$cwd/../EIFGENs/rest_sample_cgi/W_code" flags="g" />
|
||||
<replace file=".htaccess" to_file=".htaccess" token="\" replace="/" flags="g" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
26
library/server/request/rest/tests/htdocs/htaccess
Normal file
26
library/server/request/rest/tests/htdocs/htaccess
Normal file
@@ -0,0 +1,26 @@
|
||||
Options Indexes FollowSymLinks ExecCGI
|
||||
|
||||
<IfModule mod_fcgid.c>
|
||||
AddHandler fcgid-script .eapp
|
||||
FcgidWrapper ##SAMPLE-CGI-DIR##/sample.exe .eapp
|
||||
|
||||
</IfModule>
|
||||
|
||||
Options +ExecCGI
|
||||
AddHandler cgi-script exe
|
||||
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine on
|
||||
RewriteBase /REST
|
||||
|
||||
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} !=/favicon.ico
|
||||
RewriteRule ^(.*)$ sample.eapp/$1
|
||||
|
||||
# To let CGI app knows about HTTP_AUTHORIZATION
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},L]
|
||||
|
||||
</IfModule>
|
||||
Reference in New Issue
Block a user