Funny bytes between HTTP header and page content ?

J

Jochen Müller

Just a short question: With a network sniffer and a hex editor I looked at
the pages coming from my ASP.NET environment and I saw some strange bytes
between header and the page content:

0d 0a 0d 0a ef bb bf 0d 0a

That means that there are two CR/LF , then 3 funny bytes and again a CR/LF.

I also implemented a response filter to look at the byte stream before
sending and the page content starts there just with one CR/LF.

Can anybody tell me what those bytes mean?

Thanks!
 
J

Jochen Müller

Ok, I saw that it happens only when I activated my own Response.Filter. But
within this filter I only override the write function like this:

public override void Write(byte[] buffer, int offset, int count)
{
MemoryStream ms = new MemoryStream(buffer, offset, count, false);
StreamReader sr = new StreamReader(ms, Encoding.UTF8);
string strPageContent = sr.ReadToEnd();
streamWriter.Write(strPageContent);
streamWriter.Flush();
}


What goes wrong here?
It always adds those funny bytes to the output...
 
R

Robert Rolls

http://www.dotnet247.com/247reference/msgs/6/34399.aspx

Jochen Müller said:
Ok, I saw that it happens only when I activated my own Response.Filter.
But within this filter I only override the write function like this:

public override void Write(byte[] buffer, int offset, int count)
{
MemoryStream ms = new MemoryStream(buffer, offset, count, false);
StreamReader sr = new StreamReader(ms, Encoding.UTF8);
string strPageContent = sr.ReadToEnd();
streamWriter.Write(strPageContent);
streamWriter.Flush();
}


What goes wrong here?
It always adds those funny bytes to the output...




Jochen Müller said:
Just a short question: With a network sniffer and a hex editor I looked
at the pages coming from my ASP.NET environment and I saw some strange
bytes between header and the page content:

0d 0a 0d 0a ef bb bf 0d 0a

That means that there are two CR/LF , then 3 funny bytes and again a
CR/LF.

I also implemented a response filter to look at the byte stream before
sending and the page content starts there just with one CR/LF.

Can anybody tell me what those bytes mean?

Thanks!
 

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

Forum statistics

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

Latest Threads

Top