CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Receiving multiple <HTML> tag at client side

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
arotob



Joined: 26 Jun 2015
Posts: 3

View user's profile Send private message

Receiving multiple <HTML> tag at client side
PostPosted: Fri Jun 26, 2015 8:04 am     Reply with quote

Am trying to create embedded web server. My code is working fine but i notice that when i add more html code to the "const char HTML_ANALOG_PAGE" array, it splits the code into multiple parts on the client side like having multiple <HTML> tag in a single page. What can i do? I tried change the max number of char in http.c file but it crashes when it get to that particular page.
Am new here so i don't really know how you post code but this is where am having problem.
Code:

const char  HTML_ANALOG_PAGE[]="
<HTML>
<head>
<title>Web control Light</title>
</head>
<BODY BGCOLOR=#FFFFFF TEXT=#000000>
<H1 align=\"center\">AroSoft </H1>
<H1 align=\"center\">Security Light</H1>
<P align=\"center\">
<BR>OPTION:<INPUT type=\"radio\" name=\"option\" value=1>AUTO &nbsp; &nbsp; &nbsp;
<INPUT type=\"radio\" name=\"option\" value=0>TIMER &nbsp; &nbsp; &nbsp;
<INPUT type=\"radio\" name=\"option\" value=2>MANUAL
<P align=\"center\">START TIME:
<select id=\"timer\" name=\"starttime\">
<option value=\"0\"></option>
<option value=\"00\">12 AM</option>
<option value=\"01\">1 AM</option>
<option value=\"02\">2 AM</option>
<option value=\"03\">3 AM</option>
</select>
<BR>MANUAL:<INPUT type=\"radio\" name=\"manual\" value=1>ON &nbsp; &nbsp; &nbsp;
<INPUT type=\"radio\" name=\"manual\" value=0>OFF
<BR><BR><INPUT TYPE=\"submit\">
<P align=\"center\"><A HREF=\"/analog\">Arotob</A>
<P align=\"center\">%0
</BODY></HTML>
";

If i add one more line to it, the page will split at the client side. Please i need your help has i have tried everything i can think of.
arotob



Joined: 26 Jun 2015
Posts: 3

View user's profile Send private message

PostPosted: Sat Jun 27, 2015 1:45 am     Reply with quote

Seems like no one is ready to help. What have been able to find out is that the http.c is not able to process all the character in the constant char at once before it send the http 1.0 OK to the browser. How can I add delay to make the http get all the character before sending it to the browser. Please I really need it. Thanks.
arotob



Joined: 26 Jun 2015
Posts: 3

View user's profile Send private message

PostPosted: Sat Jun 27, 2015 6:19 am     Reply with quote

I have been able to get the solution. Just in case anyone have the same problem. The problem was the TCPPutFIleParseConst function in the http.c was not able to get the correct number of char maybe because of the number of char in the HTML_INDEX_PAGE. so what I did was to change the filesize and max to int8 instead of 32. Then I added 500 to max variable
max = *n;
max = max + 500;
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group