[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kfm-devel
Subject:    XMLHttpRequest protocol mismatch?
From:       Martin Jordan <fanti () spin ! de>
Date:       2004-11-25 14:32:37
Message-ID: 200411251532.37623.fanti () spin ! de
[Download RAW message or body]

hello there,

it seems to me that there is a bug within the XMLHttpRequest-object concerning 
POST-requests.

I tried this:

=============================
<html>
<head>
<script language="javascript">
function foo( )
{
  var req = new XMLHttpRequest( );
  req.open( 'POST', 'http://localhost:2002/huh', false );
  req.send( 'a=helloworld' );
}
</script>
</head>
<body onLoad="foo( )">
</body>
</html>
=============================

and konqueror sends:

=============================
fanti@daniela:~$ netcat -lp 2002
POST /huh HTTP/1.1
Connection: Keep-Alive
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)
Pragma: no-cache
Cache-control: no-cache
Accept: text/html, image/jpeg, image/png, text/*, image/*, */*
Accept-Encoding: x-gzip, x-deflate, gzip, deflate
Accept-Charset: iso-8859-15, utf-8;q=0.5, *;q=0.5
Accept-Language: en
Host: localhost:2002

Content-Length: 13

a=helloworld
=============================

the 'Content-Length <n>' should be part of the header and not of the body. 
there is one carriage return/line feed to many.

tested with:

fanti@daniela:~$ konqueror --version
Qt: 3.3.3
KDE: 3.3.1
Konqueror: 3.3.1

regards,
martin

-- 
Martin Jordan - SPiN AG
fanti@spin.de

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic