websError | GoAhead WebServer API | GoAhead EMF |
Return an error message to the requesting browser
#include "webs.h" void websError(webs_t wp, int code, char_t *msg, ...);
wp | Web server connection handle |
code | HTTP response code (see websDone for codes) |
msg | Message format string with %s and %d parameters |
... | Parameters for %s and %d directives |
The websError procedure can be used to return a request response to the user's browser and then close the connection. It internally calls websDone to close the connection. You can use it as you would a printf call with a message format string.
None
websError(wp, 200, "Can't open %s", filename);