+ /* if it needs to be redirected to PLC, let it be handled here */
+ if (whichService == 0 && domainNamePLCNetflow != NULL &&
+ strcmp(slice->si_sliceName, "root") == 0) {
+ char msg[1024];
+ int len;
+ static const char* resp302 =
+ "HTTP/1.0 302 Found\r\n"
+ "Location: http://%s\r\n"
+ "Cache-Control: no-cache, no-store\r\n"
+ "Content-type: text/html\r\n"
+ "Connection: close\r\n"
+ "\r\n"
+ "Your request is being redirected to PLC Netflow http://%s\n";
+ len = snprintf(msg, sizeof(msg), resp302,
+ domainNamePLCNetflow, domainNamePLCNetflow);
+ write(fd, msg, len);
+ CloseSock(fd);
+ return;
+ }