Hi all!
I have a problem with acceptance of POST inquiry in PHP and ASP.NET. They differently receive streamer with the data. And they have a different Content-Length.
In ASP.NET I used: Request. SaveAs
in PHP used $data = @file_get_contents('php://
input');
Here is an example of received data:
ASP.NET
POST /default.aspx HTTP/1.1
Connection: Keep-Alive
Pragma: no-cache
Content-Length: 260
Accept: */*
Host: localhost:1812
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.21022; Media Center PC 3.1)
WWv¶ZJ-(hyil*>YL?,
!x%q°y
¦?.4dK)
?=¤?AR1.
EdJ#EN·
dxWcs"B
:#:§tB_
" 8Q*#M._9J;P/K_N0¤s
¬X6c~
'LH§;$D
WGU:\!<?=A^t«D0*"^3V
&YA5+±
(@Hs® r`9/!3M
O7US*WX'% KFj"9ls4 CK9°¬.: _¶ B[MV$}§G.wJkY
0P0L
PHP
POST /index.php HTTP/1.1
Host: localhost
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 2.0.50727; .NET CLR 1.1.4322; .NET CLR 3.5.21022; Media Center PC 3.1)
Content-Length: 261
Connection: Close
WWv¶ZJ-(h¶N*,BCwM8-|
D%q°y
¦?.4dK)
?=¤?AR1.
EdJ#EN·
dxWcs"B
:#:§tB_
" 8Q*#M._9J¤ /K_N0¬§s¬X6c~'LH§;
$D WGU:\!<g
^t«D0*"^3V&YA5+±(
@Hs® r`9/!3M
O7US*WX'% KFj"9ls4 CK9°¬.: _¶ B[MV$}§G.wJkY
0P0L
PHP obtains (gets) the data correcrlt with which I can work then, but ASP.NET as you see gets a bit another data in a consequence with which it is impossible to work because all structure is broken..
I have attached 2 files for example, please take a look.