Forum Discussion
Lucas_Thompson_
Sep 29, 2015Historic F5 Account
You're 99% there. Just have to remember that you're not in HTTP yet. CLIENT_ACCEPTED happens in TCP, so you have to use TCP::respond instead of HTTP::respond. You can also send a response and close the connection before the client has actually transmitted the request, it's tolerated OK. For example:
TCP::respond "HTTP/1.0 200 OK\r\nContent-Type: text/html\r\n\r\nPlease connect to port 8080 instead of port [TCP::local_port]"