Closed Bug 329008 Opened 18 years ago Closed 18 years ago

Content of a from POST has unusual data before the form content.

Categories

(Firefox :: General, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: mel_c_newhook, Unassigned)

Details

User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915 Firefox/1.0.7

I developed a software application that acts as a web server, so FireFox can connect to it and web pages are sent back. These pages have form on them so when the browser submits them, my software receives the content of the form and knows what to do. I have never had a problem submitting the forms when I use FireFox on the same computer that is running the software. But when the software is running on computer A and I try connecting to it with FireFox on computer B, when I submit the web page, my software was not getting the entire HTTP header (content was cut off). I used Ethereal to analyze and record the data that FireFox sent to the TCP port. There was unusual data sent right before the content, which I believe may be the reason why my software could not get the content. Internet Explorer and Opera do not send this unusual data, it only happens with FireFox and Mozilla. Here is an example of what Ethereal recorded:

POST /login.htm HTTP/1.1
Host: jigsaw:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://jigsaw:8080/login.htm
˜©DÜb ˜   ˜    é‰;î ˜�² E  ŠVN@ €�„
P
Jé�jõõGLkëPDpø8  Content-Type: application/x-www-form-urlencoded
Content-Length: 27

State=L&Username=&Password=


As you can see, right before the Content information there is a collection of bytes. I used another application to read the bytes, they are as follows:
5|68|98|11|32|32|32|32|32|32|32|32|7|59|32|19|16|8|32|69|32|32|86|78|64|32|6|10|1|1|80|10|1|1|74|18|31|106|71|76|107|26|80|24|68|112|56|32|32

I'm not sure if the bytes belong there or not, but I was curious that it only occurs when submitting a POST accross our network, and not when you submit a POST on the same local computer.

Reproducible: Always

Steps to Reproduce:
1. Have an application that has a TCP server on a certain port.
2. When a connection to the port is made send out the text of a webpage with a form on it.
3. Submit the form to the application and have the application read in the bytes that were sent to it from FireFox. There should be unusual data right before the Content.

Actual Results:  
5|68|98|11|32|32|32|32|32|32|32|32|7|59|32|19|16|8|32|69|32|32|86|78|64|32|6|10|1|1|80|10|1|1|74|18|31|106|71|76|107|26|80|24|68|112|56|32|32

These bytes were sent right before the "Content-Type" line.

POST /login.htm HTTP/1.1
Host: jigsaw:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://jigsaw:8080/login.htm
˜©DÜb ˜   ˜    é‰;î ˜�² E  ŠVN@ €�„
P
Jé�jõõGLkëPDpø8  Content-Type: application/x-www-form-urlencoded
Content-Length: 27

State=L&Username=&Password=


Expected Results:  
POST /login.htm HTTP/1.1
Host: jigsaw:8080
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.0.1) Gecko/20060111 Firefox/1.5.0.1
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://jigsaw:8080/login.htm
Content-Type: application/x-www-form-urlencoded
Content-Length: 27

State=L&Username=&Password=


You could easily see the information by setting up Ethereal to record TCP DST PORT 8080. Then just have an application that serves out a web page form and let your FireFox browser submit the form.

I could not add a URL to my application because our computers are on secure local LANs that are not reacheable from the outside networks.
Does this issue occur in firefox 1.5.0.1?
This turned out not to be a bug with FireFox/Mozilla. The 'garbage' data was the header information of the next TCP packet. In other words, FireFox/Mozilla were sending the form data back in 2 packets instead of one. The socket object I was using was not set up for multi-packet receiving. Sorry for wasting your time.
Status: UNCONFIRMED → RESOLVED
Closed: 18 years ago
Resolution: --- → INVALID
Don't worry you wasted no one's time. Rather a bug gets filed and then marked INVALID than something slips under the radar!
You need to log in before you can comment on or make changes to this bug.