Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  HTTP massive headers received  (Read 1410 times)
0 Members and 1 Guest are viewing this topic.
Offline pkien168

Junior Newbie




Java games rock!


« Posted 2003-12-05 01:18:32 »

Hi all,

Got a tricky question here and i am getting desparate for some pointers. Here it goes.

Ok, i'm writing an app targeted for all phones that is MIDP 1.0 compatible. I was testing out the basic HTTP connection between the client (mobile app on the phone) and server (standard J2SE server application). The app is to establish a standard HTTP connection and a POST header set. Then, data in bytearray is sent to the server.  The connection will be established using GPRS.

I find that there are vast differences between running the app on the emulator, Nokia phones and other phones. The actual stuff received on the server varies, which might be due to the different MIDP layer on the phones.

The problem is that running the simple test on the Nokia 3100 phone produces vastly bigger headers than using other phones such as a Sony-Ericsson T610. Besides that, it is weird to see that the headers are extras that was not set by the test app. The fact that i only set the httpconnection.POST method and nothing else.

The information received includes:
MIDP/CONFIG version, host ID, up-link, up-link fax, application postscripts, WAP settings and all these stuff.

I initially sent about 80bytes of data but ended up with around 1kilobyte of data, fatal for the app i'm gonna write. For other actual phones, i get various results as well. But the variation comes from the POST method i set. The Sony-Ericsson sent information such as transfer encoding and host ID to the server before the actual pay load, a massive reduction in comparison to the Nokia 3100.

Since both the test on different mobile phones used the same sim card (Telstra austalia), i dun think its the telco doing this. The only thing i can think of is the MIDP layer. So, is there any way of "turning off" these headers and eliminating these things being sent to the server?

And another thing, is there any Nokia SDKs for the Nokia 3100?

Thnx heaps.
Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #1 - Posted 2003-12-05 04:44:53 »

AFAIK, most of all that stuff is send by the WAP gateway, and not the actual device? Likewise with cookies. Once set, the gateway will handle them for you (though A LOT of gateways wont! - bottom line, don't rely on cookies).

Offline pkien168

Junior Newbie




Java games rock!


« Reply #2 - Posted 2003-12-05 05:09:45 »

Hi thanks for the reply, very much appreciated.

The test app actually uses GPRS and not WAP services. I dont think these two are the same services are they...? I'm not sure. But yes, seems like both will still go through the same WAP gateway. But the thing is that i'm using different phones (1 Nokia, 2 Sony Ericsson), with same test app, same SIM card from the same telco. Even if the test app do use the WAP gateway, wouldn't it be the same gatewawy that we are talking about? If thats the case, would all the test cases be producing the massive header on the server? But it is only producing that on one phone....the Nokia 3100.

Anyway, would the users be actually paying for these extra headers if it ever be an application of sort or is it going to be paid by the telco themselves?

Cheers
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #3 - Posted 2003-12-05 06:15:19 »

Well, I am actually doing a multiplayer j2me right now - and was quite sure that headers was being done by the gateway - I'll try to investigate this today...

This is the headers from a request to one of our servers

Quote
Host: www.certus.dk
content-type: text/plain
accept: text/x-vcard, text/x-vcalendar, image/vnd.wap.wbmp, */*, image/gif
accept-language: da
accept-charset: ISO-8859-1, UTF-8; Q=0.8, ISO-10646-UCS-2; Q=0.6, US-ASCII; Q=0.7
user-agent: Nokia7250I/1.0 (3.22) Profile/MIDP-1.0 Configuration/CLDC-1.0
x-wap.tod-coded: Thu, 01 Jan 1970 00:00:00 GMT
Via: WTP/1.1 abnws01.sonofon.dk (Nokia WAP Gateway 4.0/ECD5/4.0.49)
X-Network-info: GPRS,10.6.176.43,4540840635,unsecured
Content-Length: 15
X-Nokia-ipaddress: 10.6.176.44
X-Nokia-msisdn: 4540840635
X-Nokia-CONNECTION_MODE: CMODE
X-Nokia-BEARER: GPRS
X-Nokia-gateway-id: NWG/4.0/Build49
x-wap-profile: http://nds1.nds.nokia.com/uaprof/N7250ir100.xml
x-nokia.wia.accept.original: text/x-vCard,text/x-vCalendar,image/vnd.wap.wbmp,*/*,image/gif
Connection: close


if this were to be send by the device each time a connection is done, there would be an overhead of ~ 800 bytes PER CONNECTION!
Thats certainly not what my phone is telling me after a GPRS session is done...

Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #4 - Posted 2003-12-05 06:16:17 »

btw, the 3100 is just a series 40 phone, so use the 7210 emulator from Nokia

Offline Matzon

JGO Knight


Medals: 19
Projects: 2


I'm gonna wring your pants!


« Reply #5 - Posted 2003-12-05 06:31:08 »

Quote
Anyway, would the users be actually paying for these extra headers if it ever be an application of sort or is it going to be paid by the telco themselves?

ANY data send or received by the device (be it connection establishment, transmission control packages, routing, data) will be billed by the telco. At least in Denmark we pay per bytes send and received.

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (62 views)
2014-04-15 18:08:23

BurntPizza (60 views)
2014-04-15 03:46:01

UprightPath (73 views)
2014-04-14 17:39:50

UprightPath (56 views)
2014-04-14 17:35:47

Porlus (73 views)
2014-04-14 15:48:38

tom_mai78101 (99 views)
2014-04-10 04:04:31

BurntPizza (159 views)
2014-04-08 23:06:04

tom_mai78101 (254 views)
2014-04-05 13:34:39

trollwarrior1 (208 views)
2014-04-04 12:06:45

CJLetsGame (215 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!