Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a76b1c4915
Fetching contributors…

Cannot retrieve contributors at this time

56 lines (41 sloc) 1.392 kb
#ifndef _XSCRIPT_VHOST_DATA_H_
#define _XSCRIPT_VHOST_DATA_H_
#include <string>
#include <vector>
#include <boost/utility.hpp>
#include <boost/thread/tss.hpp>
#include <libxml/tree.h>
#include <xscript/component.h>
#include <xscript/request.h>
#include <xscript/server.h>
namespace xscript {
class VirtualHostData : public Component<VirtualHostData> {
public:
VirtualHostData();
virtual ~VirtualHostData();
void set(const Request* request);
const Server* getServer() const;
virtual bool hasVariable(const Request* request, const std::string& var) const;
virtual std::string getVariable(const Request* request, const std::string& var) const;
virtual bool checkVariable(const Request* request, const std::string& var) const;
virtual std::string getDocumentRoot(const Request* request) const;
friend class Server;
static const std::string DOCUMENT_ROOT;
protected:
void setServer(const Server* server);
const Request* get() const;
private:
class RequestProvider {
public:
RequestProvider(const Request* request) : request_(request) {}
const Request* get() const {
return request_;
}
private:
const Request* request_;
};
const Server* server_;
boost::thread_specific_ptr<RequestProvider> request_provider_;
};
} // namespace xscript
#endif // _XSCRIPT_VHOST_DATA_H_
Jump to Line
Something went wrong with that request. Please try again.