X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Fserver%2Fhttpd.c;h=a3137d90a1359645163a78259543df9e431b1372;hp=2005a296a3e33f8c3b9a59f7e952a7fb493280a4;hb=6d1d58a1fc3dfd60e9cac89460b5a6e438d11efa;hpb=ed5b5b834eb3d09ff1676ef60d25a629d9358a13 diff --git a/src/server/httpd.c b/src/server/httpd.c index 2005a296a3..a3137d90a1 100644 --- a/src/server/httpd.c +++ b/src/server/httpd.c @@ -34,7 +34,7 @@ #include #include -#define PAGE_NOT_FOUND "File not foundFile not found" +#define PAGE_NOT_FOUND " File not found File not found" int loadFile(const char *name, void **data, size_t *len); @@ -71,7 +71,7 @@ static const char *httpd_exec_cgi_tcl_error(Jim_Interp *interp) t = appendf(t, "Runtime error, file \"%s\", line %d:
", interp->errorFileName, interp->errorLine); - t = appendf(t, " %s
", Jim_GetString(interp->result, NULL)); + t = appendf(t, " %s < br>", Jim_GetString(interp->result, NULL)); Jim_ListLength(interp, interp->stackTrace, &len); for (i = 0; i < len; i += 3) { @@ -84,7 +84,7 @@ static const char *httpd_exec_cgi_tcl_error(Jim_Interp *interp) file = Jim_GetString(objPtr, NULL); Jim_ListIndex(interp, interp->stackTrace, i + 2, &objPtr, JIM_NONE); line = Jim_GetString(objPtr, NULL); - t = appendf(t, "In procedure '%s' called at file \"%s\", line %s
", + t = appendf(t, "In procedure '%s' called at file \"%s\", line %s < br>", proc, file, line); } t = appendf(t, "\n"); @@ -142,7 +142,7 @@ httpd_Jim_Command_formfetch(Jim_Interp *interp, int argc, Jim_Obj *const *argv) { - if (argc!=2) + if (argc != 2) { Jim_WrongNumArgs(interp, 1, argv, "method ?args ...?"); return JIM_ERR; @@ -202,7 +202,7 @@ static void append_key(struct httpd_request *r, const char *key, Jim_Obj *dict = Jim_GetVariableStr(interp, "httppostdata", 0); - if (dict!=NULL) + if (dict != NULL) { if (Jim_DictKey(interp, dict, keyObj, &value, 0) != JIM_OK) { @@ -402,7 +402,7 @@ static int ahc_echo(void * cls, struct MHD_Connection * connection, if (!*url) url="index.tcl"; - const char *file_name=alloc_printf("%s/%s", httpd_dir, url); + const char *file_name = alloc_printf("%s/%s", httpd_dir, url); int result = handle_request(connection, file_name); free((void *)file_name); return result;