Problem with asp page returning a jpg image...

D

Dave Anderson

Anthony said:
Perhaps you should test your assumptions before handing out reproof.

See my answer in this group to John Byrne subject 'IE7
XMLHTTPREQUEST reponseXML' orignal post sent 23-Nov-2006 14:05 GMT

XML has nothing whatsoever to do with Response.BinaryWrite(). Unexpected
whitespace characters are almost always going to corrupt the expected format
of binary data.
 
A

Anthony Jones

Dave Anderson said:
XML has nothing whatsoever to do with Response.BinaryWrite(). Unexpected
whitespace characters are almost always going to corrupt the expected format
of binary data.

(sigh!) Clear it is you that has trouble reading. I'll cut'n'paste the
relevent portions:-


<quote>

ASP has an unfortunate behaviour in this regard:-

<!-- #include virtual="/someinclude.asp" -->
<html>
<body>
...

The CRLF before the <html> tag is included in the response of the inline
content hence extra whitespace at the start.

However something like this:-

<!-- #include virtual="/someinclude.asp" -->
<%
Response.Write "<html>"
%>
<body>

Does not suffer this problem because ASP does not create send the CRLF that
preceeds an inline script.

</quote>

This principal applies to code like this as well:-

%>
<!-- #include file="abcdefg.inc.asp" -->
<%

Neither CRLF sequence in the above preceeds content hence neither is sent.
Try it for yourself.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top