[x]
Posted via EE Mobile

Search, ask, and monitor your questions on the go with EE Mobile. Visit Experts Exchange from your mobile device and never be out of touch again.

Question
[x]
Attachment Details

The encoding in acceptance of POST inquiry

Asked by Nonamerz in Programming for ASP.NET, Microsoft Visual C#.Net, .NET

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 &Y‘A5+±(@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 &Y‘A5+±(@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.
Attachments:
 
 
 
 
[+][-]11/09/09 03:32 AM, ID: 25774935Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]11/09/09 11:07 AM, ID: 25778910Author Comment

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 30-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]11/09/09 12:33 PM, ID: 25779718Expert Comment

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 30-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20091021-EE-VQP-81 - Hierarchy / EE_QW_3_20080625