summaryrefslogtreecommitdiffabout
path: root/src
Unidiff
Diffstat (limited to 'src') (more/less context) (ignore whitespace changes)
-rw-r--r--src/sitecing-build.cc5
-rw-r--r--src/sitecing-fastcgi.cc4
-rw-r--r--src/sitecing-plaincgi.cc4
3 files changed, 7 insertions, 6 deletions
diff --git a/src/sitecing-build.cc b/src/sitecing-build.cc
index 4cad0a3..887ef83 100644
--- a/src/sitecing-build.cc
+++ b/src/sitecing-build.cc
@@ -6,8 +6,9 @@
6#include <fstream> 6#include <fstream>
7#include <cassert> 7#include <cassert>
8#include <set> 8#include <set>
9using namespace std; 9using namespace std;
10#include <konforka/util.h>
10#include "sitecing/sitecing_util.h" 11#include "sitecing/sitecing_util.h"
11#include "sitecing/util.h" 12#include "sitecing/util.h"
12#include "sitecing/sitespace.h" 13#include "sitecing/sitespace.h"
13#include "sitecing/sitecing_interface_cgi.h" 14#include "sitecing/sitecing_interface_cgi.h"
@@ -77,9 +78,9 @@ void build_imports(const string& component) {
77void build_http_status_handlers(const string& target) { 78void build_http_status_handlers(const string& target) {
78 assert(site_space); 79 assert(site_space);
79 set<string> stop_list; 80 set<string> stop_list;
80 string t = "/"; 81 string t = "/";
81 t += normalize_path(target,strip_leading_slash); 82 t += konforka::normalize_path(target,konforka::strip_leading_slash);
82 for(;;) { 83 for(;;) {
83 if(t[t.length()-1]=='/') { 84 if(t[t.length()-1]=='/') {
84 loaded_options* lo = site_space->config.lookup_loaded_options(t); 85 loaded_options* lo = site_space->config.lookup_loaded_options(t);
85 if( lo && (lo->flags&config_options::flag_http_status_handlers) ) { 86 if( lo && (lo->flags&config_options::flag_http_status_handlers) ) {
@@ -146,9 +147,9 @@ void build(const string& target) {
146 if(!strcmp(de->d_name,".")) 147 if(!strcmp(de->d_name,"."))
147 continue; 148 continue;
148 if(!strcmp(de->d_name,"..")) 149 if(!strcmp(de->d_name,".."))
149 continue; 150 continue;
150 string subtarget = normalize_path(target+"/"+de->d_name); 151 string subtarget = konforka::normalize_path(target+"/"+de->d_name);
151 struct stat sts; 152 struct stat sts;
152 if(stat((site_space->config.root_source+subtarget).c_str(),&sts)) 153 if(stat((site_space->config.root_source+subtarget).c_str(),&sts))
153 throw konforka::exception(CODEPOINT,"failed to stat() subtarget"); 154 throw konforka::exception(CODEPOINT,"failed to stat() subtarget");
154 if(S_ISDIR(sts.st_mode)) { 155 if(S_ISDIR(sts.st_mode)) {
diff --git a/src/sitecing-fastcgi.cc b/src/sitecing-fastcgi.cc
index 756dcee..03587aa 100644
--- a/src/sitecing-fastcgi.cc
+++ b/src/sitecing-fastcgi.cc
@@ -164,9 +164,9 @@ void sitecing_fastcgi_pm::process(int slot) {
164 sl.unlock(); 164 sl.unlock();
165 cgi_gateway gw(fi); 165 cgi_gateway gw(fi);
166 scif.prepare(&gw); 166 scif.prepare(&gw);
167 try { 167 try {
168 component_path = normalize_path(gw.path_info(),strip_leading_slash|strip_trailing_slash); 168 component_path = konforka::normalize_path(gw.path_info(),konforka::strip_leading_slash|konforka::strip_trailing_slash);
169 string full_component_path; 169 string full_component_path;
170 string sitecing_path_info; 170 string sitecing_path_info;
171 while(true) { 171 while(true) {
172 full_component_path = config.root_source+'/'+component_path; 172 full_component_path = config.root_source+'/'+component_path;
@@ -183,9 +183,9 @@ void sitecing_fastcgi_pm::process(int slot) {
183 action_handler = config.lookup_action_handler(component_path); 183 action_handler = config.lookup_action_handler(component_path);
184 if(action_handler) { 184 if(action_handler) {
185 action = action_handler->action; 185 action = action_handler->action;
186 } 186 }
187 string pwd = dir_name(full_component_path); 187 string pwd = konforka::dir_name(full_component_path);
188 if(chdir(pwd.c_str())) 188 if(chdir(pwd.c_str()))
189 throw konforka::exception(CODEPOINT,"failed to chdir() into document's directory"); 189 throw konforka::exception(CODEPOINT,"failed to chdir() into document's directory");
190 so_component soc = ss.fetch(action,&scif); 190 so_component soc = ss.fetch(action,&scif);
191 if(action_handler) { 191 if(action_handler) {
diff --git a/src/sitecing-plaincgi.cc b/src/sitecing-plaincgi.cc
index 3bd291a..2f93cc5 100644
--- a/src/sitecing-plaincgi.cc
+++ b/src/sitecing-plaincgi.cc
@@ -49,9 +49,9 @@ void process_request(configuration& config) {
49 plaincgi_interface ci; 49 plaincgi_interface ci;
50 cgi_gateway gw(ci); 50 cgi_gateway gw(ci);
51 scif.prepare(&gw); 51 scif.prepare(&gw);
52 try { 52 try {
53 component_path = normalize_path(gw.path_info(),strip_leading_slash|strip_trailing_slash); 53 component_path = konforka::normalize_path(gw.path_info(),konforka::strip_leading_slash|konforka::strip_trailing_slash);
54 string full_component_path; 54 string full_component_path;
55 string sitecing_path_info; 55 string sitecing_path_info;
56 while(true) { 56 while(true) {
57 full_component_path = config.root_source+'/'+component_path; 57 full_component_path = config.root_source+'/'+component_path;
@@ -68,9 +68,9 @@ void process_request(configuration& config) {
68 action_handler = config.lookup_action_handler(component_path); 68 action_handler = config.lookup_action_handler(component_path);
69 if(action_handler) { 69 if(action_handler) {
70 action = action_handler->action; 70 action = action_handler->action;
71 } 71 }
72 string pwd = dir_name(full_component_path); 72 string pwd = konforka::dir_name(full_component_path);
73 if(chdir(pwd.c_str())) 73 if(chdir(pwd.c_str()))
74 throw konforka::exception(CODEPOINT,"failed to chdir() into document's directory"); 74 throw konforka::exception(CODEPOINT,"failed to chdir() into document's directory");
75 so_component soc = ss.fetch(action,&scif); 75 so_component soc = ss.fetch(action,&scif);
76 if(action_handler) { 76 if(action_handler) {