I'm seeing some very weird behavior that only shows up on IE8, and no other browsers. I have a reduced it to a smallest piece of code:
Code: Select all
class GenerateImageStatic : public HTTPRequestHandler
void handleRequest(HTTPServerRequest& request, HTTPServerResponse& response)
HTTPRequestHandler * RequestHandlerFactory::createRequestHandler(const HTTPServerRequest& request)
cout << request.getURI() << std::endl;
if (generateImage.match(request.getURI(), 0))
return new GenerateImageStatic();
for (var i = 0; i < 10; i++)
var img = document.createElement("img");
img.src = "http://myPocoServer/GenerateImageStatic?nc=" + (new Date()).getTime();
Basically IE shows the images as broken! Also POCO server does not see any request made for the images (cout statement), so I don't know how IE decides images are broken. IE cache is cleared and also that ?nc=currentDate makes sure the requests are for fresh images. If you copy the image URL and just navigate to it in a new TAB in IE, the image loads, and then refresh the old tab, all the other images load all of a sudden! I don't get the problem with Chrome or Firefox. So POCO HTTPServer and my code work in those cases.
Now the reason I think it's POCO related is because if I use this URL:
Code: Select all
img.src = "http://maps.google.com:80/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=14&size=512x512&maptype=roadmap&markers=color:blue|label:S|40.702147,-74.015794&markers=color:green|label:G|40.711614,-74.012318&markers=color:red|color:red|label:C|40.718217,-73.998284&sensor=false&nc=" + (new Date()).getTime();
which goes to google, everything works...
Is there anything you can think of that can cause this problem?