ESP8266 Webserver Project

Moderator: Sprite_tm

User avatar
By Hebert
#73383 Hello everyone! I'm testing this wonderful webserver and I always see the same behavior: HTML pages have duplicate code at the end of the file, eg:

index.tpl
...<img src="cats/kitten-loves-toy.jpg"><br />
</p>
</div>
</body></html>
p>
</div>
</body></html>


another eg: led.tpl
...<input type="submit" name="led" value="0">
</form>
</div>
</body></html>
/body></html>

Of corse the .TPL files are correct. The cat pictures are displayed correctly. I checked the files generated by ESPHTTPD with some browsers and also with the wget command. I already updated the esphttp files with most recent from git and allways the same result.
I´m using The Unnoficial Development Kit, SDK 2.2.1, module ESP-12F. I compiled using OUTPUT_TYPE=separate and same result if I use OUTPUT_TYPE=combined. I can´t compile with OUTPUT_TYPE=ota coz generate some errors:

user/user_main.c:106:2: error: stray '\' in program
.tagName=OTA_TAGNAME
^
user/user_main.c:106:2: error: stray '\' in program


Can someone help me with the duplicated code when serving the HTML pages?
User avatar
By ThierryC49
#81822 I have had same problem like you

For the OTA error you must remove the quote (") in makefile.ota on line 5 : TAGNAME ?= generic
generic is with quote you need to remove this.

For your information for OTA you must to correct something in cgiflash.c according to this
in line 180 :
Code: Select allstate->address=def->fw1Pos
replace by
Code: Select allif (system_upgrade_userbin_check()==1) {
        state->address=def->fw1Pos;
} else {
       state->address=def->fw2Pos;
   }

I'm not sure that your already be on this subject but it can help !

For the duplicate html file I'm still working on it without success for now

Thierry,