Revision: 538 http://vde.svn.sourceforge.net/vde/?rev=538&view=rev Author: rd235 Date: 2012-01-23 12:41:31 +0000 (Mon, 23 Jan 2012) Log Message: ----------- vdetelweb: bugfix. Wrong computation of msg length (it added some null bytes. This caused Midori to fail)
Modified Paths: -------------- trunk/vdetelweb/web.c Modified: trunk/vdetelweb/web.c =================================================================== --- trunk/vdetelweb/web.c 2012-01-21 18:07:24 UTC (rev 537) +++ trunk/vdetelweb/web.c 2012-01-23 12:41:31 UTC (rev 538) @@ -498,12 +498,12 @@ if ((tail=strstr(path,".html")) != NULL) *tail=0; if (*path==0 || ((this=vde_findmenu(menuhead,path)) != NULL)) { - lwip_write(fd,okmsg,sizeof(okmsg)); + lwip_write(fd,okmsg,sizeof(okmsg)-1); lwip_printf(fd, "<HTML><HEAD>\r\n" "<TITLE>%s %s</TITLE>\r\n", prompt, (*path==0)?"Home Page":path); - lwip_write(fd,css,sizeof(css)); + lwip_write(fd,css,sizeof(css)-1); lwip_printf(fd, "</HEAD><BODY class=core>\r\n" "<H1>%s %s</H1>\r\n" @@ -536,7 +536,7 @@ "<hr>VDE 2.0 WEB MGMT INTERFACE\r\n" "</BODY></HTML>\r\n"); } else - lwip_write(fd,errmsg,sizeof(errmsg)); + lwip_write(fd,errmsg,sizeof(errmsg)-1); } static char authmsg[]= @@ -600,9 +600,9 @@ } else if (st->linebuf[0]=='\n' || st->linebuf[0]=='\r') { switch (st->status) { case WEB_IDENTIFY: - lwip_write(fd,authmsg,sizeof(authmsg)); + lwip_write(fd,authmsg,sizeof(authmsg)-1); lwip_write(fd,prompt,strlen(prompt)); - lwip_write(fd,authmsg2,sizeof(authmsg2)); + lwip_write(fd,authmsg2,sizeof(authmsg2)-1); return 1; break; case WEB_AUTHORIZED: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ------------------------------------------------------------------------------ Try before you buy = See our experts in action! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-dev2 _______________________________________________ vde-users mailing list vde-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/vde-users