HTML page on http server

14 Dec 2010

hi .

iam successful to implement a http server on my board but in that sever i would like to show some images(format:jpg those are present on embedded flash). but i  didn't get any image

 

anyone help me regarding that issue

14 Dec 2010 . Edited: 14 Dec 2010

Are you sure the filenames are indeed 8.3 compliant? Extensions like .jpeg won't work. Also, the mime type is set to text/html by default. You should write you own handler, like ImageHandler and hook that up to a virtual folder named "images". Like this:

HTTPServer server;

server.addHandler("/image");

In the doGet function you should do this:

this->respHeaders()["Content-Type"] = "image/jpeg";

18 Dec 2010

thak you it's working

29 Sep 2011

Hi. Could send details to implement this solution please?

28 Jun 2014

i got same problem i can t compile the program. the problem is i don t know how to write own handler