BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 11-23-2009, 07:35 PM   #1 (permalink)
New Member
 
Join Date: Oct 2009
Model: 9000
PIN: N/A
Carrier: AT&T
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default A question about MDS and HttpConnection

Please Login to Remove!

Hello ,i met a strange issue ,i use HttpConnection and use MDS for http connect on 8310 simulator.

And i use following codes to print all headers.

HttpConnection con = ( HttpConnection ) Connector.open( url, Connector.READ_WRITE );
con.setRequestMethod( HttpConnection.POST );
con.setRequestProperty( "Content-Length", Integer.toString( messageLength ) );
con.setRequestProperty( "Content-Type", "text/xml" );
int headerCount = 0;
String header = null;

do{
header = con.getHeaderField(headerCount);
System.out.println("wang jianwei send header " + con.getHeaderFieldKey(headerCount) + " :" + header);
headerCount++;

}while(header != null);


But the headers i got from simulator is different from i got from MDS.
From MDS ,i can see all headers are returned from server ,but from simulator ,some fields are filtered by MDS.

Does anyone know how to resolve this issue?

Thanks a lot!
Offline  
Old 11-24-2009, 02:18 AM   #2 (permalink)
New Member
 
Join Date: Oct 2009
Model: 9000
PIN: N/A
Carrier: AT&T
Posts: 4
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

who has met the issue ,pls give me some comments ,thanks a lot!
Offline  
Old 11-24-2009, 07:26 AM   #3 (permalink)
BlackBerry Extraordinaire
 
Join Date: Mar 2008
Location: Austin, TX
Model: 9700
PIN: N/A
Carrier: T-Mobile
Posts: 1,644
Post Thanks: 0
Thanked 34 Times in 33 Posts
Default

You say "use MDS for http connect on 8310 simulator" and then you say "but from simulator, some fields are filtered by MDS."

I'm confused. Sounds to me like the two cases are the same.

Anyway, if you are talking about MDS-CS (the MDS simulator), it mimics the BES environment. When you are connected via BES, you will find that some headers are transcribed and some are handled by the BES proxy and "eaten", so that you never see them.

For example, MDS will eat your "Set-cookie" header and handle the cookies for you.

Specifically, which headers are you missing?
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.