473,386 Members | 1,712 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Funny bytes between HTTP header and page content ?

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!
Nov 19 '05 #1
3 2081
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" <jo*****************@hotmail.com> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP09.phx.gbl...
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!

Nov 19 '05 #2
http://www.dotnet247.com/247reference/msgs/6/34399.aspx

"Jochen Müller" <jo*****************@hotmail.com> wrote in message
news:OC**************@TK2MSFTNGP10.phx.gbl...
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" <jo*****************@hotmail.com> schrieb im Newsbeitrag
news:%2****************@TK2MSFTNGP09.phx.gbl...
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!


Nov 19 '05 #3
Robert Rolls wrote:
http://www.dotnet247.com/247reference/msgs/6/34399.aspx


Hmm... the analysis is correct (it's a UTF-8 BOM), but the solution is
nonsense. There are UTF8Encoding constructors that suppress the BOM in
the BCL.

Cheers,
--
http://www.joergjooss.de
mailto:ne********@joergjooss.de
Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: pbay | last post by:
Hi everyone, I'm experiencing a problem with PHP that doesn't seem to have any documentation related to it. I hope it's a simple error on my part :) Basically, I'm loading a SWF (Macromedia...
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
3
by: superseed | last post by:
Hi, I'm currently coding in C# a class to control a PTZ (Pan Tilt Zoom) Camera. To control the camera I have to send request on a CGI on it. Something like this : ...
6
by: Sam | last post by:
I have some issues with HTTP Headers and I was hoping for some pointers or references to good articles. Here is the problem. I have 6 .aspx pages, each page contains a common .ascx. This ascx...
1
by: Dhwanil Shah | last post by:
Hi, We have an aspx page designed in VS.NET 2003. Our requirement is that a client (another application), sends HEAD requests to our application with Basic Auth header. Based on security criteria,...
1
by: Nuno Magalhaes | last post by:
I'm doing a "low level" project that consists on monitoring certain QoS parameters such as: Time to resolve dns, time to connect, time to receive data, time to receive all web page, time to close...
3
by: webEater | last post by:
Hey, I am writing a file that reads in an external file in the web and prints it out including the response header of the http protocol. I do this to enable cross domain XMLHttpRequests. I...
0
by: kolokotronis | last post by:
HI all, I'm trying to build a web page in C# in which the user can select a file to download. The file is created and encrypted on the fly when the user acces the page. The thing I want is the...
7
by: =?Utf-8?B?YzY3NjIyOA==?= | last post by:
Hi all, I am trying to set this up using asp code and IIS configuration. But it seems not working. Here it is the way I am doing. In IIS I set up a virtual directory with secure communication, I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.