--- loncom/xml/lonxml.pm 2008/12/11 22:19:45 1.484.4.1 +++ loncom/xml/lonxml.pm 2009/10/04 03:42:42 1.484.4.3 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # XML Parser Module # -# $Id: lonxml.pm,v 1.484.4.1 2008/12/11 22:19:45 raeburn Exp $ +# $Id: lonxml.pm,v 1.484.4.3 2009/10/04 03:42:42 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -1587,9 +1587,12 @@ FULLPAGE my $spelllink .=&Apache::lonhtmlcommon::spelllink('xmledit','filecont'); my $textarea_events = &Apache::edit::element_change_detection(); my $form_events = &Apache::edit::form_change_detection(); - my $htmlerror=&verify_html($filecontents); - if ($htmlerror) { - $htmlerror=''.$htmlerror.''; + my $htmlerror; + if ($filetype eq 'html') { + $htmlerror=&verify_html($filecontents); + if ($htmlerror) { + $htmlerror=''.$htmlerror.''; + } } my $editfooter=(<set_last_modified(&Apache::lonnet::metadata($request->uri, 'lastrevisiondate')); } + # Embedded Flash movies (e.g., from Camtasia) served from https will not display in IE + # if XML config file has expired from cache. + if ($ENV{'SERVER_PORT'} == 443) { + if ($request->uri =~ /\.xml$/) { + my ($httpbrowser,$clientbrowser) = + &Apache::loncommon::decode_user_agent($request); + if ($clientbrowser =~ /^explorer$/i) { + delete $request->headers_out->{'Cache-control'}; + delete $request->headers_out->{'Pragma'}; + my $expiration = time + 60; + my $date=strftime("%a, %d %b %Y %H:%M:%S GMT",gmtime($expiration)); + $request->headers_out->set("Expires" => $date); + } + } + } $request->send_http_header; return OK if $request->header_only;