| 50 | } |
| 51 | |
| 52 | std::string BZFSHTTP::getBaseURL(void) { |
| 53 | std::string URL = "http://"; |
| 54 | std::string host = "localhost"; |
| 55 | if (bz_getPublicAddr().size()) { |
| 56 | host = bz_getPublicAddr().c_str(); |
| 57 | } |
| 58 | |
| 59 | // make sure it has the port |
| 60 | if (strrchr(host.c_str(), ':') == NULL) { |
| 61 | host += format(":%d", bz_getPublicPort()); |
| 62 | } |
| 63 | |
| 64 | URL += host + "/"; |
| 65 | URL += getVDir(); |
| 66 | URL += "/"; |
| 67 | |
| 68 | return URL; |
| 69 | } |
| 70 | |
| 71 | bool BZFSHTTP::handleRequest(const HTTPRequest& request, HTTPReply& reply) { |
| 72 | if (serviceMimeResources && resourceRootPath.size() && mimeTypes.size()) { |
nothing calls this directly
no test coverage detected